Finetune pretrained model for Sentiment analysis
- Try some pretrained model:
- Architecture: XXXXForSequenceClassification
- Use Trainer of Huggingface to training model
- 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
About
Pipeline for sentiment classification, use trainer of HuggingFace and use ONNX to export model
Languages
Language:Jupyter Notebook 63.6%Language:Python 36.4%