-
Notifications
You must be signed in to change notification settings - Fork 165
Minimax-M2 update for AMD GPU #215
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
Open
hyukjlee
wants to merge
3
commits into
vllm-project:main
Choose a base branch
from
hyukjlee:minimax-m2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−0
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| # MiniMax M2 on vLLM - AMD Hardware | ||
|
|
||
| ## Introduction | ||
|
|
||
| This quick start recipe explains how to run the MiniMax M2 model on AMD MI300X/MI355X GPUs using vLLM. | ||
|
|
||
| ## Key benefits of AMD GPUs on large models and developers | ||
|
|
||
| The AMD Instinct GPUs accelerators are purpose-built to handle the demands of next-gen models like MiniMax M2: | ||
| - Large HBM memory enables long-context inference and larger batch sizes. | ||
| - Optimized Triton and AITER kernels provide best-in-class performance and TCO for production deployment. | ||
|
|
||
| ## Access & Licensing | ||
|
|
||
| ### License and Model parameters | ||
|
|
||
| To use the MiniMax M2 model, please check whether you have access to the following model: | ||
| - [MiniMax M2](https://huggingface.co/MiniMaxAI/MiniMax-M2) | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - OS: Linux | ||
| - Drivers: ROCm 7.0 or above | ||
| - GPU: AMD MI300X, MI325X, and MI355X | ||
|
|
||
| ## Deployment Steps | ||
|
|
||
| ### 1. Using vLLM docker image (For AMD users) | ||
|
|
||
| ```bash | ||
| docker run -it \ | ||
| --network=host \ | ||
| --device=/dev/kfd \ | ||
| --device=/dev/dri \ | ||
| --group-add=video \ | ||
| --ipc=host \ | ||
| --cap-add=SYS_PTRACE \ | ||
| --security-opt seccomp=unconfined \ | ||
| --shm-size 32G \ | ||
| -v /data:/data \ | ||
| -v $HOME:/myhome \ | ||
| -w /myhome \ | ||
| --entrypoint /bin/bash \ | ||
| vllm/vllm-openai-rocm:latest | ||
| ``` | ||
| or you can use uv environment | ||
| > Note: The vLLM wheel for ROCm requires Python 3.12, ROCm 7.0, and glibc >= 2.35. If your environment does not meet these requirements, please use the Docker-based setup as described in the [documentation](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/#pre-built-images). | ||
| ```bash | ||
| uv venv | ||
| source .venv/bin/activate | ||
| uv pip install vllm --extra-index-url https://wheels.vllm.ai/rocm/ | ||
| ``` | ||
|
|
||
|
|
||
| ### 2. Start vLLM online server (run in background) | ||
|
|
||
| ```bash | ||
| export VLLM_ROCM_USE_AITER=1 | ||
| vllm serve MiniMaxAI/MiniMax-M2 \ | ||
| --tensor-parallel-size 4 \ | ||
| --tool-call-parser minimax_m2 \ | ||
| --reasoning-parser minimax_m2_append_think \ | ||
| --enable-auto-tool-choice \ | ||
| --trust-remote-code \ | ||
| --disable-log-requests & | ||
| ``` | ||
|
|
||
| ### 3. Performance benchmark | ||
|
|
||
| ```bash | ||
| export MODEL="MiniMaxAI/MiniMax-M2" | ||
| export ISL=1024 | ||
| export OSL=1024 | ||
| export REQ=10 | ||
| export CONC=10 | ||
|
Comment on lines
+71
to
+75
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To improve the clarity of the benchmark script, it would be beneficial to add a brief explanation for the environment variables - `ISL`: Input sequence length
- `OSL`: Output sequence length
- `REQ`: Number of prompts
- `CONC`: Maximum concurrency |
||
| vllm bench serve \ | ||
| --backend vllm \ | ||
| --model $MODEL \ | ||
| --dataset-name random \ | ||
| --random-input-len $ISL \ | ||
| --random-output-len $OSL \ | ||
| --num-prompts $REQ \ | ||
| --ignore-eos \ | ||
| --max-concurrency $CONC \ | ||
| --percentile-metrics ttft,tpot,itl,e2el | ||
| ``` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The introduction mentions support for
MI300X/MI355XGPUs, but the prerequisites section on line 24 also listsMI325X. For consistency, please update the introduction to include all supported GPU models.