-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
[ROCm][AITER] Support AITER Rope ops in RotaryEmbedding Module. #22521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request integrates AITensaR (AITER) Rotary Position Embedding (RoPE) operations for ROCm to improve performance. The changes look promising and the benchmark results are positive. I've found a critical bug that could lead to a runtime error and a typo in a function name that should be corrected for maintainability. Please see my detailed comments.
vllm/model_executor/layers/rotary_embedding/deepseek_scaling_rope.py
Outdated
Show resolved
Hide resolved
vllm/model_executor/layers/rotary_embedding/rocm_aiter_rope_ops.py
Outdated
Show resolved
Hide resolved
Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, can you merge from main to fix CI?
…-project#22521) Signed-off-by: vllmellm <vllm.ellm@embeddedllm.com> Signed-off-by: jingyu <jingyu@omniml.ai>
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
Integrate aiter rope ops in the RotaryEmbedding module, which boosts model performance.
Benchmark Results
meta-llama/Meta-Llama-3-8B-Instruct
deepseek-ai/DeepSeek-V2-Lite-Chat
IMPORTANT NOTE: You must use
--compilation-config '{ "custom_ops": ["+rotary_embedding"]}'
to enable this custom ops.benchmark setting
python vllm/benchmarks/benchmark_serving.py --backend vllm --model "$model_name" --dataset-name random --num-prompts 50 --request-rate 10 --random-input-len 1000 --random-output-len 1000
Test Plan
Test models that are afftected by this change, using lm_eval on gsm8k dataset.
environment setting
Step 1: run vllm serve
VLLM_USE_V1=1 VLLM_ROCM_USE_AITER=1 VLLM_ROCM_USE_AITER_RMSNORM=0 VLLM_ROCM_USE_AITER_LINEAR=0 SAFETENSORS_FAST_GPU=1
vllm serve $MODEL_NAME --compilation-config '{ "custom_ops": ["+rotary_embedding"]}' --trust-remote-code --swap-space 16 --distributed-executor-backend mp
Step 2: run lm_eval
lm_eval --model local-completions --tasks gsm8k --model_args model=$MODEL_NAME,base_url=http://localhost:8000/v1/completions --trust_remote_code --num_fewshot 5 --batch_size 256
Tested models:
meta-llama/Meta-Llama-3-8B-Instruct
(testsLlama3RotaryEmbedding
)deepseek-ai/DeepSeek-V2-Lite-Chat
(testsDeepseekScalingRotaryEmbedding
)tencent/Hunyuan-A13B-Pretrain
(testsDynamicNTKAlphaRotaryEmbedding
)NousResearch/Yarn-Mistral-7b-128k
(testsYaRNScalingRotaryEmbedding
)Qwen/Qwen3-235B-A22B-FP8
mistralai/Mixtral-8x7B-Instruct-v0.1
mistralai/Mistral-7B-Instruct-v0.1
Test Result
meta-llama/Meta-Llama-3-8B-Instruct
deepseek-ai/DeepSeek-V2-Lite-Chat (-tp 1)
tencent/Hunyuan-A13B-Pretrain (-tp 2)
NousResearch/Yarn-Mistral-7b-128k (-tp 2)
Qwen/Qwen3-235B-A22B-FP8
mistralai/Mixtral-8x7B-Instruct-v0.1
mistralai/Mistral-7B-Instruct-v0.1 (-tp 2)