-
Notifications
You must be signed in to change notification settings - Fork 250
[AMD][AgentX] MINIMAX-M3 FP4 MI355X agentX vLLM #2118
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
Merged
Merged
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
a007c03
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support
ajith-sirra-amd d6be9de
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Added PR Link
ajith-sirra-amd cdac231
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification.
ajith-sirra-amd 89daabe
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification.
ajith-sirra-amd c54a190
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification.
ajith-sirra-amd bf6d169
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification …
ajith-sirra-amd 8bf107f
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification …
ajith-sirra-amd 02cf9fd
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification.
ajith-sirra-amd 205732d
chore: remove LMCache backend from MiniMax-M3 FP4 MI355X agentic benc…
seungrokj ca7be40
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj 82466e2
chore: revert max-num-seqs to CONC and drop hybrid KV cache flag
seungrokj 4bff323
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Search Space Modification.
ajith-sirra-amd f341572
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Removing redundant prefix …
ajith-sirra-amd 4fc1965
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd 9f628cc
[AMD] MINIMAX-M3 FP4 vLLM Agentic Support. Modifying Search Space.
ajith-sirra-amd 7fad233
Merge branch 'amd/agentx-minimax-m3-vllm' of https://github.com/SemiA…
ajith-sirra-amd 7e8ccea
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd fe31146
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj 493a0cf
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd ccb54cd
fix(agentic): preserve matrix CPU DRAM value
cquil11 cf4bba6
fix(agentic): use explicit MI355X server port
cquil11 060ec35
fix(agentic): remove recipe env fallbacks
cquil11 f323281
Merge main into amd/agentx-minimax-m3-vllm
cquil11 e8ff5ba
fix(configs): restore indentation of dsv4 decode additional-settings
github-actions[bot] 794d8be
Merge branch 'main' into amd/agentx-minimax-m3-vllm
cquil11 35acdb8
Merge remote-tracking branch 'origin/main' into agent/batch-agentx-2118
cquil11 65bf052
Merge remote-tracking branch 'origin/main' into agent/batch-null-2118
cquil11 057392f
fix(changelog): omit null optional metadata
cquil11 c82e772
Merge remote-tracking branch 'origin/main' into amd/agentx-minimax-m3…
AjithSirra d01dc55
fix: support EVAL_ONLY mode in minimaxm3_fp4_mi355x.sh
AjithSirra 249bd2f
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Updating Docker Image
AjithSirra 104f024
fix: restore origin/main's dsv4-fp4-mi355x-sglang-disagg-agentic-hica…
AjithSirra 567b120
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Updating Docker Image
AjithSirra 8171219
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Updating Script to remove undefined…
AjithSirra be6d5a3
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Updating Script to remove undefined…
AjithSirra 280ba0b
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Updating Script to remove undefined…
AjithSirra 043c28f
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Updating Script. Adding Native vLLM…
AjithSirra 1d6be97
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Correcting Offload Backend name in …
AjithSirra 386232d
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Resolving conflict in Perf change log.
AjithSirra f95cc04
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd 9200893
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd 1b39283
[AgentX] MiniMax-M3 FP4 MI355X vLLM agentic: increase eval step limit…
seungrokj caab2a5
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj 840f173
fix
seungrokj 02f82bd
Merge branch 'amd/agentx-minimax-m3-vllm' of https://github.com/SemiA…
seungrokj 92f1554
swebench: expose SWEBENCH_AGENT_DEPLOYMENT_TIMEOUT for Modal sandbox …
seungrokj b8d00b4
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj ac3851b
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Removing unwanted CONC from list.
AjithSirra fb2b764
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd d932258
Merge branch 'amd/agentx-minimax-m3-vllm' of https://github.com/SemiA…
AjithSirra b63adf6
[AMD] [AGENTX] [MINIMAX-M3] [WIP] Filtering CONC Changes
AjithSirra 8d3f617
Merge branch 'main' into amd/agentx-minimax-m3-vllm
ajith-sirra-amd a67db65
Merge branch 'amd/agentx-minimax-m3-vllm' of https://github.com/SemiA…
AjithSirra 66edd30
[AMD] [AGENTX] [MINIMAX-M3] Fix tool-calling loops: keep <mm:think> a…
seungrokj 2c9ab1a
[AMD] [AGENTX] [MINIMAX-M3] Revert debug SWEBENCH_AGENT_FILTER plumbing
seungrokj ad45d03
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj f4cab2f
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj ed8d27e
[AMD] [AGENTX] [MINIMAX-M3] Force lm-eval framework for minimaxm3 age…
seungrokj 4aebb99
Merge branch 'main' into amd/agentx-minimax-m3-vllm
seungrokj 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,148 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| set -x | ||
|
|
||
| # Agentic trace replay benchmark for Minimax-M3 FP4 on MI355X using vLLM. | ||
| # | ||
| # Required env vars: | ||
| # MODEL, MODEL_PATH, TP, CONC, KV_OFFLOADING, KV_OFFLOAD_BACKEND, | ||
| # TOTAL_CPU_DRAM_GB, RESULT_DIR, DURATION, EP_SIZE, DP_ATTENTION | ||
|
|
||
| source "$(dirname "$0")/../../benchmark_lib.sh" | ||
|
|
||
| # Force the eval framework to lm-eval for this recipe. run_eval derives its | ||
| # default as swebench for agentic scenarios (scenario_default=swebench when | ||
| # IS_AGENTIC/SCENARIO_TYPE=agentic-coding), but EVAL_FRAMEWORK takes precedence | ||
| # over that default (benchmark_lib.sh: framework=${EVAL_FRAMEWORK:-...}), so | ||
| # setting it here makes the effective framework always lm-eval, never swebench. | ||
| export EVAL_FRAMEWORK="lm-eval" | ||
|
|
||
| check_env_vars MODEL TP CONC KV_OFFLOADING KV_OFFLOAD_BACKEND TOTAL_CPU_DRAM_GB RESULT_DIR DURATION EP_SIZE DP_ATTENTION | ||
|
|
||
| echo "MODEL=$MODEL TP=$TP CONC=$CONC KV_OFFLOADING=$KV_OFFLOADING TOTAL_CPU_DRAM_GB=$TOTAL_CPU_DRAM_GB RESULT_DIR=$RESULT_DIR DURATION=$DURATION EP_SIZE=$EP_SIZE DP_ATTENTION=$DP_ATTENTION" | ||
|
|
||
| PORT=8888 | ||
|
|
||
| if [[ -n "${SLURM_JOB_ID+x}" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on $SLURMD_NODENAME" | ||
| fi | ||
|
|
||
| # ROCR/HIP visibility for vLLM 0.14+ | ||
| if [[ -n "${ROCR_VISIBLE_DEVICES+x}" ]]; then | ||
| export HIP_VISIBLE_DEVICES="$ROCR_VISIBLE_DEVICES" | ||
| fi | ||
|
|
||
| if [[ -n "${MODEL_PATH:-}" ]]; then | ||
| if [[ ! -d "$MODEL_PATH" || -z "$(ls -A "$MODEL_PATH" 2>/dev/null)" ]]; then | ||
| hf download "$MODEL" --local-dir "$MODEL_PATH" | ||
| fi | ||
| else | ||
| hf download "$MODEL" | ||
| export MODEL_PATH="$MODEL" | ||
| fi | ||
|
|
||
| rocm-smi || true | ||
| amd-smi || true | ||
|
|
||
| resolve_trace_source | ||
| install_agentic_deps | ||
|
|
||
| # ---- Server config ---------------------------------------------------------- | ||
| SERVER_LOG="$RESULT_DIR/server.log" | ||
| LMCACHE_LOG="$RESULT_DIR/lmcache_server.log" | ||
| mkdir -p "$RESULT_DIR" | ||
|
|
||
| OFFLOAD_ARGS=(--no-enable-prefix-caching) | ||
|
|
||
| case "$KV_OFFLOAD_BACKEND" in | ||
| vllm-simple) | ||
| unset VLLM_USE_SIMPLE_KV_OFFLOAD | ||
| # Use vLLM's regular native KV-offload path (OffloadingConnector), | ||
| # NOT the SimpleCPUOffloadConnector. The "native" backend resolves to | ||
| # OffloadingConnector by default; setting VLLM_USE_SIMPLE_KV_OFFLOAD=1 | ||
| # would switch it to SimpleCPUOffloadConnector. We intentionally leave | ||
| # that env var UNSET here so the regular OffloadingConnector path is | ||
| # used. The shortcut --kv_offloading_backend native + --kv_offloading_size | ||
| # form constructs the KVTransferConfig at engine startup | ||
| # (vllm/config/vllm.py:662). | ||
|
|
||
| # Remove --disable-hybrid-kv-cache-manager and enable hybrid kv cache manager (default) | ||
| # This gives extra cache hit than disabling hybrid kv cache manager | ||
| OFFLOAD_ARGS=( | ||
| --kv_offloading_backend native | ||
| --kv_offloading_size "$TOTAL_CPU_DRAM_GB" | ||
| ) | ||
| ;; | ||
| esac | ||
|
|
||
| # ---- LLM server config ---------------------------------------------------------- | ||
| PARALLEL_ARGS=(--tensor-parallel-size "$TP") | ||
| if [ "${DP_ATTENTION}" = "true" ]; then | ||
| PARALLEL_ARGS=( | ||
| --tensor-parallel-size 1 | ||
| --data-parallel-size "$TP" | ||
| --enable-expert-parallel | ||
| ) | ||
| elif [ "$EP_SIZE" -gt 1 ]; then | ||
| PARALLEL_ARGS+=(--enable-expert-parallel) | ||
| fi | ||
|
|
||
| echo "Starting vllm server..." | ||
| export PYTHONNOUSERSITE=1 | ||
|
|
||
| export VLLM_ENGINE_READY_TIMEOUT_S=3600 | ||
| export VLLM_USE_BREAKABLE_CUDAGRAPH=0 | ||
| export VLLM_ROCM_USE_AITER=1 | ||
| export VLLM_ROCM_USE_AITER_MOE=1 | ||
| export VLLM_ROCM_USE_AITER_FUSION_SHARED_EXPERTS=1 | ||
| # INT4 quantized all-reduce for the (~1.5 MB) decode all-reduces, which are the | ||
| # single biggest decode kernel at high concurrency. The MIN_SIZE_KB override is | ||
| # required: vLLM's default INT4 quick-reduce size gate for (bf16, TP4) is 16 MB, | ||
| # so it never fires for decode-sized tensors without it. | ||
| export VLLM_ROCM_QUICK_REDUCE_QUANTIZATION=INT4 | ||
| export VLLM_ROCM_QUICK_REDUCE_CAST_BF16_TO_FP16=0 | ||
| export VLLM_ROCM_QUICK_REDUCE_QUANTIZATION_MIN_SIZE_KB=256 | ||
|
|
||
| VLLM_CMD=( | ||
| vllm serve "$MODEL_PATH" | ||
| --served-model-name "$MODEL" | ||
| --host 0.0.0.0 | ||
| --port "$PORT" | ||
| "${PARALLEL_ARGS[@]}" | ||
| --trust-remote-code | ||
| --block-size 128 | ||
| --gpu-memory-utilization 0.85 | ||
| --language-model-only | ||
| --attention-backend TRITON_ATTN | ||
| --moe-backend aiter | ||
| --kv-cache-dtype fp8 | ||
| --tool-call-parser minimax_m3 | ||
| --enable-auto-tool-choice | ||
| # NOTE: --reasoning-parser minimax_m3 is intentionally OMITTED. | ||
| # MiniMax-M3 is an interleaved-thinking model: its <mm:think>...</mm:think> | ||
| # block MUST be round-tripped back into the conversation history every turn | ||
| # or multi-turn quality collapses (the model loses its plan and degenerates | ||
| # into repeating the same command until the step limit -> empty patch). | ||
| # The reasoning parser moves <mm:think> out of message.content into the | ||
| # response-only reasoning_content field, which the mini-swe-agent/litellm | ||
| # OpenAI client does NOT resend. Leaving the parser off keeps the think block | ||
| # inline in message.content, so the client preserves it across turns. The | ||
| # tool-call parser above still extracts tool calls from the full output. | ||
| --max-num-seqs "$CONC" | ||
| "${OFFLOAD_ARGS[@]}" | ||
| ) | ||
| printf '%q ' "${VLLM_CMD[@]}" | tee "$RESULT_DIR/vllm_command.txt" | ||
| printf '\n' | tee -a "$RESULT_DIR/vllm_command.txt" | ||
| "${VLLM_CMD[@]}" > "$SERVER_LOG" 2>&1 & | ||
| SERVER_PID=$! | ||
| echo "Server PID: $SERVER_PID" | ||
|
|
||
| wait_for_server_ready --port "$PORT" --server-log "$SERVER_LOG" --server-pid "$SERVER_PID" | ||
|
|
||
| # ---- Run benchmark ---------------------------------------------------------- | ||
| if [ "${EVAL_ONLY}" = "true" ]; then | ||
| run_eval --port "$PORT" | ||
| else | ||
| build_replay_cmd "$RESULT_DIR" | ||
| run_agentic_replay_and_write_outputs "$RESULT_DIR" | ||
| 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
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.
Uh oh!
There was an error while loading. Please reload this page.