当前位置: 首页 > ds >正文

使用清华大学的 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.xdnf.cn/news/14278.html

相关文章:

  • PTP时间同步实战测试clock master/slave 直连校时+PPS测试
  • 第8章——8天Python从入门到精通【itheima】-88~90-Python的文件操作(文件的写出+文件的追加+综合案例)
  • 强化学习 PPO
  • GRUB2 启动配置的工作原理与优先级规则详解
  • 软件测试银行项目之“信用卡测试流程”
  • LlamaIndex 工作流 并发执行
  • Day13_C语言基础项目实战
  • Java性能问题排查
  • 暴雨亮相EAC2025分享热管理液冷技术
  • Android 中 linux 命令查询设备信息
  • PyTorch框架-自动微分模块
  • 小知识点三、无刷电机闭环控制
  • 大模型_Ubuntu24.04安装RagFlow_使用hyper-v虚拟机_超级详细--人工智能工作笔记0251
  • 【C++】C++17之std::optional
  • 41.第二阶段x64游戏实战-封包-分析周围对象ID
  • qt信号与槽--01
  • 【论文解读】Agentic AI 遇见工业自动化:从“指令”到“意图”的嬗变
  • Tabulate - C++表格格式化库介绍与使用
  • MongoDB详细安装步骤(Windows 系统)
  • SHELL 编程正则表达式
  • js 查看字符串字节数
  • 快速幂算法详解:从暴力到优雅的数学优化
  • Python脚本开发入门:从基础到进阶技巧
  • SpringBoot ​@ControllerAdvice 处理异常
  • 鸿蒙app 开发中 如何 看 app 页面的ui结构
  • JS 数组转Object和Map
  • PHP基础-运算符
  • 【62 Pandas+Pyecharts | 智联招聘大数据岗位数据分析可视化】
  • 如何VMware虚拟机扩容磁盘,有很详细图文
  • Blazor Web Assembly - 使用Power Automate Desktop来跟踪一下Blazor页面的内存使用情况