The Moment of Truth: Probing the AQ-MedAI K2 Drafter on Kimi-K2.5
A Single Message That Marks a Turning Point
In the long arc of an opencode coding session devoted to optimizing speculative decoding for the Kimi-K2.5 large language model, most messages are about setup, debugging, and waiting. But occasionally a message arrives that represents a genuine inflection point — a moment when all the preparatory work has been completed and the question is finally ready to be asked. Message [msg 4963] is precisely such a moment. Its content is deceptively simple:
Server is up and running cleanly. Now let me run the benchmark.
Beneath this brief statement lies the culmination of hours of careful preparation: server processes killed, GPU handles cleaned, configuration files patched, vocabulary mappings inspected, a drafter model downloaded and staged, and a multi-GPU SGLang server started, monitored, and finally confirmed healthy. This article unpacks what this message means, why it was written, and what it reveals about the assistant's reasoning process.
The Context: Why This Message Exists
To understand why message [msg 4963] was written, we must understand the problem the assistant and user were trying to solve. The Kimi-K2.5 model was running on a machine with 8 RTX PRO 6000 Blackwell GPUs, achieving a baseline inference throughput of approximately 82 tokens per second. The assistant had previously trained a from-scratch EAGLE-3 draft model on 100K samples of K2.5 training data, achieving 74.7% validation accuracy — but this drafter only reached about 60 tok/s in speculative decoding, which was worse than the baseline. The bottleneck was not the draft model's quality but the ~30ms verify step, dominated by NCCL all-reduce communication across the 8 GPUs over PCIe.
The user had identified a potential shortcut: the AQ-MedAI team had released a pre-trained EAGLE-3 drafter for Kimi-K2, trained on 1.4 million samples with an impressive accept length of 3.2–3.5. Since K2 and K2.5 share the same DeepSeek V3 / MLA architecture, hidden size, and layer structure, the hypothesis was that fine-tuning this existing drafter on K2.5 data might yield better results faster than training from scratch. But before committing to a fine-tuning run that could take hours or days, the game plan called for Phase 0: a quick probe — simply run the AQ-MedAI K2 drafter directly with the K2.5 base model and measure how well it performs. If the accept length was above 1.0, it would confirm that the hidden state representations were correlated enough for fine-tuning to be viable.
Message [msg 4963] is the moment when that probe is about to begin.
The Journey to This Point
The path to this message was not straightforward. The assistant had to:
- Kill existing server processes and free GPU handles to ensure a clean start ([msg 4943]).
- Inspect the AQ-MedAI drafter directory to confirm it contained a valid model (
model.safetensors,config.json) and understand its structure ([msg 4943]). - Analyze the vocabulary mappings — the
d2t(draft-to-target) tensors — and discover that 31,748 out of 32,000 values differed between the AQ-MedAI mapping and the K2.5 mapping ([msg 4948]). This was a critical finding: the drafter'slm_headhad learned to predict specific token positions in a draft vocabulary that corresponded to specific target tokens via AQ-MedAI's mapping. Using the drafter directly with K2.5's different mapping would produce garbage. The assistant correctly reasoned that for the probe, the AQ-MedAI mapping (already embedded in the safetensors) should be used as-is. - Fix the config file — the AQ-MedAI config had
max_position_embeddingsset to 131072, but K2.5 uses 262144. This needed to match ([msg 4949]). - Launch the SGLang server with the K2.5 base model and the AQ-MedAI K2 drafter, using 2-step EAGLE-3 speculation ([msg 4951]).
- Wait through the long startup — the server takes 9-10 minutes to load weights across 8 GPUs and capture CUDA graphs. The assistant initially tried to check too early, and the user had to correct it: "It just needs time, give it 20-30 mins" ([msg 4958]). The assistant then implemented a polling loop as instructed ([msg 4961]), which confirmed readiness after approximately 2.5 minutes of polling (attempt 5 of 60, with 30-second intervals). By the time message [msg 4963] is written, the assistant has checked the tail of the server log and confirmed the server is "up and running cleanly" — no errors, no warnings, just the expected CUDA graph capture messages.
The Thinking Process Visible in This Message
The assistant's reasoning in this message is revealed through its structure. First, it states the conclusion: "Server is up and running cleanly." This is not a guess — it is based on the log inspection performed in the previous message ([msg 4962]), which showed the CUDA graph capture completing successfully across all GPU ranks. The assistant then updates the todo list to reflect progress, marking Phase 0.3 (launch server) as complete and leaving the benchmark (Phase 0.4) as pending.
The todo list update is particularly revealing. It shows the assistant's hierarchical task decomposition:
- Phase 0 (Quick Probe) is still in progress
- Phase 0.1 (Kill processes) is completed
- Phase 0.2 (Prepare drafter directory) is completed
- Phase 0.3 (Launch server) is now completed
- Phase 0.4 (Run benchmark) is the next step This structured approach to task management is a hallmark of the assistant's methodology. Rather than keeping everything in working memory, it externalizes the plan into a todo list that persists across messages, allowing it to resume work coherently after interruptions (like the long server wait). The phrase "Now let me run the benchmark" signals the assistant's intent to execute the next action immediately. It has the benchmark script (
benchmark_eagle3.py) already copied to the server ([msg 4951]), and it knows the script's interface (it was used previously). The assistant is operating on the assumption that the server is fully functional and the benchmark will produce meaningful results.
Assumptions Made
This message rests on several implicit assumptions:
- The server is truly healthy. The assistant checked the log tail and saw no error messages, but it did not perform a test inference or verify that the draft model was actually being used in the speculation pipeline. A server that loads successfully but silently falls back to non-speculative decoding would produce misleading benchmark results.
- The benchmark script is compatible with this server configuration. The script was written for the previous EAGLE-3 setup and may assume specific endpoint behavior or response formats that could differ with the AQ-MedAI drafter loaded.
- The AQ-MedAI drafter's vocabulary mapping is correct for this probe. The assistant verified that SGLang loads
d2tfrom the safetensors directly and createshot_token_id = d2t + arange(32000)([msg 4948]), confirming the mapping is self-contained. But the deeper question — whether the K2 drafter'slm_headcan produce meaningful logits for K2.5's hidden states — can only be answered by the benchmark itself. - The 2-step configuration is appropriate. The assistant launched with
--speculative-num-steps 2and--speculative-num-draft-tokens 3, matching the configuration used for the from-scratch drafter. If the K2 drafter has different optimal parameters, this could understate its performance.
Input Knowledge Required
To fully understand this message, one needs knowledge of:
- EAGLE-3 speculative decoding: The architecture where a lightweight draft model predicts multiple future tokens, which are then verified by the full target model. The draft model receives hidden states from the target model as input.
- SGLang server architecture: How the inference engine loads models across multiple GPUs, captures CUDA graphs for performance, and serves an OpenAI-compatible API.
- The AQ-MedAI K2 drafter: A pre-trained EAGLE-3 draft model for Kimi-K2, trained on 1.4M samples, with its own vocabulary mapping (
d2t/t2dtensors) that maps between draft vocabulary (32,000 tokens) and target vocabulary (the full K2 vocabulary). - Vocabulary mapping mismatch: The critical insight that different training runs produce different mappings between draft tokens and target tokens, and that a drafter's
lm_headis trained to predict tokens in the draft vocabulary space, which are then mapped to target vocabulary IDs via thed2ttensor. - The benchmark script: A Python script that sends requests to the SGLang server, measures throughput, and reports tokens per second.
Output Knowledge Created
This message itself does not produce new knowledge — it is a transition point. But it sets the stage for the knowledge that will be created in the subsequent message ([msg 4964]), where the benchmark reveals:
- Throughput: ~52 tok/s (significantly worse than both the from-scratch drafter at 60 tok/s and the baseline at 82 tok/s)
- Accept length: ~1.5 (worse than the from-scratch drafter's ~2.0, but above 1.0, confirming the probe hypothesis) The assistant's analysis of these results ([msg 4966]) correctly interprets them as a "positive signal for fine-tuning" — accept length above 1.0 means the K2 and K2.5 hidden state representations share meaningful structure, even though they are not aligned enough for direct use. This conclusion directly drives the decision to proceed to Phase 1 (fine-tuning).
The Broader Significance
Message [msg 4963] represents a pattern that recurs throughout this coding session: the assistant methodically builds infrastructure, waits for long-running operations to complete, and then executes a measurement that produces actionable data. The message itself is unremarkable — a status update and a statement of intent — but it sits at a critical juncture in the decision tree. The benchmark results it enables will determine whether the team invests hours in fine-tuning the AQ-MedAI drafter or abandons that approach and pursues other optimizations.
In the end, the fine-tuning path would also prove unsuccessful (plateauing at ~38% accuracy, far below the from-scratch model's 75%), leading the assistant to pivot to system-level optimizations of the verify step. But that outcome was not knowable at the moment of message [msg 4963]. At this point in the narrative, the assistant is optimistic, the server is running cleanly, and the probe is about to begin. It is a moment of anticipation — the calm before the data speaks.