本地部署 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 配置好访问信息,

问它一个问题,

完结!

相关推荐
2601_967659915 小时前
2026年江西GEO系统贴牌服务商怎么选才稳妥
人工智能
外域速览6 小时前
2026世界动力电池大会今日宜宾启幕:固态电池从实验室走向量产,IEC 国际标准终结概念乱象
大数据·人工智能·microsoft
金智维科技官方6 小时前
财务核算如何提效?这三条核心链路正在加速自动化
运维·人工智能·ai·自动化·财务·智能体
Csvn6 小时前
第 16 章 多智能体 Multi-Agent
人工智能·aigc·agent
xsd202411186 小时前
从BEV感知透视3D检测
人工智能
Python大数据分析@6 小时前
推荐一个非常好用的画图skill-Archify
人工智能
小刘快学习6 小时前
一把钥匙开所有门:企业AI网关的统一身份与权限治理
大数据·人工智能
熊猫钓鱼>_>6 小时前
MiniMax 深度观察:不是又一个大模型,是AI生产效率的范式革新
人工智能·ai·自然语言处理·媒体·benchmark·minimax·行业
TechWayfarer6 小时前
Cloudflare 9·15新政倒计时:用IP风险画像识别AI爬虫,防止误伤Googlebot
网络·人工智能·爬虫·python·tcp/ip·网络安全
Anhty7 小时前
2026九月最新变声器测评:iOS安卓双端适配,低延迟运行更稳定
android·人工智能·功能测试·ios·智能手机