1414## Prerequisites
1515
1616### Hardware Requirements
17+
1718- ** Recommended** : Huawei Ascend 910B/C (for optimal performance)
1819- ** Minimum** : Ascend 910A or Atlas A2 Series
1920- ** Memory** : ≥ 32GB HBM for fp32, ≥ 16GB for bfloat16
2021
2122### Software Requirements
23+
2224- vLLM Ascend runtime installed
2325- Python 3.9+
2426- vLLM >= 0.6.0
@@ -37,6 +39,32 @@ pip install vllm-ascend
3739python -c " import vllm; print(vllm.__version__)"
3840```
3941
42+ ### Environment Variables for Ascend NPU
43+
44+ ``` {test} bash
45+ :sync-yaml: tests/e2e/models/configs/chameleon-7b.yaml
46+ :sync-target: test_cases[0].envs
47+ :sync-class: env
48+
49+ export VLLM_ATTENTION_BACKEND=ascend
50+ export ENFORCE_EAGER=1
51+ ```
52+
53+ ### vLLM Serve Command
54+
55+ ``` {test} bash
56+ :sync-yaml: tests/e2e/models/configs/chameleon-7b.yaml
57+ :sync-target: test_cases[0].model test_cases[0].server_cmd
58+ :sync-class: cmd
59+
60+ vllm serve "facebook/chameleon-7b" \
61+ --dtype bfloat16 \
62+ --max-model-len 2048 \
63+ --gpu-memory-utilization 0.75 \
64+ --enforce-eager \
65+ --trust-remote-code
66+ ```
67+
4068## Quick Start: Text-Only Generation
4169
4270### 1. Basic Text Generation
@@ -280,18 +308,21 @@ outputs = llm.generate(["Prompt"], sampling_params)
280308## Important Notes for Ascend Deployment
281309
282310### Memory Considerations
311+
283312- ** Image Expansion** : Each image can expand to 500-2000 tokens depending on resolution
284313- ** Batch Processing** : Monitor total tokens (text + image tokens) not exceeding ` max_model_len `
285314- ** Mixed Precision** : Use bfloat16 to balance performance and memory usage
286315
287316### Known Limitations
317+
2883181 . ** enforce_eager=True required** : Graph compilation is not fully supported for Chameleon on Ascend
2893192 . ** Single-card inference** : Currently optimized for single-card; tensor parallelism experimental
2903203 . ** Image formats** : Supports JPEG, PNG, WebP (32KB-10MB recommended)
291321
292322### Troubleshooting
293323
294324** Issue: "CUDA out of memory"**
325+
295326``` python
296327# Solution: Reduce max_model_len or batch_size
297328llm = LLM(
@@ -302,6 +333,7 @@ llm = LLM(
302333```
303334
304335** Issue: Image token limit exceeded**
336+
305337``` python
306338# Resize images before inference
307339from PIL import Image
@@ -315,6 +347,7 @@ def resize_image(image_path: str, max_size: int = 1024) -> str:
315347```
316348
317349** Issue: Slow generation speed**
350+
318351``` python
319352# Check Ascend utilization and adjust batch size
320353import os
@@ -406,15 +439,16 @@ if __name__ == "__main__":
406439
407440## Additional Resources
408441
409- - ** HuggingFace Model Card** : https://huggingface.co/facebook/chameleon-7b
410- - ** vLLM Documentation** : https://docs.vllm.ai/
411- - ** vLLM Ascend Guide** : https://docs.vllm.ai/projects/ascend/
412- - ** Ascend CANN Toolkit** : https://www.hiascend.com/
413- - ** Chameleon Paper** : https://arxiv.org/abs/2405.09818
442+ - ** HuggingFace Model Card** : < https://huggingface.co/facebook/chameleon-7b >
443+ - ** vLLM Documentation** : < https://docs.vllm.ai/ >
444+ - ** vLLM Ascend Guide** : < https://docs.vllm.ai/projects/ascend/ >
445+ - ** Ascend CANN Toolkit** : < https://www.hiascend.com/ >
446+ - ** Chameleon Paper** : < https://arxiv.org/abs/2405.09818 >
414447
415448## Support & Feedback
416449
417450For issues or questions:
418- - ** GitHub Issues** : https://github.com/vllm-project/vllm-ascend/issues
419- - ** vLLM Community** : https://github.com/vllm-project/vllm/discussions
451+
452+ - ** GitHub Issues** : < https://github.com/vllm-project/vllm-ascend/issues >
453+ - ** vLLM Community** : < https://github.com/vllm-project/vllm/discussions >
420454
0 commit comments