Xinference系列---【Windows在线如何安装Xinference?】

1.Xinference官网

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

2.按需安装

确定cuda是否安装,以及cuda的版本

#我的cuda是12.8版本
nvidia-smi

#安装pytorch
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

3.安装transformers引擎(流量消耗较大,时间比较长)

pip install "xinference[transformers]"

#如果报错:subprocess-exited-with-error 
pip install nes-py --no-cache-dir
pip install --upgrade pip setuptools wheel

也可以安装所有引擎
pip install "xinference[all]"

4.启动xinference

xinference-local --host 0.0.0.0 --port 9997

#windows系统安装命令
xinference-local --host 127.0.0.1 --port 9997

5.测试是否启动成功

浏览器地址栏:http://127.0.0.1:9997/ui,如下图,则说明安装成功。

posted on 2025-04-22 00:40  少年攻城狮  阅读(453)  评论(0)    收藏  举报

导航