-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_rollback_optimization is not performed on some old FastText models #2453
Comments
Possible workaround is to manually apply this changes on loaded model: from gensim.models.keyedvectors import _rollback_optimization
ft2.wv.compatible_hash = False
_rollback_optimization(ft2.wv) |
Good catch. We'll add logic to handle such models. |
This should also handle models loaded via |
@generall FYI: all the RusVectores fastText models are now updated to support the latest Gensim version. Also note that you should use |
@akutuzov I think the KeyedVectors stuff already gets handled correctly - could you please confirm? |
Problem description
Model
araneum_none_fasttextskipgram_300_5_2018
from https://rusvectores.org/ru/models/is loading incorrectly with
gensim.models.fasttext.FastText.load
This method creates model with
compatible_hash = True
andhash2index
param, so that ngram indexes are computed incorrectly.Steps/code/corpus to reproduce
gives the following stacktrace
Versions
The text was updated successfully, but these errors were encountered: