-
Notifications
You must be signed in to change notification settings - Fork 230
Add Kimi K2.6 NVFP4 B300 EAGLE3 AgentX benchmark / 新增 Kimi K2.6 NVFP4 B300 EAGLE3 AgentX 基准测试 #2228
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
cquil11
wants to merge
9
commits into
main
Choose a base branch
from
agent/reopen-pr-2158
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.
+155
−0
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2cd64c3
Revert "Revert "Add Kimi K2.6 NVFP4 B300 EAGLE3 AgentX benchmark / 新增…
cquil11 ce4ead0
fix(kimik2.6-b300-mtp): use corrected EAGLE 3.1 head
cquil11 d4992fd
Merge branch 'main' into agent/reopen-pr-2158
cquil11 3892932
Restore append-only changelog history
cquil11 af29b0b
fix(kimik2.6-b300-mtp): reduce GMU to 0.85 for DCP+no-offload to avoi…
xinli-sw a552661
Merge branch 'main' into agent/reopen-pr-2158
xinli-sw 1241205
fix(perf-changelog): restore trailing whitespace
xinli-sw 6865c3d
Merge branch 'main' into agent/reopen-pr-2158
cquil11 38c7812
fix(perf-changelog): restore final newline
cquil11 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
130 changes: 130 additions & 0 deletions
130
benchmarks/single_node/agentic/kimik2.5_fp4_b300_mtp.sh
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,130 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
| set -x | ||
|
|
||
| source "$(dirname "$0")/../../benchmark_lib.sh" | ||
|
|
||
| check_env_vars MODEL TP CONC KV_OFFLOADING TOTAL_CPU_DRAM_GB RESULT_DIR DURATION | ||
|
|
||
|
|
||
| if [[ -n "${SLURM_JOB_ID:-}" ]]; then | ||
| echo "JOB $SLURM_JOB_ID running on ${SLURMD_NODENAME:-unknown}" | ||
| fi | ||
|
|
||
| DRAFT_MODEL="lightseekorg/kimi-k2.6-eagle3.1-mla" | ||
|
|
||
| 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 | ||
| DRAFT_MODEL_PATH="/data/models/${DRAFT_MODEL##*/}" | ||
| if [[ ! -d "$DRAFT_MODEL_PATH" || -z "$(ls -A "$DRAFT_MODEL_PATH" 2>/dev/null)" ]]; then | ||
| hf download "$DRAFT_MODEL" --local-dir "$DRAFT_MODEL_PATH" | ||
| fi | ||
| else | ||
| hf download "$MODEL" | ||
| export MODEL_PATH="$MODEL" | ||
| hf download "$DRAFT_MODEL" | ||
| DRAFT_MODEL_PATH="$DRAFT_MODEL" | ||
| fi | ||
| nvidia-smi | ||
|
|
||
| resolve_trace_source | ||
| install_agentic_deps | ||
|
|
||
| SERVER_LOG="$RESULT_DIR/server.log" | ||
| mkdir -p "$RESULT_DIR" | ||
|
|
||
| SERVER_PID="" | ||
|
|
||
| cleanup_agentic_services() { | ||
| local exit_code=$? | ||
| trap - EXIT INT TERM | ||
| set +e | ||
| stop_background_process_tree "$SERVER_PID" "vLLM server" 60 | ||
| exit "$exit_code" | ||
| } | ||
| trap cleanup_agentic_services EXIT | ||
| trap 'exit 130' INT | ||
| trap 'exit 143' TERM | ||
|
|
||
| DCP_SIZE="${DCP_SIZE:-1}" | ||
| DCP_ARGS=() | ||
| if [[ "$DCP_SIZE" -gt 1 ]]; then | ||
| DCP_ARGS+=(--decode-context-parallel-size "$DCP_SIZE" --dcp-comm-backend a2a) | ||
| NUM_SPEC_TOKENS=3 | ||
| SYNTHETIC_ACCEPT_LEN=2.88 | ||
| SPEC_ARGS=(--speculative-config "{\"method\":\"eagle3\",\"model\":\"$DRAFT_MODEL_PATH\",\"num_speculative_tokens\":$NUM_SPEC_TOKENS,\"rejection_sample_method\":\"synthetic\",\"synthetic_acceptance_length\":$SYNTHETIC_ACCEPT_LEN,\"attention_backend\":\"TOKENSPEED_MLA\"}") | ||
| ATTN_CONFIG='{"mla_prefill_backend":"TOKENSPEED_MLA"}' | ||
| COMPILATION_CONFIG='{"pass_config":{"fuse_allreduce_rms":false}}' | ||
| else | ||
| NUM_SPEC_TOKENS=4 | ||
| SYNTHETIC_ACCEPT_LEN=3.24 | ||
| SPEC_ARGS=(--speculative-config "{\"method\":\"eagle3\",\"model\":\"$DRAFT_MODEL_PATH\",\"num_speculative_tokens\":$NUM_SPEC_TOKENS,\"rejection_sample_method\":\"synthetic\",\"synthetic_acceptance_length\":$SYNTHETIC_ACCEPT_LEN}") | ||
| ATTN_CONFIG='{"mla_prefill_backend":"TRTLLM_RAGGED","use_prefill_query_quantization":true}' | ||
| COMPILATION_CONFIG='{"cudagraph_mode":"FULL_AND_PIECEWISE","custom_ops":["all"]}' | ||
| fi | ||
| ATTN_BACKEND_ARGS=(--attention-backend TOKENSPEED_MLA) | ||
|
|
||
| OFFLOAD_ARGS=() | ||
|
|
||
| if agentic_kv_offload_enabled; then | ||
| case "$KV_OFFLOAD_BACKEND" in | ||
| native) | ||
| export VLLM_USE_SIMPLE_KV_OFFLOAD=1 | ||
| CPU_OFFLOAD_BYTES=$((TOTAL_CPU_DRAM_GB * 1024 * 1024 * 1024)) | ||
| OFFLOAD_ARGS=( | ||
| --disable-hybrid-kv-cache-manager | ||
| --kv-transfer-config | ||
| "{\"kv_connector\":\"SimpleCPUOffloadConnector\",\"kv_role\":\"kv_both\",\"kv_connector_extra_config\":{\"cpu_bytes_to_use\":$CPU_OFFLOAD_BYTES,\"lazy_offload\":false}}" | ||
| ) | ||
| ;; | ||
| *) echo "Error: unsupported KV_OFFLOAD_BACKEND value '$KV_OFFLOAD_BACKEND' with EAGLE3 (expected: native)" >&2; exit 1 ;; | ||
| esac | ||
| fi | ||
|
|
||
|
|
||
| GMU=0.90 | ||
| if [[ "$DCP_SIZE" -gt 1 && "$KV_OFFLOADING" == "none" ]]; then | ||
| GMU=0.85 | ||
| fi | ||
|
|
||
| echo "Starting vllm server..." | ||
| export PYTHONNOUSERSITE=1 | ||
|
|
||
| export VLLM_FLASHINFER_ALLREDUCE_BACKEND=trtllm | ||
|
|
||
| { set +x; } 2>/dev/null | ||
| VLLM_CMD=( | ||
| vllm serve "$MODEL_PATH" --served-model-name "$MODEL" | ||
| --host 0.0.0.0 | ||
| --port "$PORT" | ||
| --kv-cache-dtype fp8 | ||
| --trust-remote-code | ||
| --block-size 64 | ||
| --language-model-only | ||
| --gpu-memory-utilization "$GMU" | ||
| --max-num-seqs "$CONC" | ||
| "${ATTN_BACKEND_ARGS[@]}" | ||
| --attention-config "$ATTN_CONFIG" | ||
| --compilation-config "$COMPILATION_CONFIG" | ||
| --max-cudagraph-capture-size 2048 | ||
| --max-num-batched-tokens 16384 | ||
| --stream-interval 10 | ||
| --enable-prefix-caching | ||
| --tensor-parallel-size "$TP" | ||
| "${SPEC_ARGS[@]}" | ||
| "${DCP_ARGS[@]}" | ||
| "${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" | ||
|
|
||
| build_replay_cmd "$RESULT_DIR" | ||
|
|
||
| run_agentic_replay_and_write_outputs "$RESULT_DIR" | ||
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
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 new EAGLE3 MTP agentic script (
kimik2.5_fp4_b300_mtp.sh) sets--language-model-onlybut never passes--tool-call-parser kimi_k2or--reasoning-parser kimi_k2, unlike every other agentic vLLM script for this model family (e.g.kimik2.5_fp4_b300.sh:65-66,kimik2.5_fp4_b200.sh:175-176). Since this is a tool-calling AgentX benchmark, vLLM won't parse tool calls/reasoning content from the model's output during replay, which can break or invalidate the benchmark.Extended reasoning...
The bug:
benchmarks/single_node/agentic/kimik2.5_fp4_b300_mtp.shbuilds itsVLLM_CMDarray (lines 87-107) with--language-model-onlybut omits--tool-call-parser kimi_k2and--reasoning-parser kimi_k2. This script serves the model for an agentic-coding (tool-use) AgentX replay viabuild_replay_cmd/run_agentic_replay_and_write_outputs, which drives/v1/chat/completionsrequests against theinferencex-agentx-mvptool-calling trace corpus.Established pattern this diverges from: every sibling agentic vLLM script for a tool-calling model sets both parser flags. The closest sibling,
kimik2.5_fp4_b300.sh:65-66(same Kimi K2 family, same B300 SKU, same agentic-coding scenario, non-speculative variant of this exact recipe), sets--reasoning-parser kimi_k2 --tool-call-parser kimi_k2.kimik2.5_fp4_b200.sh:175-176and the int4 Kimi variants do the same. Critically,minimaxm3_fp8_h100.sh:106,109-110combines--language-model-onlyWITH--tool-call-parser minimax_m3 --reasoning-parser minimax_m3(plus--enable-auto-tool-choice) — proving--language-model-only(which disables the vision tower / non-LM submodules) does not replace or preclude the tool-call/reasoning parser flags. The new MTP script appears to be a derivative ofkimik2.5_fp4_b300.shthat dropped these two flags during the EAGLE3/DCP rework.Why nothing else catches this: the script has no validation that parser flags are set when the scenario is agentic-coding;
check_env_varsonly checks that required env vars exist, not that the constructedVLLM_CMDincludes tool/reasoning parsing. The server will start successfully and passwait_for_server_readyregardless, so the omission is silent until requests carryingtools/tool_choiceare replayed.Impact: without
--tool-call-parser kimi_k2, vLLM either (a) rejectstool_choice-bearing chat-completions requests outright, or (b) accepts them but never structures the model's tool-call text intotool_calls, degrading the trace replay into plain text completion. Sincebenchmark_lib.shenforces a 10% failed-request threshold for the sweep, case (a) would push a tool-calling-heavy trace over that threshold and fail the run; case (b) would silently produce throughput numbers for a benchmark that no longer measures actual tool-calling behavior, defeating the purpose of the AgentX agentic-coding scenario this PR is adding.Proof walkthrough:
configs/nvidia-master.yamlregisterskimik2.5-fp4-b300-vllm-agentic-mtpunder theagentic-codingscenario.kimik2.5_fp4_b300_mtp.sh, which launchesvllm servewith theVLLM_CMDarray shown in the diff — no--tool-call-parser/--reasoning-parserpresent, only--language-model-only.resolve_trace_source/build_replay_cmdconfigure aiperf to replay theinferencex-agentx-mvpcorpus, which contains tool-definition-bearing chat-completions requests (this is what makes the scenario "agentic-coding" rather than plain chat).tools/tool_choiceto a vLLM server started without a tool-call parser, vLLM either 400s the request or returns unparsed tool-call text as plain content, instead of populatingtool_calls.kimik2.5_fp4_b300.sh(same model family, same replay path) which explicitly sets--reasoning-parser kimi_k2 --tool-call-parser kimi_k2at lines 65-66 — confirming this is the required, intentional configuration for this exact benchmark type, not an optional flag that only some scripts happen to add.Fix: add
--tool-call-parser kimi_k2and--reasoning-parser kimi_k2to theVLLM_CMDarray inkimik2.5_fp4_b300_mtp.sh, matchingkimik2.5_fp4_b300.sh:65-66.