Files
modelscope/examples/pytorch/token_classification/run_train_structbert.sh
zsl01670416 71a80173e5 modify examples text_classification, text_generation, token_classification for improved trainer
1.text_classification/run_train.sh
2.text_generation/run_train_mt5.sh, run_train_palm.sh
3.token_classification/finetune_token_classification.py, run_train_mgeo.sh, run_train_structbert.sh
above files were modified to adapt to improved trainer
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12629010
2023-05-16 14:32:43 +08:00

23 lines
765 B
Bash

PYTHONPATH=. python examples/pytorch/token_classification/finetune_token_classification.py \
--task 'token-classification' \
--trainer 'nlp-base-trainer' \
--work_dir './tmp' \
--model 'damo/nlp_structbert_backbone_base_std' \
--train_dataset_name 'GeoGLUE' \
--train_subset_name 'GeoETA' \
--train_dataset_namespace 'damo' \
--first_sequence 'tokens' \
--eval_strategy by_step \
--eval_interval 20 \
--label 'ner_tags' \
--sequence_length 128 \
--preprocessor 'token-cls-tokenizer' \
--preprocessor_padding 'max_length' \
--max_epochs 2 \
--mode 'inference' \
--use_model_config True \
--per_device_train_batch_size 32 \
--train_data_worker 0 \
--eval_data_worker 0 \
--lr 3e-5 \