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

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.kler.cn/a/539825.html

相关文章:

  • 【人工智能】Python中的序列到序列(Seq2Seq)模型:实现机器翻译
  • UE5.5 PCGFrameWork--GPU CustomHLSL
  • Django操作指令大集合说明
  • 在 Ubuntu 上安装 MySQL 的详细指南
  • 苍穹外卖-新增菜品(阿里云OSS文件上传mybatis主键返回批量保存口味表数据)
  • windows10 wsa 安卓子系统终结版
  • 安全行业大模型SecLLM技术白皮书
  • Linux内核中的软中断与NAPI机制:高效处理网络数据包
  • PostgreSQL SQL优化用兵法,优化后提高 140倍速度
  • 快速上手Vim的使用
  • U3D支持webgpu阅读
  • DevOps的个人学习
  • matplotlib绘制三维曲面图时遇到的问题及解决方法
  • Ubuntu 20.04配置网络
  • 【东莞常平】戴尔R710服务器不开机维修分享
  • 数据库基础练习4(有关索引,视图完整解答)
  • 25/2/8 <机器人基础> 轨迹控制基本知识点,传动系统
  • 基于生成式语言模型岗位的就业指导
  • 云原生微服务
  • 深入解析 Sojson.v7 混淆加密技术(对比 Sojson.v6)
  • 免费PDF 转换成 Word、PPT、Excel 格式的工具
  • 蓝桥杯K倍区间(前缀和与差分,取模化简)
  • Ollama + AnythingLLM + Deepseek r1 实现本地知识库
  • iOS主要知识点梳理回顾-2-多线程
  • docker常用命令及案例
  • 【R语言】相关系数