部署ChatGLM6B模型过程

发布时间 2023-05-08 21:03:36作者: 流浪的夜空

背景

大语言模型的本地化部署尝试

步骤

  1. 下载项目
    下载页:https://github.com/josStorer/selfhostedAI/releases/tag/v2
    下载selfhostedAI-chatglm-6b-int4-widoowed-nvidia.7z.001-003压缩包

  2. 解压后,更新项目:
    update.bat

  3. 安装pytorch for gpu
    pip install torch1.13.1+cu117 torchvision0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117

  4. 启动
    chatglm-6b-int4.bat

  5. 启动成功

  6. 使用方法-使用chrome的插件
    下载地址:https://github.com/josStorer/chatGPTBox/releases/tag/v2.3.0
    下载chromium-without-katex-and-tiktoken.zip
    打开chrome的扩展管理,将解压的文件加载到插件系统中,在插件列表打开设置
    API模式-自定义模型
    模型名称-chatglm-6b-int4
    模型地址-http://localhost:8000/chat/completions
    就可以开始使用了