Skip to content

Commit 051d4e7

Browse files
authored
[prompt] remove unused arguments (#3794)
* [prompt] delete unused arguments * [few-shot] update script for fine-tune
1 parent 60a51f0 commit 051d4e7

File tree

4 files changed

+3
-21
lines changed

4 files changed

+3
-21
lines changed

applications/text_classification/hierarchical/few-shot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
- 微调
7878

7979
```
80+
cd ../
8081
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
8182
```
8283

applications/text_classification/multi_class/few-shot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
- 微调
7777

7878
```
79+
cd ../
7980
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
8081
```
8182

applications/text_classification/multi_label/few-shot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
- 微调
8383

8484
```
85+
cd ../
8586
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
8687
```
8788

paddlenlp/prompt/prompt_args.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,29 +26,8 @@ class PromptTuningArguments(TrainingArguments):
2626
The arguments' subset for training loop during prompt tuning.
2727
"""
2828

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-
3429
max_seq_length: int = field(
3530
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-
5231
freeze_plm: bool = field(
5332
default=False,
5433
metadata={"help": "If True, the pretrained parameters won't be "\

0 commit comments

Comments
 (0)