← All questions
Training & Fine-tuningHard· fastText· Hashing· Data Filtering

What are the implications of hash collisions for qualit...

In fastText, hash collisions occur when different n-grams map to the same bin, causing them to share a weight. For binary classification, this means the model learns a weight representing the average behavior of all colliding n-grams. While the collision probability for any single bigram is low (roughly 10 ppm) given 10^7 bins, the model eventually adapts to this noise. Notably, importance-sampling unigram models do not suffer from this problem because they rely on single-token counts, which is why they can match fastText performance on small target sets.

Code playground (Python)