What do static vectors do during training? #8709
-
I understand that you can add static vectors to a trainable component, e.g.
So my question is, what do these vectors do, or how are they used during training? Are the static vectors passed as additional input features for the NER model alongside the word? The same question goes for when we use So I am trying to understand the interplay between static vectors and other components. An additional example: here we read that similarity scores can still be calculated by using smaller models without static vectors. That raise the question: which component sets the vectors that are responsible for the similarity? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Static vectors are used for one of the pretraining objectives called "LMAO" where the model attempts to reproduce the vectors. Also as indicated in the static vectors docs they can be used as a feature in the tok2vec representation.
As indicated in the docs similarity uses an average of word vectors by default (the non-default cause is a user hook to override this). The vector value is just The implementations of each of these functions is quite small, if you're curious I would recommend looking at the source. |
Beta Was this translation helpful? Give feedback.
Static vectors are used for one of the pretraining objectives called "LMAO" where the model attempts to reproduce the vectors. Also as indicated in the static vectors docs they can be used as a feature in the tok2vec representation.
As indicated in the docs similarity uses an average of word vectors by default (the non-default cause is a user hook to override this). The vector value is just
Doc.vector
(or Span or Token). That value uses word vectors if available, and if not (as in the small models), falls …