使用清华大学的 Hugging Face 镜像
代码
model = AutoModel.from_pretrained("Qwen/Qwen3-Embedding-0.6B-GGUF", trust_remote_code=True)
报错
raise OSError(
OSError: We couldn’t connect to 'https://huggingface.co Hugging Face – The AI community building the future. Hugging Face – The AI community building the future. ’ to load the files, and couldn’t find them in the cached files.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode Installation Installation '.
解决方式
更换国内镜像
控制台输入
export HF_ENDPOINT=https://hf-mirror.com
然后运行代码时会自动下载模型,重启终端后环境变量会自动消失
或者离线模式加载模型
下载模型文件到本地目录,然后修改目录为本地模型地址运行
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.dtcms.com/a/248909.html
如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!