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

xinference 安装(http导致错误解决)

为什么要使用xinference

安装xinference

环境

1)conda create -n Xinference python=3.11

注意:3.9 3.10均可能出现xinference 安装时候出现numpy兼容性,以及无法安装all版本

错误: error while attempting to bind on address,no dictory等错误,是由于ssl启动错误引起的。 建议直接安装xinference all版本

注意:单部署

启动:xinference-local --host 127.0.0.1 --port 9997

分类启动

前端:xinference-local --host 127.0.0.1 --port 9997

后端:nohup xinference-local --host 127.0.0.1 --port 9997 & > output.log

涉及版本有

# CUDA/CPU 

pip install "xinference[transformers]" 

pip install "xinference[vllm]" 

pip install "xinference[sglang]" 

# Metal(MPS) 

pip install "xinference[mlx]" 

CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python

普通启动:xinference-local --host 0.0.0.0 --port 9997

模型启动:

# CUDA/CPU XINFERENCE_HOME=/path/.xinference XINFERENCE_MODEL_SRC=modelscope xinference-local --host 0.0.0.0 --port 9997

# Metal(MPS)

XINFERENCE_HOME=/path/.xinference XINFERENCE_MODEL_SRC=modelscope PYTORCH_ENABLE_MPS_FALLBACK=1 xinference-local --host 0.0.0.0 --port 9997

Xinference支持集群部署

主服务器启动 Supervisor

部署启动: xinference-supervisor -H 192.168.31.100 --port 9997

其他服务器启动 Worker

# 格式 xinference-worker -e "http://${主服务器IP}:9997" -H 当前服务器IP(子服务器IP) # 示例 xinference-worker -e "http://192.168.31.100:9997" -H 192.168.31.101

访问doc地址:http://localhost:9997/docs

(1)注册模型

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

(2)启动模型      

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

Langchain-chatchat

错误1

"C:\Users\Administrator\Desktop\Langchain-Chatchat-master\libs\chatchat-server\chatchat\webui_pages\kb_chat.py", line 118, in kb_chat kb_list = [x["kb_name"] for x in api.list_knowledge_bases()

{ "input": "The food was delicious and the waiter...", "model": "360Zhinao-search", "encoding_format": "float" }

注意注意:

请用pip list查看自己httpx版本,我发现最新httpx==0.28.0是不行的,需要0.27.2版本才可以,重新安装后就不会报错了

导致错误是

langchain-chatchat报错Client.__init__() got an unexpected keyword argument ‘proxies‘

错误2

RuntimeError: Cluster is not available after multiple attempts

主要由于启动ip地址host错误,突出表现为0.0.0.0地址,应该本地化使用127.0.0.1


http://www.mrgr.cn/news/89793.html

相关文章:

  • hive的几种复杂数据类型
  • 深度学习01 神经网络
  • 使用bucardo实现postgresql数据库双主同步
  • 一文速览DeepSeek-R1的本地部署——可联网、可实现本地知识库问答:包括671B满血版和各个蒸馏版的部署
  • 二分查找算法 (典型算法思想)—— OJ例题算法解析思路
  • MFC 学习笔记目录
  • 车型检测7种YOLOV8
  • 订单状态监控实战:基于 SQL 的状态机分析与异常检测
  • 制造业设备状态监控与生产优化实战:基于SQL的序列分析与状态机建模
  • Denavit-Hartenberg DH MDH坐标系
  • 深入解析 COUNT(DISTINCT) OVER(ORDER BY):原理、问题与高效替代方案
  • 芯片AI深度实战:让verilog不再是 AI 的小众语言
  • SQL进阶实战技巧:某芯片工厂设备任务排产调度分析 | 间隙分析技术应用
  • android 音视频系列引导
  • (●ˇ∀ˇ●)思维导图计划~~~
  • 【动态规划】杨表
  • Ollama 使用笔记
  • 傅立叶变换、拉普拉斯变换、Z 变换的联系是什么?为什么要进行这些变换?
  • FPGA自分频产生的时钟如何使用?
  • [实战]Ubuntu使用工具和命令无法ssh,但使用另一台Ubuntu机器可以用命令ssh,非root用户。