Download multilingual/train.py from anshy/classifs: direct link, hf CLI and curl.
- Browser
- Download file 509 Bytes
-
https://huggingface.co/anshy/classifs/resolve/main/multilingual/train.py
- Command line
-
hf download hf://anshy/classifs/multilingual/train.py
-
curl -L -o train.py https://huggingface.co/anshy/classifs/resolve/main/multilingual/train.py
509 Bytes
| """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") | |