windows下xinference无法加载本地大模型问题解决

一、打开C盘权限

1 打开【开始】菜单

2 找到windows工具,打开

3 找到命令行

4 右键

5 以管理员身份运行

6 输入:icacls frpc_windows_amd64_v0.2 /grant Users:(RX)

7 等待几分钟

二、创建软链接

以管理员身份在命令行运行下面命令

mklink /d E:\\XinferenceFiles\\cache\\custom-glm4-chat-pytorch-9b E:\\glm_4_9b_chat

启动成功:

C:\Windows\System32>mklink /d E:\\XinferenceFiles\\cache\\custom-glm4-chat-pytorch-9b E:\\glm_4_9b_chat

为 E:\\XinferenceFiles\\cache\\custom-glm4-chat-pytorch-9b <<===>> E:\\glm_4_9b_chat 创建的三、命令方式启动模型

1 在E:\glm_4_9b_chat下创建一个custom-glm4-chat.json配置文件

内容为:

{

"version": 1,

"context_length": 131072,

"model_name": "custom-glm4-chat",

"model_lang": [

"en",

"zh"

],

"model_ability": [

"chat",

"tools"

],

"model_family": "glm4-chat",

"model_specs": [

{

"model_format": "pytorch",

"model_size_in_billions": 9,

"quantizations": [

"4-bit",

"8-bit",

"none"

],

"model_id": "THUDM/glm-4-9b-chat",

"model_uri": "E:\\glm_4_9b_chat"

}

]

}

2 启动xinference,执行下面命令

xinference-local --host 127.0.0.0 --port 9997

3 打开inference的命令行,切换到大模型路径下E:\glm_4_9b_chat

4 注册模型

xinference register --model-type LLM --file custom-glm4-chat.json --persist

5 开启模型

xinference launch --model-name custom-glm4-chat --model-format pytorch --model-engine Transformers

参考链接:

【Gradio-Windows-Linux】解决share=True无法创建共享链接,缺少frpc_windows_amd64_v0.2_gradio share=true-CSDN博客

无错误!xinference部署本地模型glm4-9b-chat、bge-large-zh-v1.5_xinference加载本地模型-CSDN博客

使用xinference下载大模型之后存储的位置

:"E:\XinferenceFiles\modelscope\hub\ZhipuAI\glm-4-9b-chat\modeling_chatglm.py"

相关推荐
LucaJu18 分钟前
DeepAgents 人工介入实战|LangGraph 实现 Agent 高危工具人工审批
python·langchain·agent·langgraph·deepagents
tangweiguo0305198725 分钟前
AI文生图完整实战:基于阿里云百炼通义万相
人工智能·langchain
Flittly1 小时前
【LangGraph新手村系列】(2)自定义状态与归约器:让 LangGraph 记住更多东西
python·langchain·aigc
hrhcode1 小时前
【LangChain】一.LangChain v1.0-快速上手(核心组件、工具、中间件)
python·ai·langchain·agent
yuyuyui2 小时前
LangChain框架-数据检索
langchain
草莓熊Lotso6 小时前
Vibe Coding 时代:LangChain 与 LangGraph 全链路解析
linux·运维·服务器·数据库·人工智能·mysql·langchain
深海鱼在掘金12 小时前
深入浅出 LangChain —— 第三章:模型抽象层
人工智能·langchain·agent
深海鱼在掘金12 小时前
深入浅出 LangChain —— 第二章:环境搭建与快速上手
人工智能·typescript·langchain
猫头虎18 小时前
如何搭建 24 小时 AI 直播平台:魔珐星云数字人打造无人值守 “AI 销冠” 全流程实战教程
人工智能·langchain·开源·prompt·aigc·embedding·agi
Flittly19 小时前
【LangGraph新手村系列】(1)LangGraph 入门:StateGraph 与带记忆的 ReAct 循环
python·langchain