本地部署 mistralai/Mistral-Nemo-Instruct-2407

本地部署 mistralai/Mistral-Nemo-Instruct-2407

  • [1. 创建虚拟环境](#1. 创建虚拟环境)
  • [2. 安装 fschat](#2. 安装 fschat)
  • [3. 安装 transformers](#3. 安装 transformers)
  • [4. 安装 flash-attn](#4. 安装 flash-attn)
  • [5. 安装 pytorch](#5. 安装 pytorch)
  • [6. 启动 controller](#6. 启动 controller)
  • [7. 启动 mistralai/Mistral-Nemo-Instruct-2407](#7. 启动 mistralai/Mistral-Nemo-Instruct-2407)
  • [8. 启动 api](#8. 启动 api)
  • [9. 访问 mistralai/Mistral-Nemo-Instruct-2407](#9. 访问 mistralai/Mistral-Nemo-Instruct-2407)

1. 创建虚拟环境

复制代码
conda create -n fastchat python=3.10 -y
conda activate fastchat

2. 安装 fschat

复制代码
git clone https://github.com/lm-sys/FastChat.git; cd FastChat
pip install --upgrade pip  # enable PEP 660 support
pip install -e .

3. 安装 transformers

复制代码
# Until a new release has been made, you need to install transformers from source
pip install git+https://github.com/huggingface/transformers.git

4. 安装 flash-attn

复制代码
pip install packaging
pip uninstall -y ninja && pip install ninja
pip install flash-attn --no-build-isolation

5. 安装 pytorch

复制代码
pip install torch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 --index-url https://download.pytorch.org/whl/cu121

6. 启动 controller

复制代码
python -m fastchat.serve.controller

7. 启动 mistralai/Mistral-Nemo-Instruct-2407

复制代码
python -m fastchat.serve.model_worker --num-gpus 2 --model-names "mistral-7b,gpt-3.5-turbo,gpt-3.5-turbo-16k,gpt-4,text-davinci-003" --model-path mistralai/Mistral-Nemo-Instruct-2407 --controller http://localhost:21001 --port 31000 --worker-address http://localhost:31000 --max-gpu-memory 16Gib

8. 启动 api

复制代码
python -m fastchat.serve.openai_api_server --host 0.0.0.0 --port 8000

9. 访问 mistralai/Mistral-Nemo-Instruct-2407

使用 chatbox 配置好访问信息,

问它一个问题,

完结!

相关推荐
START_GAME17 小时前
语音合成系统---IndexTTS2:环境配置与实战
人工智能·语音识别
2501_9307992417 小时前
访答知识库#Pdf转word#人工智能#Al编辑器#访答RAG#企业知识库,个人知识库,本地知识库,访答编辑器,访答浏览器……
人工智能
max50060017 小时前
多GPU数据并行训练中GPU利用率不均衡问题深度分析与解决方案
人工智能·机器学习·分类·数据挖掘
老坛程序员17 小时前
Coze 与 n8n 深度对比:AI智能体平台与工作流自动化的核心博弈
运维·人工智能·自动化
AI人工智能+17 小时前
药品经营许可证识别技术:通过深度学习算法实现资质文件的自动化识别与核验
人工智能·深度学习·ocr·药品经营许可证识别
IT_陈寒18 小时前
Java性能调优:这5个被你忽略的JVM参数让你的应用吞吐量提升50%!
前端·人工智能·后端
国科安芯18 小时前
高辐射环境下AS32S601ZIT2型MCU的抗辐照性能与应用潜力分析
网络·人工智能·单片机·嵌入式硬件·fpga开发
无风听海18 小时前
神经网络之反向传播
人工智能·深度学习·神经网络
2501_9307992419 小时前
访答知识库#Pdf转word#人工智能#Al编辑器#访答RAG#企业知识库私,私有知识库,访答编辑器,个人知识库,云知识库,……
人工智能
学好statistics和DS20 小时前
【CV】神经网络中哪些参数需要被学习?
人工智能·神经网络·学习