liucongg / ChatGLM-Finetuning

基于ChatGLM-6B、ChatGLM2-6B、ChatGLM3-6B模型,进行下游具体任务微调,涉及Freeze、Lora、P-tuning、全参微调等

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

--model_name_or_path', '../THUDM/chatglm-6b'参数什么错误

daiyucan opened this issue · comments

Traceback (most recent call last):
File "/root/ChatGLM-Finetuning/train.py", line 234, in
main()
File "/root/ChatGLM-Finetuning/train.py", line 96, in main
tokenizer = MODE[args.mode]["tokenizer"].from_pretrained(args.model_name_or_path)
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/transformers/tokenization_utils_base.py", line 1813, in from_pretrained
resolved_vocab_files[file_id] = cached_file(
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/transformers/utils/hub.py", line 429, in cached_file
resolved_file = hf_hub_download(
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 110, in _inner_fn
validate_repo_id(arg_value)
File "/opt/conda/envs/pytorch1.8/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 158, in validate_repo_id
raise HFValidationError(
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '../THUDM/chatglm-6b'. Use repo_type argument if needed.
[2024-01-02 20:35:17,751] [INFO] [launch.py:315:sigkill_handler] Killing subprocess 5491
[2024-01-02 20:35:17,752] [ERROR] [launch.py:321:sigkill_handler] ['/opt/conda/envs/pytorch1.8/bin/python3.9', '-u', 'train.py', '--local_rank=0', '--train_path', 'data/spo_0.json', '--model_name_or_path', '../THUDM/chatglm-6b', '--per_device_train_batch_size', '1', '--max_len', '1560', '--max_src_len', '1024', '--learning_rate', '1e-4', '--weight_decay', '0.1', '--num_train_epochs', '2', '--gradient_accumulation_steps', '4', '--warmup_ratio', '0.1', '--mode', 'glm', '--train_type', 'freeze', '--freeze_module_name', 'layers.27.,layers.26.,layers.25.,layers.24.', '--seed', '1234', '--ds_file', 'ds_zero2_no_offload.json', '--gradient_checkpointing', '--show_loss_step', '10', '--output_dir', './output-glm'] exits with return code = 1

预训练模型路径不对,我这里需要将写本地模型的路径,“./THUDM/chatglm-6b”这个路径应该在你本地没有。
如果你写transformer的repo_id你应该写,“THUDM/chatglm-6b”吧