
# 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)
```
#### 问题4：ray多机执行时，参数量过大，会导致超时异常。伴随提示"If the execution is expected to take a long time, increase RAY_CGRAPH_get_timeout which is currently 10 seconds."
解决办法：
```
export RAY_CGRAPH_get_timeout=180
export HCCL_EXEC_TIMEOUT=700
export HCCL_CONNECT_TIMEOUT=700
```
