Xinference安装

文档地址:
https://inference.readthedocs.io/zh-cn/latest/getting_started/installation.html

安装

pip install xinference

启动

xinference-local --host 127.0.0.1 --port 9997
#0.0.0.0在windows下不支持
#xinference-local --host 0.0.0.0 --port 9997

访问

http://localhost:9997/

模型下载目录配置

新建环境变量XINFERENCE_HOME指定目录

KeyError: [address=127.0.0.1:53922, pid=20848] 'model.embed_tokens.weight' 错误解决

原因是:xinference在使用指定量化时,只能运行bin文件。而qwen2运行时生成的是safetensors文件
解决方法:使用xinference运行qwen2在指定量化规模时,选择none运行即可。

posted @ 2025-04-01 21:58  fortuneju  阅读(445)  评论(0)    收藏  举报