mirror of
https://github.com/xming521/WeClone.git
synced 2026-10-26 11:09:44 +08:00
63 lines
2.0 KiB
JSON
63 lines
2.0 KiB
JSON
{
|
|
"train_pt_args": {
|
|
"stage": "pt",
|
|
"dataset": "wechat-pt",
|
|
"dataset_dir": "./data/res_csv/pt",
|
|
"lora_target": "query_key_value",
|
|
"lora_rank": 2,
|
|
"lora_dropout": 0.1,
|
|
"output_dir": "model_output",
|
|
"overwrite_cache": true,
|
|
"per_device_train_batch_size": 1,
|
|
"gradient_accumulation_steps": 1,
|
|
"lr_scheduler_type": "cosine",
|
|
"logging_steps": 10,
|
|
"save_steps": 1000,
|
|
"learning_rate": 0.001,
|
|
"num_train_epochs": 30,
|
|
"plot_loss": true,
|
|
"fp16": true
|
|
},
|
|
"train_sft_args": {
|
|
"stage": "sft",
|
|
"dataset": "wechat-sft",
|
|
"dataset_dir": "./data/res_csv/sft",
|
|
"lora_target": "query_key_value",
|
|
"lora_rank": 4,
|
|
"lora_dropout": 0.5,
|
|
"overwrite_cache": true,
|
|
"per_device_train_batch_size": 4,
|
|
"gradient_accumulation_steps": 8,
|
|
"lr_scheduler_type": "cosine",
|
|
"logging_steps": 10,
|
|
"save_steps": 150,
|
|
"learning_rate": 0.0001,
|
|
"num_train_epochs": 3,
|
|
"plot_loss": true,
|
|
"fp16": true
|
|
},
|
|
"infer_args": {
|
|
"repetition_penalty": 1.2,
|
|
"temperature": 0.5,
|
|
"max_length": 50,
|
|
"top_p": 0.65
|
|
},
|
|
"make_dataset_args": {
|
|
// "enable_vision_model": false,//后续实现
|
|
// "include_type": [
|
|
// "文本"
|
|
// ],
|
|
"single_combine_strategy": "time_window", // 单人组成单句策略
|
|
"qa_match_strategy": "time_window", // 组成qa策略
|
|
"single_combine_time_window": 2, // 单人组成单句时间窗口(分钟),
|
|
"qa_match_time_window": 5, // 组成qa时间窗口(分钟),
|
|
"prompt_with_history": false // 是否在prompt中包含历史对话
|
|
},
|
|
"common_args": {
|
|
"model_name_or_path": "./chatglm3-6b",
|
|
"adapter_name_or_path": "./model_output", //同时做为train_sft_args的output_dir
|
|
"template": "chatglm3-weclone",
|
|
"finetuning_type": "lora",
|
|
"trust_remote_code": true
|
|
}
|
|
} |