大模型框架xinference的本地安装注意事项

pip install “xinference[all]”

问题

ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects

根据系统选择官方编译后的whl下载进行离线安装。

官方网址
https://github.com/abetlen/llama-cpp-python/releases

问题,cuda

sudo apt install nvidia-cuda-toolkit

启动

xinference-local --host 0.0.0.0 --port 9997

因为xinference默认的是从huggingface下载大模型,网络原因根本下载不下来,需要更换为国内的源,这样,上面那句命令就要变为:
XINFERENCE_MODEL_SRC=modelscope xinference-local --host 0.0.0.0 --port 9997
这样,下载源就换为阿里的源了,同时服务也开启了。
这时候你在浏览器打开http://host-ip:9997/应该可以看到xinference的界面了。
注意:windows中使用127.0.0.1

猜你喜欢

转载自blog.csdn.net/philosophyatmath/article/details/140956156