关于vllm【常见问题解决方案】

1、启动时报错

【1】

执行命令

powershell 复制代码
vllm serve /path/to/Qwen-2.5-7B-Instruct --served-model-name vllm --enable-prefix-caching --served-model-name Qwen-2.5-7B-Instruct

报错信息

powershell 复制代码
error: Failures have been detected while processing an MLIR pass pipeline
...
RuntimeError: PassManager::run failed

可能原因

这是 Triton 编译器 在生成 GPU 内核时失败,常见于:

1 Tesla T4(Compute Capability 7.5) 不支持某些 Triton 特性。

2 vLLM 版本 + Triton 版本不兼容。
解决方案

1 禁用 --enable-prefix-caching

powershell 复制代码
vllm serve /path/to/Qwen-2.5-7B-Instruct --served-model-name Qwen-2.5-7B-Instruct

【2】

执行命令

powershell 复制代码
vllm serve /path/to/Qwen2-7B-Instruct --served-model-name vllm --enable-prefix-caching --served-model-name Qwen2-7B-Instruct

报错信息

powershell 复制代码
CUDA out of memory. Tried to allocate 224.00 MiB.
GPU 0 has a total capacity of 14.58 GiB of which 161.38 MiB is free.

可能原因

因为你的 GPU无法加载 Qwen2-7B-Instruct 模型所需的全部显存。
解决方案

1 使用量化模型

使用 4-bit 量化模型(如 Qwen2-7B-Instruct-GPTQ 或 AWQ)。

相关推荐
垚森3 小时前
AI时代,让曾经的遗憾变成现实
ai
leonshi4 小时前
使用embedchain快速建立rag知识库,本地大模型
ai·rag·ollama
Darling噜啦啦6 小时前
拆解 LLM 的内部黑盒:从 Token 到 Self-Attention 的逐层解码之旅
llm·aigc
武子康11 小时前
调查研究-209 Apptronik Robot Park 深度解析:人形机器人竞争,开始拼“真实世界数据工厂“
人工智能·google·llm
doiito12 小时前
【Agent Harness】Gliding Horse 上下文感知与智能压缩:让 Agent 的“注意力”永不偏移
ai·rust·架构设计·系统设计·ai agent
orion571 天前
Missing Semester Class1:course overview and introduction of shell
linux
DigitalOcean1 天前
DigitalOcean 推出大模型自动化评估功能,上线前精准避坑
llm·agent
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
ch_09181 天前
从0构建SDK第3节:实现 ReActAgent 的推理与行动循环
typescript·llm·agent
得物技术1 天前
AI UITester:AI Native 的 UI 自动化测试新范式|得物技术
llm·aigc·测试