-
Notifications
You must be signed in to change notification settings - Fork 40
[feat](minimax): support minimax-2.5 in atom-vllm mode #545
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
PerryZhang01
wants to merge
1
commit into
main
Choose a base branch
from
minimax
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.
Open
Changes from all commits
Commits
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 |
|---|---|---|
|
|
@@ -703,4 +703,3 @@ jobs: | |
| docker rmi "${tag}" || true | ||
| done | ||
| fi | ||
|
|
||
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
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
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
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
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
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
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
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,78 @@ | ||
| # MiniMax-M2.5 with ATOM vLLM Plugin Backend | ||
|
|
||
| This recipe shows how to run `MiniMaxAI/MiniMax-M2.5` (HF `architectures[0]`: `MiniMaxM2ForCausalLM`, MoE + FP8 weights) with the ATOM vLLM plugin backend. For background on the plugin backend, see [ATOM vLLM Plugin Backend](../../docs/vllm_plugin_backend_guide.md). | ||
|
|
||
| The checkpoint uses custom modeling code; keep `--trust-remote-code` on the server command line. | ||
|
|
||
| ## Step 1: Pull the OOT Docker | ||
|
|
||
| ```bash | ||
| docker pull rocm/atom-dev:vllm-latest | ||
| ``` | ||
|
|
||
| ## Step 2: Launch vLLM Server | ||
|
|
||
| The ATOM vLLM plugin backend keeps the standard vLLM CLI, server APIs, and general usage flow compatible with upstream vLLM. For general server options and API usage, refer to the [official vLLM documentation](https://docs.vllm.ai/en/latest/). | ||
|
|
||
| The following matches the internal benchmark entry (`--kv_cache_dtype fp8 -tp 2 --trust-remote-code` in `.github/benchmark/models.json`). On multi-GPU hosts, use tensor parallel size 2 or adjust to your topology. | ||
|
|
||
| ```bash | ||
| vllm serve MiniMaxAI/MiniMax-M2.5 \ | ||
| --host localhost \ | ||
| --port 8000 \ | ||
| --async-scheduling \ | ||
| --tensor-parallel-size 2 \ | ||
| --trust-remote-code \ | ||
| --gpu_memory_utilization 0.9 \ | ||
| --compilation-config '{"cudagraph_mode": "FULL_AND_PIECEWISE"}' \ | ||
| --kv-cache-dtype fp8 \ | ||
| --no-enable-prefix-caching \ | ||
| --enforce-eager | ||
| ``` | ||
|
|
||
| Caveat: the upstream `config.json` may advertise MTP-related fields; the current ATOM `MiniMaxM2ForCausalLM` path targets the main transformer. If you hit load or shape errors around MTP modules, compare with native ATOM server behavior and upstream vLLM release notes. | ||
|
|
||
| ## Step 3: Performance Benchmark | ||
|
|
||
| ```bash | ||
| vllm bench serve \ | ||
| --host localhost \ | ||
| --port 8000 \ | ||
| --model MiniMaxAI/MiniMax-M2.5 \ | ||
| --dataset-name random \ | ||
| --random-input-len 8000 \ | ||
| --random-output-len 1000 \ | ||
| --random-range-ratio 0.8 \ | ||
| --max-concurrency 64 \ | ||
| --num-prompts 640 \ | ||
| --trust_remote_code \ | ||
| --percentile-metrics ttft,tpot,itl,e2el | ||
| ``` | ||
|
|
||
| ## Step 4: Accuracy Validation | ||
|
|
||
| Nightly OOT accuracy uses `gsm8k` with **3-shot** in `.github/scripts/atom_oot_test.sh` (same as other full-validation models). For a local check: | ||
|
|
||
| ```bash | ||
| lm_eval --model local-completions \ | ||
| --model_args model=MiniMaxAI/MiniMax-M2.5,base_url=http://localhost:8000/v1/completions,num_concurrent=64,max_retries=3,tokenized_requests=False,trust_remote_code=True \ | ||
| --tasks gsm8k \ | ||
| --num_fewshot 3 \ | ||
| --output_path ./lm_eval_minimax_m25_gsm8k | ||
| ``` | ||
|
|
||
| Reference metric (tracking baseline for this model family; replace with your run output and keep the raw JSON path next to the table): | ||
|
|
||
| - Internal tracking: `accuracy_baseline` **0.9401** for `MiniMaxAI/MiniMax-M2.5` in `.github/benchmark/models_accuracy.json` (see `_baseline_note` there for HF card context). | ||
| - OOT gate: `accuracy_test_threshold` **0.92** on `exact_match,flexible-extract` (see `atom-vllm-oot-test.yaml` nightly matrix). | ||
|
|
||
| Example table shape after `lm_eval` (fill `Value` / `Stderr` from your console or `${output_path}` JSON): | ||
|
|
||
| ```text | ||
| |Tasks|Version| Filter |n-shot| Metric | |Value | |Stderr| | ||
| |-----|------:|----------------|-----:|-----------|---|-----:|---|-----:| | ||
| |gsm8k| 3|flexible-extract| 3|exact_match|↑ |0.9287|± |0.0071| | ||
| | | |strict-match | 3|exact_match|↑ |0.9272|± |0.0072| | ||
| ``` | ||
|
|
||
| Raw results JSON: `<path-to-lm_eval-output-*.json>` (from `--output_path` above). |
Oops, something went wrong.
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.
Can we move this part of code and avoid adding too much vllm/sglang related codes in the ATOM core files?
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.
yea,
if is_vllm()will be deleted after vllm-atom using q,k,v rather than qkv.