Re:You Should Probably Pay Attention to Tokenizers
by RicoElectrico on Wednesday October 23, 2024 @05:25PM
(#41929378)
Well, fastText uses character n-grams to compute embeddings for out-of-vocabulary words. This is pre-transformers work BTW.
[ Parent
| on HN ]
Re:You Should Probably Pay Attention to Tokenizers
by p1esk on Thursday October 24, 2024 @12:07AM
(#41931809)
IIRC, overlapping ngram vectors are summed to form the token embedding - doesn’t it effectively destroy any character level representation of the token? Doesn’t really make sense to me.
Re:You Should Probably Pay Attention to Tokenizers
by stephantul on Thursday October 24, 2024 @12:12AM
(#41931831)
It works because they use really large ngram values, up to 6. So most character-level information is in these subwords.
Re:You Should Probably Pay Attention to Tokenizers
by p1esk on Thursday October 24, 2024 @01:25AM
(#41932206)
Let’s say we want to use 6-grams and build an embedding vector for the word “because”: we add integer vectors for “becaus” and “ecause”, right? For example: [1,2,3,4,5,6] + [2,3,4,5,6,2] = [3,5,7,9,11,8]. Obviously we cannot use this resulting numerical vector to spell the input word. Pretty much all character level info is lost.