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
|
5月前
|
网络协议 Linux 虚拟化
CentOS 8 错误: Error setting up base repository
CentOS 8 错误: Error setting up base repository
146 2
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
centos8 Failed to download metadata for repo ‘base‘: Cannot download repomd.xml
454 1
|
6月前
|
开发工具 git
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
git报错 Unable to create ‘D:/project/xxx/.git/index.lock‘: File exists.
279 1
|
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
|
开发工具 git
git Your push would publish a private email address.
git Your push would publish a private email address.
84 0
git Your push would publish a private email address.
|
开发工具 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
118 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
391 0
|
开发工具 git
.git file too large question resolve解决方法
.git file too large question resolve解决方法
|
Linux Windows
SVN更新被Locked,Can't open file 'folder/.svn/tmp/text-base/file.svn-base'
SVN更新被Locked,Can't open file 'folder/.svn/tmp/text-base/file.svn-base'
170 0
SVN更新被Locked,Can't open file 'folder/.svn/tmp/text-base/file.svn-base'
下一篇
无影云桌面