2023-02-10 05:32:21 +00:00
|
|
|
PYTHONPATH=. python examples/pytorch/text_classification/finetune_text_classification.py \
|
2023-05-22 10:53:18 +08:00
|
|
|
--task 'text-classification' \
|
2023-02-10 05:32:21 +00:00
|
|
|
--model 'damo/nlp_structbert_backbone_base_std' \
|
2023-05-22 10:53:18 +08:00
|
|
|
--train_dataset_name 'clue' \
|
|
|
|
|
--train_subset_name 'tnews' \
|
2023-02-10 05:32:21 +00:00
|
|
|
--first_sequence 'sentence' \
|
|
|
|
|
--preprocessor.label label \
|
|
|
|
|
--model.num_labels 15 \
|
|
|
|
|
--labels '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14' \
|
|
|
|
|
--preprocessor 'sen-cls-tokenizer' \
|
2023-05-22 10:53:18 +08:00
|
|
|
--use_model_config True \
|
|
|
|
|
--max_epochs 1 \
|
2023-02-10 05:32:21 +00:00
|
|
|
--train.dataloader.workers_per_gpu 0 \
|
|
|
|
|
--evaluation.dataloader.workers_per_gpu 0 \
|
|
|
|
|
--train.optimizer.lr 1e-5 \
|
2023-05-22 10:53:18 +08:00
|
|
|
--eval_metrics 'seq-cls-metric' \
|