Download quality/train.py from anshy/classifs: direct link, hf CLI and curl.
- Browser
- Download file 493 Bytes
-
https://huggingface.co/anshy/classifs/resolve/main/quality/train.py
- Command line
-
hf download hf://anshy/classifs/quality/train.py
-
curl -L -o train.py https://huggingface.co/anshy/classifs/resolve/main/quality/train.py
493 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=64/epoch=10 baseline -- see README.md | |
| for why higher capacity/rebalancing/more data were all tried and didn't help recall).""" | |
| import fasttext | |
| HPARAMS = dict(dim=64, epoch=10, 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") | |