huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form ‘repo_name‘ or ‘nam

简介: 这篇文章介绍了在使用HuggingFace模型库时遇到的`Repo id`格式错误问题,并提供了将相对路径改为正确的绝对路径的解决办法。

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.

一,前言

复现chatGLM的时候报了这个错。

二,解决办法

1,已下载的模型路径不对

这个报错实际上是本地找不到模型导致的,可以检查一下看看。

2,HuggingFace模型路径不对

model = AutoModel.from_pretrained(“./THUDM/chatglm-6b”, trust_remote_code=True).quantize(8).half().cuda()
比如这个这个,就用了相对地址应该用绝对地址
model = AutoModel.from_pretrained(“HuggingFace/THUDM/chatglm-6b”, trust_remote_code=True).quantize(8).half().cuda()

相关文章
|
5月前
|
开发工具 git
*** Please tell me who you are.Run git config --global user.email “you@example.com“ git confi
*** Please tell me who you are.Run git config --global user.email “you@example.com“ git confi
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
460 1
|
6月前
|
机器学习/深度学习 前端开发 安全
【Gradio】Could not create share link
【Gradio】Could not create share link
2223 6
|
6月前
|
Oracle 关系型数据库 应用服务中间件
Supplemental Readme - Grid Infrastructure Release Update 12.2.0.1.x / 18c /19c (Doc ID 2246888.1)
Supplemental Readme - Grid Infrastructure Release Update 12.2.0.1.x / 18c /19c (Doc ID 2246888.1)
70 7
CEH v8~v11 Module Slides 和 Lab Manual 下载
CEH v8~v11 Module Slides 和 Lab Manual 下载
76 0
|
Linux 开发工具 Docker
Docker报错: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
Docker报错: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist
348 0
|
Linux 网络虚拟化
ROS安装遇到 sudo rosdep init 与rosdep update出现error loading sources list
ROS安装遇到 sudo rosdep init 与rosdep update出现error loading sources list
349 0
ROS安装遇到 sudo rosdep init 与rosdep update出现error loading sources list
|
开发工具 git
Can‘t find third_party/gtest. Run git submodule update --init, or disable with CMake -DBUILD_TEST
Can‘t find third_party/gtest. Run git submodule update --init, or disable with CMake -DBUILD_TEST
119 0
add file in debian/source/include-binaries if you want to store the modified binary in the debian
add file in debian/source/include-binaries if you want to store the modified binary in the debian
393 0
|
开发工具 git
.git file too large question resolve解决方法
.git file too large question resolve解决方法