Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 949 Bytes

TRAIN.md

File metadata and controls

33 lines (21 loc) · 949 Bytes

Training models

To train a model, use the script bin/train.py, which takes the following arguments:

python bin/train.py --base_model <model_name> \
    --task <task> \
    --lang <lang> \
    --push_to <huggingface_identifier>

to train and push a model to HuggingFace. For instance, to train a RoBERTuito model for Sentiment Analysis, use:

python bin/train.py --base_model "pysentimiento/robertuito-base-uncased"\
    --push_to 'pysentimiento/robertuito-sentiment-analysis'\
    --task sentiment --lang es

Note that if you don't belong to pysentimiento organization in huggingface, this won't work because you don't have access to data.

Benchmarking

To run benchmarks you can use also bin/train.py passing the --benchmark

python bin/train.py --base_model "pysentimiento/robertuito-base-uncased"\
    --task sentiment --lang es --benchmark --times 10