yichen-byte / medical-chatbot

基于ChatGLM3基座模型和LLAMA-Factory框架进行微调的一个中医问答机器人
64 stars 14 forks source link

在训练的时候提示:ValueError: Template chatglm3_raw does not exist. #3

Open zengraoli opened 4 months ago

zengraoli commented 4 months ago

LLaMA-Factory是不是版本啥的不对了?还是我没安装好?

全部的报错如下: (langchain) zeng@zeng:~/llm/medical-chatbot$ sh run_training.sh 04/29/2024 15:43:19 - WARNING - llmtuner.hparams.parser - We recommend enable mixed precision training. 04/29/2024 15:43:19 - INFO - llmtuner.hparams.parser - Process rank: 0, device: cpu, n_gpu: 0, distributed training: False, compute dtype: None [INFO|tokenization_utils_base.py:2085] 2024-04-29 15:43:19,142 >> loading file tokenizer.model [INFO|tokenization_utils_base.py:2085] 2024-04-29 15:43:19,142 >> loading file added_tokens.json [INFO|tokenization_utils_base.py:2085] 2024-04-29 15:43:19,142 >> loading file special_tokens_map.json [INFO|tokenization_utils_base.py:2085] 2024-04-29 15:43:19,142 >> loading file tokenizer_config.json [INFO|tokenization_utils_base.py:2085] 2024-04-29 15:43:19,142 >> loading file tokenizer.json Traceback (most recent call last): File "/home/zeng/llm/medical-chatbot/src/train_bash.py", line 14, in <module> main() File "/home/zeng/llm/medical-chatbot/src/train_bash.py", line 5, in main run_exp() File "/home/zeng/soft/anaconda3/envs/langchain/lib/python3.11/site-packages/llmtuner/train/tuner.py", line 33, in run_exp run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks) File "/home/zeng/soft/anaconda3/envs/langchain/lib/python3.11/site-packages/llmtuner/train/sft/workflow.py", line 33, in run_sft dataset = get_dataset(model_args, data_args, training_args, stage="sft", **tokenizer_module) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zeng/soft/anaconda3/envs/langchain/lib/python3.11/site-packages/llmtuner/data/loader.py", line 125, in get_dataset template = get_template_and_fix_tokenizer(tokenizer, data_args.template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/zeng/soft/anaconda3/envs/langchain/lib/python3.11/site-packages/llmtuner/data/template.py", line 350, in get_template_and_fix_tokenizer raise ValueError("Template {} does not exist.".format(name)) ValueError: Template chatglm3_raw does not exist. (langchain) zeng@zeng:~/llm/medical-chatbot$ ValueError: Template chatglm3_raw does not exist

zhoujy7 commented 3 months ago

我也遇到了这个问题,请问解决了吗

NJUxlj commented 3 weeks ago

chatglm3_raw这块template,需要自己去源码里手动注册

image

随后就可以正常训练了:

image
zhoujy7 commented 3 weeks ago

感谢老师的回复,我们的项目已经结束,希望还有下次与您合作和交流的机会。发自我的手机-------- 原始邮件 --------发件人: Bruzy @.>日期: 2024年8月14日周三 上午9:33收件人: yichen-byte/medical-chatbot @.>抄送: zhoujy7 @.>, Comment @.>主 题: Re: [yichen-byte/medical-chatbot] 在训练的时候提示:ValueError: Template chatglm3_raw does not exist. (Issue #3) chatglm3_raw这块template,需要自己去源码里手动注册 image.png (view on web) 随后就可以正常训练了: image.png (view on web)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>