Skip to content

Commit 54b3dc4

Browse files
hyukjleeclaude
andcommitted
[AMD][AgentX] kimik2.7: add EAGLE3 MTP + SWE-bench accuracy path
- New recipe kimik2.7_fp4_mi355x_mtp.sh: EAGLE3 spec decoding with the K2.7-Code-matched draft lightseekorg/kimi-k2.7-coder-eagle3.1-mla (pre-staged; num_speculative_tokens 3, env-overridable). spec-decoding: mtp routes here via the runner's _mtp suffix. - Accuracy path (EVAL_ONLY -> run_eval SWE-bench agentic) + Kimi eval parser flags (--tool-call-parser/--reasoning-parser kimi_k2 --enable-auto-tool-choice) added to BOTH base and MTP recipes. - Align server flags with recipes.vllm.ai Kimi-K2.7-Code MI355X recipe: --moe-backend flydsl + --compilation-config {fuse_allreduce_rms:false}. - Harden LMCache MP server (flags verified at pinned aaf7c0d3): split worker pools --max-gpu-workers 1/--max-cpu-workers 8 (was --max-workers TP*2), --chunk-size 1024, --l1-align-bytes 16384, --eviction-trigger-watermark 0.85, --eviction-ratio 0.10, --supported-transfer-mode lmcache_driven. - Config: kimik2.7-fp4-mi355x-vllm-agentic-mtp (record) + kimik2.7-fp4-mi355x-vllm-agentic-mtp-smoke (TP4/TP8 x none c4 / lmcache c16, 900s). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ff1673c commit 54b3dc4

4 files changed

Lines changed: 544 additions & 7 deletions

File tree

benchmarks/single_node/agentic/kimik2.7_fp4_mi355x.sh

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,20 @@ case "$OFFLOAD_MODE" in
180180
fi
181181
LMCACHE_L1_INIT_SIZE_GB="${LMCACHE_L1_INIT_SIZE_GB:-20}"
182182
LMCACHE_L1_READ_TTL_SECONDS="${LMCACHE_L1_READ_TTL_SECONDS:-7200}"
183-
LMCACHE_CHUNK_SIZE="${LMCACHE_CHUNK_SIZE:-256}"
184-
LMCACHE_MAX_WORKERS="${LMCACHE_MAX_WORKERS:-$((TP * 2))}"
183+
# Server flags below track the MI355X Kimi-K2.7 LMCache runbook.
184+
# chunk-size 1024: fewer server round-trips than the 256 default; the MP
185+
# connector does not pin a matching value, so this is self-contained.
186+
LMCACHE_CHUNK_SIZE="${LMCACHE_CHUNK_SIZE:-1024}"
187+
LMCACHE_L1_ALIGN_BYTES="${LMCACHE_L1_ALIGN_BYTES:-16384}"
188+
# Split worker pools: cap the GPU-affinity pool (STORE/RETRIEVE) at 1 to
189+
# avoid concurrent-GPU-transfer stalls under heavy async-load pressure
190+
# (the conc64 LMCache stall class); keep 8 CPU-side workers for LOOKUP.
191+
# Supersedes the old --max-workers (which set both pools equal).
192+
LMCACHE_MAX_GPU_WORKERS="${LMCACHE_MAX_GPU_WORKERS:-1}"
193+
LMCACHE_MAX_CPU_WORKERS="${LMCACHE_MAX_CPU_WORKERS:-8}"
194+
LMCACHE_EVICTION_TRIGGER_WATERMARK="${LMCACHE_EVICTION_TRIGGER_WATERMARK:-0.85}"
195+
LMCACHE_EVICTION_RATIO="${LMCACHE_EVICTION_RATIO:-0.10}"
196+
LMCACHE_TRANSFER_MODE="${LMCACHE_TRANSFER_MODE:-lmcache_driven}"
185197
export PYTHONHASHSEED="${PYTHONHASHSEED:-0}"
186198
export LMCACHE_BLOCKING_TIMEOUT_SECS=60
187199

@@ -196,8 +208,13 @@ case "$OFFLOAD_MODE" in
196208
--l1-init-size-gb "$LMCACHE_L1_INIT_SIZE_GB"
197209
--l1-read-ttl-seconds "$LMCACHE_L1_READ_TTL_SECONDS"
198210
--chunk-size "$LMCACHE_CHUNK_SIZE"
199-
--max-workers "$LMCACHE_MAX_WORKERS"
211+
--l1-align-bytes "$LMCACHE_L1_ALIGN_BYTES"
212+
--max-gpu-workers "$LMCACHE_MAX_GPU_WORKERS"
213+
--max-cpu-workers "$LMCACHE_MAX_CPU_WORKERS"
214+
--eviction-trigger-watermark "$LMCACHE_EVICTION_TRIGGER_WATERMARK"
215+
--eviction-ratio "$LMCACHE_EVICTION_RATIO"
200216
--eviction-policy LRU
217+
--supported-transfer-mode "$LMCACHE_TRANSFER_MODE"
201218
)
202219
printf '%q ' "${LMCACHE_CMD[@]}" > "$RESULT_DIR/lmcache_command.txt"
203220
printf '\n' >> "$RESULT_DIR/lmcache_command.txt"
@@ -348,6 +365,18 @@ VLLM_CMD=(
348365
--trust-remote-code
349366
--max-num-seqs "$CONC"
350367
--mm-encoder-tp-mode data
368+
# MI355X (gfx950) recipe defaults from recipes.vllm.ai/moonshotai/Kimi-K2.7-Code:
369+
# FlyDSL W4A16 MoE kernel + disable the fuse_allreduce_rms compile pass
370+
# (required on MI350X/MI355X).
371+
--moe-backend flydsl
372+
--compilation-config '{"pass_config": {"fuse_allreduce_rms": false}}'
373+
# Structured tool-calls + reasoning for the SWE-bench agentic eval
374+
# (EVAL_ONLY path). Kimi-K2 emits the kimi_k2 tool-call/reasoning format;
375+
# without these the agent harness can't parse message.tool_calls. Harmless
376+
# for the throughput replay path.
377+
--tool-call-parser kimi_k2
378+
--enable-auto-tool-choice
379+
--reasoning-parser kimi_k2
351380
"${PREFIX_CACHE_ARGS[@]}"
352381
"${OFFLOAD_ARGS[@]}"
353382
)
@@ -380,7 +409,13 @@ if [ "$USE_VLLM_ROUTER" = "true" ]; then
380409
wait_for_server_ready --port "$PORT" --server-log "$ROUTER_LOG" --server-pid "$ROUTER_PID"
381410
fi
382411

383-
# ---- Run benchmark ----------------------------------------------------------
384-
build_replay_cmd "$RESULT_DIR"
385-
386-
run_agentic_replay_and_write_outputs "$RESULT_DIR"
412+
# ---- Run benchmark or accuracy eval -----------------------------------------
413+
# EVAL_ONLY=true (workflow eval-only input) runs the SWE-bench agentic accuracy
414+
# eval against the live server instead of the throughput replay; run_eval
415+
# dispatches to the swebench harness for agentic-coding scenarios.
416+
if [ "${EVAL_ONLY:-false}" = "true" ]; then
417+
run_eval --port "$PORT"
418+
else
419+
build_replay_cmd "$RESULT_DIR"
420+
run_agentic_replay_and_write_outputs "$RESULT_DIR"
421+
fi

0 commit comments

Comments
 (0)