File tree Expand file tree Collapse file tree 4 files changed +3
-21
lines changed
applications/text_classification Expand file tree Collapse file tree 4 files changed +3
-21
lines changed Original file line number Diff line number Diff line change 77
77
- 微调
78
78
79
79
```
80
+ cd ../
80
81
python train.py --dataset_dir "./data/" --save_dir "./checkpoints" --max_seq_length 128 --model_name "ernie-3.0-base-zh" --batch_size 8 --learning_rate 3e-5 --epochs 100 --logging_steps 5 --early_stop --early_stop_num 20
81
82
```
82
83
Original file line number Diff line number Diff line change 76
76
- 微调
77
77
78
78
```
79
+ cd ../
79
80
python train.py --dataset_dir "./data/" --save_dir "./checkpoints" --max_seq_length 128 --model_name "ernie-3.0-base-zh" --batch_size 8 --learning_rate 3e-5 --epochs 100 --logging_steps 5 --early_stop
80
81
```
81
82
Original file line number Diff line number Diff line change 82
82
- 微调
83
83
84
84
```
85
+ cd ../
85
86
python train.py --dataset_dir "./data/" --save_dir "./checkpoints" --max_seq_length 128 --model_name "ernie-3.0-base-zh" --batch_size 8 --learning_rate 3e-5 --epochs 100 --logging_steps 5 --early_stop --early_stop_num 10
86
87
```
87
88
Original file line number Diff line number Diff line change @@ -26,29 +26,8 @@ class PromptTuningArguments(TrainingArguments):
26
26
The arguments' subset for training loop during prompt tuning.
27
27
"""
28
28
29
- task_type : str = field (
30
- default = "multi-class" ,
31
- metadata = {"help" : "The task type of prompt tuning. Support " \
32
- "`multi-class`, `multi-label` and `hierachical`." })
33
-
34
29
max_seq_length : int = field (
35
30
default = 512 , metadata = {"help" : "The maximum length of all input text." })
36
- first_max_length : int = field (
37
- default = None ,
38
- metadata = {"help" : "The maximum length of the first sentence." })
39
- other_max_length : int = field (
40
- default = None ,
41
- metadata = {"help" : "The maximum length of other sentences." })
42
- truncate_mode : str = field (
43
- default = "tail" ,
44
- metadata = {
45
- "help" :
46
- "How to truncate input text, `head`, `tail` or "
47
- "`manual`. Truncate input text according to "
48
- "`first_max_length` and `other_max_length` in the "
49
- "manual mode."
50
- })
51
-
52
31
freeze_plm : bool = field (
53
32
default = False ,
54
33
metadata = {"help" : "If True, the pretrained parameters won't be " \
You can’t perform that action at this time.
0 commit comments