-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcasrel.yaml
More file actions
45 lines (41 loc) · 951 Bytes
/
Copy pathcasrel.yaml
File metadata and controls
45 lines (41 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 任务名称
task_name: bert-casrel-relation
# 模型路径
model_name_or_path: /data/checkpoints/bert/chinese-roberta-wwm-ext
# 保存路径
output_dir: outputs/bert-casrel-relation
# 启动训练
do_train: true
# 数据集路径
dataset_dir: datasets/duie
# 训练集
train_file: train.json
# 验证集
validation_file: dev.json
# 标签字段名称
label_column_name: spo_list
preprocessing_num_workers: 16
# 训练轮次
num_train_epochs: 10
# 训练时批大小
per_device_train_batch_size: 4
# 验证时批大小
per_device_eval_batch_size: 16
# 基座模型学习率
learning_rate: 0.00002
# 适配层学习率
differential_learning_rate: 0.0002
# 打印间隔
logging_steps: 100
# 评估间隔
evaluation_strategy: epoch
# 保存间隔
save_strategy: epoch
# 评估指标
metric_for_best_model: eval_f1
# 加载最优模型
load_best_model_at_end: true
# 最多保存模型数量
save_total_limit: 2
# 日志上传方式
report_to: none