Skip to content

Commit bf214fe

Browse files
committed
fix pre-commit errors due to markdownlint and mypy
Signed-off-by: tjtanaavllm <tunjian.tan@amd.com>
1 parent ff6f3e3 commit bf214fe

4 files changed

Lines changed: 20 additions & 4 deletions

File tree

ROCm_performance.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# Overview of the optional performance features uinque to https://github.com/ROCm/vllm
1+
# Overview of the optional performance features unique to <https://github.com/ROCm/vllm>
22

33
## Triton attention
4-
The default attention function on ROCm is using triton attention kernel. To fallback to the https://github.com/ROCm/flash-attention implementation set up the following environment symbol:
4+
5+
The default attention function on ROCm is using triton attention kernel. To fallback to the <https://github.com/ROCm/flash-attention> implementation set up the following environment symbol:
56
`VLLM_USE_TRITON_FLASH_ATTN=0`
67

78
## Tunable ops
9+
810
Pytorch tunable ops are supported.
911
Define the following environment symbol: `PYTORCH_TUNABLEOP_ENABLED=1` in order to enable both the runtime tuning and the subsequent use of tuned results. To only use the tuned results without tuning any newly encountered shapes, set `PYTORCH_TUNABLEOP_TUNING=0`
1012

docs/dev-docker/README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Supermicro AS-8125GS-TNMR2 with 2x AMD EPYC 9575F Processors, 2.25 TiB RAM, 8x A
101101

102102
The vllm-dev docker image should work with any model supported by vLLM. When running with FP8, AMD has quantized models available for a variety of popular models, or you can quantize models yourself using Quark. If needed, the vLLM benchmark scripts will automatically download models and then store them in a Hugging Face cache directory for reuse in future tests. Alternatively, you can choose to download the model to the cache (or to another directory on the system) in advance.
103103

104-
Many HuggingFace models, including Llama-3.1, have gated access. You will need to set up an account at (https://huggingface.co), search for the model of interest, and request access if necessary. You will also need to create a token for accessing these models from vLLM: open your user profile (https://huggingface.co/settings/profile), select "Access Tokens", press "+ Create New Token", and create a new Read token.
104+
Many HuggingFace models, including Llama-3.1, have gated access. You will need to set up an account at <https://huggingface.co>, search for the model of interest, and request access if necessary. You will also need to create a token for accessing these models from vLLM: open your user profile <https://huggingface.co/settings/profile>, select "Access Tokens", press "+ Create New Token", and create a new Read token.
105105

106106
### System optimization
107107

@@ -207,6 +207,7 @@ export VLLM_USE_TRITON_FLASH_ATTN=0
207207
vLLM provides a number of engine options which can be changed to improve performance. Refer to the [vLLM Engine Args](https://docs.vllm.ai/en/stable/usage/engine_args.html) documentation for the complete list of vLLM engine options.
208208

209209
Below is a list of a few of the key vLLM engine arguments for performance; these can be passed to the vLLM benchmark scripts:
210+
210211
- **--max-model-len** : Maximum context length supported by the model instance. Can be set to a lower value than model configuration value to improve performance and gpu memory utilization.
211212
- **--max-num-batched-tokens** : The maximum prefill size, i.e., how many prompt tokens can be packed together in a single prefill. Set to a higher value to improve prefill performance at the cost of higher gpu memory utilization. 65536 works well for LLama models.
212213
- **--max-num-seqs** : The maximum decode batch size (default 256). Using larger values will allow more prompts to be processed concurrently, resulting in increased throughput (possibly at the expense of higher latency). If the value is too large, there may not be enough GPU memory for the KV cache, resulting in requests getting preempted. The optimal value will depend on the GPU memory, model size, and maximum context length.
@@ -450,6 +451,7 @@ You should see some performance improvement about the e2e latency.
450451
`rocm/vllm-dev:main` image has experimental [AITER](https://github.com/ROCm/aiter) support, and can yield siginficant performance increase for some model/input/output/batch size configurations. To enable the feature make sure the following environment is set: `VLLM_ROCM_USE_AITER=1`, the default value is `0`. When building your own image follow the [Docker build steps](#Docker-manifest) using the [aiter_integration_final](https://github.com/ROCm/vllm/tree/aiter_integration_final) branch.
451452

452453
Some use cases include:
454+
453455
- amd/Mixtral-8x7B-Instruct-v0.1-FP8-KV
454456
- amd/Mixtral-8x22B-Instruct-v0.1-FP8-KV
455457

@@ -511,45 +513,55 @@ Use AITER release candidate branch instead:
511513
## Changelog
512514

513515
20250605_aiter:
516+
514517
- Updated to ROCm 6.4.1 and vLLM v0.9.0.1
515518
- AITER MHA
516519
- IBM 3d kernel for unified attention
517520
- Full graph capture for split attention
518521

519522
20250521_aiter:
523+
520524
- AITER V1 engine performance improvement
521525

522526
20250513_aiter:
527+
523528
- Out of memory bug fix
524529
- PyTorch fixes
525530
- Tunable ops fixes
526531

527532
20250410_aiter:
533+
528534
- 2-stage MoE
529535
- MLA from AITER
530536

531537
20250325_aiter:
538+
532539
- Improved DeepSeek-V3/R1 performance
533540
- Initial Gemma-3 enablement
534541
- Detokenizer disablement
535542
- Torch.compile support
536543

537544
20250305_aiter:
545+
538546
- AITER improvements
539547
- Support for FP8 skinny GEMM
540548

541549
20250207_aiter:
550+
542551
- More performant AITER
543552
- Bug fixes
544553

545554
20250205_aiter:
555+
546556
- [AITER](https://github.com/ROCm/aiter) support
547557
- Performance improvement for custom paged attention
548558
- Reduced memory overhead bug fix
549559

550560
20250124:
561+
551562
- Fix accuracy issue with 405B FP8 Triton FA
552563
- Fixed accuracy issue with TP8
553564

554565
20250117:
566+
555567
- [Experimental DeepSeek-V3 and DeepSeek-R1 support](#running-deepseek-v3-and-deepseek-r1)

vllm/model_executor/layers/quantization/fp8.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ def process_weights_after_loading(self, layer: Module) -> None:
784784

785785
# TODO (rob): refactor block quant into separate class.
786786
if self.block_quant:
787+
assert self.quant_config.weight_block_size is not None
787788
assert self.quant_config.activation_scheme == "dynamic"
788789
if current_platform.is_fp8_fnuz():
789790
w13_weight, w13_weight_scale_inv, w13_input_scale = \

vllm/model_executor/layers/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def cpu_unquantized_gemm(layer: torch.nn.Module,
145145

146146

147147
def dispatch_unquantized_gemm() -> Callable[
148-
[torch.Tensor, torch.Tensor, Optional[torch.Tensor]], torch.Tensor]:
148+
[torch.nn.Module, torch.Tensor, torch.Tensor, Optional[torch.Tensor]],
149+
torch.Tensor]:
149150
if current_platform.is_rocm():
150151
return rocm_unquantized_gemm_wrapper()
151152
elif current_platform.is_cpu():

0 commit comments

Comments
 (0)