【LLaMaFactory】训练报错: huggingface_hub.errors.HFValidationError: Repo id must be in the form ‘repo_name

问题

从 webui 点击开启训练,报错误


Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/llamafactory/launcher.py", line 23, in <module>
    launch()
  File "/opt/conda/lib/python3.10/site-packages/llamafactory/launcher.py", line 19, in launch
    run_exp()
  File "/opt/conda/lib/python3.10/site-packages/llamafactory/train/tuner.py", line 50, in run_exp
    run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
  File "/opt/conda/lib/python3.10/site-packages/llamafactory/train/sft/workflow.py", line 44, in run_sft
    tokenizer_module = load_tokenizer(model_args)
  File "/opt/conda/lib/python3.10/site-packages/llamafactory/model/loader.py", line 69, in load_tokenizer
    tokenizer = AutoTokenizer.from_pretrained(
  File "/opt/conda/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 834, in from_pretrained
    tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 666, in get_tokenizer_config
    resolved_config_file = cached_file(
  File "/opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py", line 466, in cached_file
    raise EnvironmentError(
OSError: Incorrect path_or_model_id: '/data/model/Llama2-7b-hf'. Please provide either the path to a local folder or the repo_id of a model on the Hub.
12/18/2024 09:09:00 - INFO - llamafactory.hparams.parser - Process rank: 3, device: cuda:3, n_gpu: 1, distributed training: True, compute dtype: torch.bfloat16
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py", line 402, in cached_file
    resolved_file = hf_hub_download(
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 106, in _inner_fn
    validate_repo_id(arg_value)
  File "/opt/conda/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 154, in validate_repo_id
    raise HFValidationError(
huggingface_hub.errors.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/data/model/Llama2-7b-hf'. Use `repo_type` argument if needed.

解决

保证选择的 模型名称 和本地路径的模型名称一致
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值