You can continue training in some versions of Gensim's fastText
(for example, v.3.7.*). Here is an example of "Loading, inferring, continuing training"
from gensim.test.utils import datapath
model = load_facebook_model(datapath("crime-and-punishment.bin"))
sent = [['lord', 'of', 'the', 'rings'], ['lord', 'of', 'the', 'semi-groups']]
model.build_vocab(sent, update=True)
model.train(sentences=sent, total_examples = len(sent), epochs=5)
For some reason, the gensim.models.fasttext.load_facebook_model()
is missing on Windows, but exists on Mac's installation. Alternatively, one can use gensim.models.FastText.load_fasttext_format()
to load a pre-trained model and continue training.
Here are various pre-trained Wiki word models and vectors (or here).
Another example. "Note: As in the case of Word2Vec, you can continue to train your model while using Gensim's native implementation of fastText."
model.build_vocab()
throwsAttributeError: 'FastTextTrainables' object has no attribute 'syn1neg'
– Guinna