惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
人人都是产品经理
人人都是产品经理
G
GRAHAM CLULEY
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
L
LangChain Blog
AWS News Blog
AWS News Blog
V
Vulnerabilities – Threatpost
博客园 - 司徒正美
Last Week in AI
Last Week in AI
P
Privacy International News Feed
C
CERT Recently Published Vulnerability Notes
Simon Willison's Weblog
Simon Willison's Weblog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
Schneier on Security
Y
Y Combinator Blog
月光博客
月光博客
博客园 - Franky
T
Threatpost
Security Latest
Security Latest
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
T
The Exploit Database - CXSecurity.com
A
About on SuperTechFans
I
Intezer
C
CXSECURITY Database RSS Feed - CXSecurity.com
C
Cisco Blogs
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Know Your Adversary
Know Your Adversary
IT之家
IT之家
D
Docker
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
NISL@THU
NISL@THU
博客园 - 三生石上(FineUI控件)
L
Lohrmann on Cybersecurity
小众软件
小众软件
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Google DeepMind News
Google DeepMind News
爱范儿
爱范儿
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Engineering at Meta
Engineering at Meta

博客园 - yi-sheng

国产曦云C500双卡vllm框架本地部署qwen3.6-35B模型 国产曦云C500驱动安装 国产曦云C500双卡本地部署qwen3.6-35B模型 NVIDIA GeForce RTX 3080 魔改20G 运行大模型 FusionXpark_GB10救砖教程 ARM 架构NVIDIA GB10 Grace Blackwell环境中部署 Qwen3.6-35B 推理服务 Rufus的4.4制作ubuntu-24.04.4安装U盘 常用办公终端NEC 莱斯双盘位桌面存储阵列2代-LaCie 2big v2设置RAID1 常用办公终端配置信息 H3C LinSeer MegaCube灵犀MegaCube工作站使用笔记 4090多卡使用sglang推理框架docker布署qwen3.6-35B 国产曦云C500双卡本地部署qwen3.5-35B模型 国产GPU沐曦GPU系统曦云C500体验笔记 ARM 架构NVIDIA GB10 Grace Blackwell 芯片环境下安装conda FusionXpark GB10盒子开箱笔记 Python 3.11.6 + Oracle 11g​开发环境配置 MCP开发技巧:静态参数作为行为提醒(Reminder Pattern) Teachable Machine安装 Qwen2.5-1.5B + LoRA 单张显卡 微调实战 Qwen2.5-1.5B + LoRA 微调实战 大模型基建实战:使用序列猴子数据集定制 BPE Tokenizer 老年小龙虾soul.md示例 小龙虾本地算力RTX 4090 (24G) 四卡本地SGLang框架跑qwen3.5-35B模型 MCP工具粒度的权衡 DELL XPS 13-7390 重装系统方法 搭建私有 Matrix 聊天服务器 OpenClaw小龙虾软件原理解析 小龙虾本地算力 RTX 4090 (24G) 四卡本地运行 Qwen2.5-27B​ 模型 OpenClaw 飞书平台配置指南 MacBook Air A1534 系统安装指南:从 macOS 到 Windows
低幻觉医疗大模型Baichuan-M2-32B本地部署笔记
yi-sheng · 2026-03-24 · via 博客园 - yi-sheng

本次使用

RTX 4090 (24G) 四卡,SGLang框架,来布 百川医疗大模型

1. 显卡驱动和CUDA验证

# 验证NVIDIA驱动状态
nvidia-smi

# 实时监控GPU使用情况(新开终端执行)
watch -n 1 nvidia-smi

# 验证CUDA安装
nvcc -V

2. Conda环境管理

# 验证Conda版本
conda --version

# 列出所有已创建的Conda环境
conda env list
# 或
conda info --envs

# 删除已存在的环境(如需要)
conda env remove -n conda_baichuan_m2_32b_202512

# 创建新的Python环境
conda create -n conda_baichuan_m2_32b_202512 python=3.10 
# 激活环境
conda activate conda_baichuan_m2_32b_202512

3. PyTorch安装

根据CUDA版本安装对应的PyTorch:

# CUDA 12.1
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

# CUDA 12.2  
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu122

# 验证Torch GPU支持
python3 -c "import torch; print('PyTorch版本:', torch.__version__); print('CUDA可用:', torch.cuda.is_available()); print('CUDA版本:', torch.version.cuda); print('GPU设备:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None'); print('GPU数量:', torch.cuda.device_count());"

4. 模型下载与部署

# 使用ModelScope下载模型前,先安装modelscope
pip3 install modelscope


#下载模型   #若不指定--local_dir,则默认下载到/home/admin1/.cache/modelscope/hub/models/

modelscope download --model baichuan-inc/Baichuan-M2-32B --local_dir /mnt/raid1/modelscope/baichuan-m2-32b-202512


安装 SGLang前先装FlashInfer

我这本地环境配置(PyTorch 2.5.1+cu121, CUDA 12.1),准备使用 FlashInfer 官方提供的预编译索引进行安装,以避免首次运行时漫长的 JIT 编译。

pip3 install flashinfer-python -i https://flashinfer.ai/whl/cu121/torch2.5

安装完成后,运行以下命令验证是否成功:

python -c "import flashinfer; print(flashinfer.__version__)"

遇网络卡慢,用方案二:离线下载 + 本地安装(针对网络极差环境)
如果方案一仍慢,直接去 GitHub Releases 页面手动下载 .whl文件,然后本地安装。
下载文件:根据你的环境(CUDA 12.1 + Torch 2.5),直接访问链接:
https://github.com/flashinfer-ai/flashinfer/releases/download/v0.2.5/flashinfer_python-0.2.5%2Bcu121torch2.5-cp38-abi3-linux_x86_64.whl
(使用浏览器或 wget下载,通常浏览器下载速度更快)
或者跨克网盘下载:我用夸克网盘给你分享了「flashinfer_python-0.2.5+cu121torch2.5-cp38-abi3-linux_x86_64.whl」,/~f5d33MC9i3~:/   链接:https://pan.quark.cn/s/2ddd5946e20c?pwd=xMPh提取码:xMPh

本地安装:将下载的 .whl文件上传到服务器,执行:
pip3 install /mnt/raid1/python_pip_down/flashinfer_python-0.2.5+cu121torch2.5-cp38-abi3-linux_x86_64.whl


安装 SGLang (安装 [all]变体,包含 GPU 加速与完整依赖)

pip3 install "sglang[all]" -i https://pypi.tuna.tsinghua.edu.cn/simple

 启动

CUDA_VISIBLE_DEVICES=0,1,2,3 python -m sglang.launch_server \
--model-path /mnt/raid1/modelscope/baichuan-m2-32b-202512 \
--served-model-name Baichuan-M2-32B \
--host 0.0.0.0 \
--port 8700 \
--tp-size 4 \
--mem-fraction-static 0.8 \
--context-length 32768 \
--reasoning-parser qwen3

关闭进程。批量杀进程

后台执行

# 1. 后台启动模型服务

nohup bash run_baichuan-m2-32b_202512.sh > baichuan35b.log 2>&1 &

# 2. 实时监控日志(新开一个终端窗口)