Frequently Asked Questions
Installation-related Issues
Source Installation Error: ModuleNotFoundError: No module named 'mindspore'
Key error message:
Execute the following command to install vLLM-MindSpore Plugin:
git clone https://atomgit.com/mindspore/vllm-mindspore.git cd vllm-mindspore bash install_depend_pkgs.sh pip install .
But get the following error message:
ModuleNotFoundError: No module named 'mindspore'
Solution:
Please check if MindSpore is installed correctly. If not, please refer to the MindSpore installation guide or installation guide for installation, and confirm that
bash install_depend_pkgs.shhas been executed successfully.Please check if the
pipversion is greater than or equal to 25.3. If so, please use the following command to compile and install vLLM-MindSpore Plugin:git clone https://atomgit.com/mindspore/vllm-mindspore.git cd vllm-mindspore bash install_depend_pkgs.sh pip install --no-build-isolation .
Model-related Issues
Git-LFS Installation
Obtain the corresponding git-lfs installation package from the following link.
Download and install:
mkdir git-lfs cd git-lfs wget https://github.com/git-lfs/git-lfs/releases/download/v3.0.1/git-lfs-linux-arm64-v3.0.1.tar.gz --no-check-certificate tar zxvf git-lfs-linux-arm64-v3.0.1.tar.gz bash install.sh
Verify successful installation:
git lfs install
If
Git LFS initialized.is returned, the installation was successful.
Deployment-related Issues
aclnnNonzeroV2 Related Error When Starting Online Inference
Key error message:
RuntimeError: Call aclnnNonzeroV2 failed, detail:E39999: Inner Error
Solution: Check whether the CANN and MindSpore versions are correctly matched.
torch Not Found When Importing vllm_mindspore
Key error message:
importlib.metadata.PackageNotFoundError: No package metadata was found for torch
Solution:
vLLM-MindSpore Plugin related dependencies are not installed completely, such as missing
torch,MSAdapterand other components. Please refer to the installation guide for installation.
Inference Warning Related to vllm._C
Key warning message:
Failed to import from vllm._C with ModuleNotFoundError("No module named 'vllm._C'")Description: This warning does not affect inference and does not impact the offline inference of the model.
Out of Memory During Inference
Key error message: If the key message
Out of MemoryorAllocate memory failedappears, it indicates insufficient device memory.Solution: This error indicates that the device memory is insufficient and may be caused by several factors. It is recommended to investigate the following aspects:
Run the command
npu-smi infoto check whether the card is in exclusive mode. If not, try setting the card to exclusive mode.Verify whether the model parameters are too large, leading to insufficient memory. If so, try reducing the model parameters or using distributed inference.
For online inference, adjust the
--max-model-lenparameter to reduce the maximum model length and lower memory usage, or increase--gpu-memory-utilizationto improve GPU memory utilization.For offline inference, when initializing the
LLMobject, set themax_model_lenparameter to reduce the maximum model length, or increase thegpu_memory_utilizationparameter to raise GPU memory usage.Tune the hybrid parallelism strategy by appropriately increasing pipeline parallelism (pp) and model parallelism (mp) while correspondingly decreasing data parallelism (dp), ensuring
dp * mp * pp = device_num. Increase the number of NPUs if necessary.