File size: 509 Bytes
7f390fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 | """Exact training call used for this model. Run from inside this directory:
python train.py
Retrains model.bin from train.txt in place (dim=128/epoch=25 -- the winner of a capacity
sweep against dim=64/epoch=10 and dim=256/epoch=25; dim256 added nothing further, see
README.md)."""
import fasttext
HPARAMS = dict(dim=128, epoch=25, lr=0.3, wordNgrams=2, minCount=3, bucket=2_000_000)
model = fasttext.train_supervised(input="train.txt", **HPARAMS)
model.save_model("model.bin")
print("saved model.bin")
|