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

推荐订阅源

K
Kaspersky official blog
T
Threat Research - Cisco Blogs
N
News and Events Feed by Topic
Hacker News: Ask HN
Hacker News: Ask HN
Project Zero
Project Zero
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 叶小钗
Security Latest
Security Latest
Spread Privacy
Spread Privacy
aimingoo的专栏
aimingoo的专栏
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
U
Unit 42
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Scott Helme
Scott Helme
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
T
The Blog of Author Tim Ferriss
A
About on SuperTechFans
爱范儿
爱范儿
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Schneier on Security
Schneier on Security
Latest news
Latest news
GbyAI
GbyAI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
PCI Perspectives
PCI Perspectives
Jina AI
Jina AI
AI
AI
NISL@THU
NISL@THU
I
Intezer
G
GRAHAM CLULEY
B
Blog
S
Secure Thoughts
IT之家
IT之家
宝玉的分享
宝玉的分享
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
V2EX - 技术
V2EX - 技术
Recorded Future
Recorded Future
Hacker News - Newest:
Hacker News - Newest: "LLM"

博客园 - 骨月枫🍁

记录个人数组、字符串自己常忘记的方法,以及ES常用处理方式 解决webpack vue 项目打包生成的文件,资源文件均404问题 js 复制粘贴功能记录 记录下工作中使用的pdf.js 记录下jplayer的简单demo js 函数节流 用ajax与fetch调用阿里云免费接口 简要谈谈javascript bind 方法 h5启动原生APP总结 mac上安装mongoDb以及简单使用 mac快捷键整理以及node的基本使用 html5视频video积累 整理下PC和移动获取点击、移动坐标的代码和坑 html5 实现简单的上传 canvas基础学习(四) canvas基础学习(三) canvas基础学习(二) canvas基础学习(一) 移动端使用百度分享代码
使用vLLM部署Qwen/Qwen3.5-35B-A3B-FP8并且在DIFY中调用
骨月枫🍁 · 2026-03-06 · via 博客园 - 骨月枫🍁

硬件配置

三块4090的显卡,CUDA版本为12.8,需要注意vllm需要在CUDA12.4-9的版本下运行,下面的命令要根据当前的CUDA版本来

image

screen使用

# 1. 查看会话
screen -ls

# 2. 连接到运行 Qwen2.5 的会话
screen -r qwen2.5-session

# 3. 在会话中停止服务(按 Ctrl + C)

# 4. 退出会话(Ctrl + A, D)

# 5. 可选:终止旧会话
screen -X -S qwen2.5-session quit

# 6. 创建新会话启动 Qwen3.6
screen -S qwen3.6-session
vllm serve Qwen/Qwen3.6-7B-Instruct --port 8000
# 按 Ctrl + A, D 分离

# 7. 验证服务
curl http://localhost:8000/health

模型部署

创建环境

这里使用conda创建一个新的python 虚拟环境(重要!!!一定是新的虚拟环境,python版本选择3.12)

# 创建虚拟环境
conda create -n vllm-qwen python=3.12 -y
# 激活环境
conda activate vllm-qwen

安装基础依赖

# 安装包管理工具
pip install uv
# 安装模型下载工具
uv pip install modelscope

安装vllm

# 先安装PyTorch(使用国内镜像),需要注意的是cu128对应cuda12.8的版本,如果是12.0则是cu129!!!!!!此处造成了我爬坑了半天!!!!!!
uv pip install torch -i https://mirrors.aliyun.com/pypi/simple/ --extra-index-url https://mirrors.aliyun.com/torch-cu128/
# 再安装vllm(不指定PyTorch索引)
uv pip install -U vllm --prerelease=allow \
  -i https://mirrors.aliyun.com/pypi/simple/ \
  --extra-index-url https://wheels.vllm.ai/nightly \
  --extra-index-url https://mirrors.aliyun.com/torch-cu128/ \
  --trusted-host mirrors.aliyun.com
# 验证vllm是否安装成功
pip show vllm

启动模型

此处注意--tensor-parallel-size的值需要被模型的内部维度(8192)整除,所以我有3块卡但也设置为2

# 充分利用算力
vllm serve $HOME/.cache/modelscope/hub/models/Qwen/Qwen3.5-35B-A3B-FP8     --port 8002     --tensor-parallel-size 2     --dtype auto     --max-model-len 32768     --max-num-seqs 1     --block-size 128     --served-model-name Qwen3.5-35B     --gpu-memory-utilization 0.9
# 最求性能,把max-model-len、block-size降低了
vllm serve $HOME/.cache/modelscope/hub/models/Qwen/Qwen3.5-35B-A3B-FP8 \
    --port 8002 \
    --tensor-parallel-size 2 \
    --dtype auto \
    --max-model-len 16384 \
    --max-num-seqs 1 \
    --block-size 16 \
    --served-model-name Qwen3.5-35B \
    --gpu-memory-utilization 0.8
# 目前公司使用
vllm serve $HOME/.cache/modelscope/hub/models/Qwen/Qwen3.5-35B-A3B-FP8     --port 8002     --tensor-parallel-size 2     --dtype auto     --max-model-len 32768     --max-num-seqs 1     --block-size 16     --served-model-name Qwen3.5-35B     --gpu-memory-utilization 0.8

vllm serve $HOME/.cache/modelscope/hub/models/Qwen/Qwen3.6-27B-FP8     --port 8002     --tensor-parallel-size 2     --dtype auto     --max-model-len 49152     --max-num-seqs 1     --block-size 16     --served-model-name Qwen3.6-27B-FP8     --gpu-memory-utilization 0.8

vllm serve $HOME/.cache/modelscope/hub/models/Qwen/Qwen3.6-35B-A3B-FP8 --port 8002 --tensor-parallel-size 4 --dtype auto --max-model-len 131072 --kv-cache-dtype fp8 --max-num-seqs 1 --block-size 16 --served-model-name Qwen3.6-35B-A3B-FP8 --gpu-memory-utilization 0.85 --enable-prefix-caching --language-model-only --trust-remote-code --enable-auto-tool-choice --tool-call-parser qwen3_coder

企业微信截图_1772798280451

 显示上述内容表示启动成功

DIFY配置

image