文档首页/
AI开发平台ModelArts/
最佳实践/
LLM大语言模型推理/
主流开源大模型基于Lite Server适配Ascend-vLLM PyTorch NPU推理指导(6.5.906)/
附录/
Ascend-vLLM推理常见问题
更新时间:2025-08-27 GMT+08:00
Ascend-vLLM推理常见问题
问题1:在推理预测过程中遇到NPU out of memory
解决方法:调整推理服务启动时的显存利用率,将--gpu-memory-utilization的值调小。
问题2:在推理预测过程中遇到ValueError:User-specified max_model_len is greater than the drived max_model_len
解决方法:
export VLLM_ALLOW_LONG_MAX_MODEL_LEN=1
允许传入大于模型config.json 中的序列最大值。
问题3:使用离线推理时,性能较差或精度异常
解决方法:将block_size大小设置为128
from vllm import LLM, SamplingParams llm = LLM(model="facebook/opt-125m", block_size=128)
父主题: 附录