xinference 部署

1. 参考 https://blog.csdn.net/m0_60791400/article/details/140023407 搭建 xinference 服务

2.启动xinference

  1)进入 xinference 的conda环境

  2)xinference-local --host 0.0.0.0 --port 9997

2.注册本地模型 json文件, 

  1)文件名:custom-glm4-chat.json

  2)  修改 model_uri 为本地模型地址

  3) 将本json文件放到 下载的本地模型文件中

  4) 进入 xinference 的conda环境中执行 --- 

      (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

  5) 在页面 localhost:9997 中就可以找到加载的本地模型了

      

posted @ 2024-12-24 10:20  林**  阅读(1251)  评论(0)    收藏  举报