- Try some pretrained model:
- Architecture: XXXXForSequenceClassification
- Use Trainer of Huggingface to training model
- Dataset: 30K e-commerce reviews
- Labels:
- NEG: Negative
- POS: Positive
- NEU: Neutral
- Use some optimization techniques to optimize ONNX - Optim
- See: pipeline/onnx_converter.py
- Note!!!
- Pass
model_class
to init class SentimentProcessor. - Pass
n_folds
!= None if you want to training with K-fold validation - If you use Bloom, you should pass
use_lora=True
- Export environment variables:
while read LINE; do export "$LINE"; done < .env
- Run training:
PRETRAINED_PATH=bigscience/bloom-560m CUDA_VISIBLE_DEVICES=1,2 python -m torch.distributed.launch --nproc_per_node 2 --master-port=30000 pipeline/trainer.py