-
Notifications
You must be signed in to change notification settings - Fork 0
/
task_classifier_config_large.yaml
120 lines (114 loc) · 4.17 KB
/
task_classifier_config_large.yaml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Builtin Configurations(DO NOT CHANGE THESE CONFIGURATIONS unless you know exactly what you are doing)
enable_modelarts: False
# Url for modelarts
data_url: ""
train_url: ""
checkpoint_url: ""
# Path for local
data_path: "/cache/data"
output_path: "/cache/train"
load_path: "/cache/checkpoint_path"
device_target: "Ascend"
enable_profiling: False
# ==============================================================================
description: "run_classifier"
assessment_method: "Accuracy"
do_train: "true"
do_eval: "true"
do_predict: "false"
device_id: 0
epoch_num: 3
num_class: 2
train_data_shuffle: "true"
eval_data_shuffle: "true"
test_data_shuffle: "false"
train_batch_size: 32
eval_batch_size: 1
save_finetune_checkpoint_path: "./finetune_checkpoints/classify.ckpt"
load_pretrain_checkpoint_path: "./pretrained_models/bert_base_ascend_v190_zhwiki_official_nlp_bs256_acc91.72_recall95.06_F1score93.36.ckpt"
load_finetune_checkpoint_path: "./finetune_checkpoints/classify.ckpt/classifier-3_274.ckpt"
train_data_file_path: "./output/train.tfrecord"
eval_data_file_path: "./output/dev.tfrecord"
test_data_file_path: "./output/tf.mindrecord"
schema_file_path: ""
dataset_format: "tfrecord"
# export related
export_batch_size: 1
export_ckpt_file: ''
export_file_name: 'mind_con_shark803'
file_format: 'MINDIR'
optimizer_cfg:
optimizer: 'Lamb'
AdamWeightDecay:
learning_rate: 0.00002 # 2e-5
end_learning_rate: 0.0000000001 # 1e-10
power: 1.0
weight_decay: 0.00001 # 1e-5
decay_filter: ['layernorm', 'bias']
eps: 0.000001 # 1e-6
Lamb:
learning_rate: 0.00002 # 2e-5,
end_learning_rate: 0.0000000001 # 1e-10
power: 1.0
weight_decay: 0.01
decay_filter: ['layernorm', 'bias']
Momentum:
learning_rate: 0.00002 # 2e-5
momentum: 0.9
bert_net_cfg:
seq_length: 128
vocab_size: 21128
hidden_size: 1024
num_hidden_layers: 24
num_attention_heads: 16
intermediate_size: 4096
hidden_act: "gelu"
hidden_dropout_prob: 0.1
attention_probs_dropout_prob: 0.1
max_position_embeddings: 512
type_vocab_size: 2
initializer_range: 0.02
use_relative_positions: False
dtype: mstype.float32
compute_type: mstype.float16
---
# Help description for each configuration
enable_modelarts: "Whether training on modelarts, default: False"
data_url: "Url for modelarts"
train_url: "Url for modelarts"
data_path: "The location of the input data."
output_path: "The location of the output file."
device_target: "Running platform, choose from Ascend, GPU or CPU(On the CPU, only the export and inference of the onnx model is supported), and default is Ascend."
enable_profiling: 'Whether enable profiling while training, default: False'
assessment_method: "assessment_method including [Mcc, Spearman_correlation, Accuracy, F1], default is Accuracy"
do_train: "Enable train, default is false"
do_eval: "Enable eval, default is false"
device_id: "Device id, default is 0."
epoch_num: "Epoch number, default is 3."
num_class: "The number of class, default is 2."
train_data_shuffle: "Enable train data shuffle, default is true"
eval_data_shuffle: "Enable eval data shuffle, default is false"
train_batch_size: "Train batch size, default is 32"
eval_batch_size: "Eval batch size, default is 1"
save_finetune_checkpoint_path: "Save checkpoint path"
load_pretrain_checkpoint_path: "Load checkpoint file path"
load_finetune_checkpoint_path: "Load checkpoint file path"
train_data_file_path: "Data path, it is better to use absolute path"
eval_data_file_path: "Data path, it is better to use absolute path"
schema_file_path: "Schema path, it is better to use absolute path"
export_batch_size: "export batch size."
export_ckpt_file: "Bert ckpt file."
export_file_name: "bert output mindir name."
file_format: "file format"
---
# chocies
device_target: ['Ascend', 'GPU', 'CPU']
assessment_method: ["Mcc", "Spearman_correlation", "Accuracy", "F1"]
do_train: ["true", "false"]
do_eval: ["true", "false"]
do_predict: ["true", "false"]
train_data_shuffle: ["true", "false"]
eval_data_shuffle: ["true", "false"]
test_data_shuffle: ["true", "false"]
file_format: ["AIR", "ONNX", "MINDIR"]
dataset_format: ["tfrecord", "mindrecord"]