Skip to content

Studio: draft 2 tokens by default for Inkling 2 DSpark - #18944

Merged
danielhanchen merged 1 commit into
mainfrom
studio-dspark-inkling2-n-max-2
Nov 22, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-dspark-inkling2-n-max-2

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Studio's Auto speculative decoding launches DSpark with --spec-draft-n-max 3 when nothing names a depth. For Inkling 2 on the current prebuilt, depth 2 is faster under both sampling defaults Studio uses, because the third draft token is rarely accepted and costs a wider verify step.

This makes Inkling 2 (both GGUF layouts, inkling2 and inkling2_loop) default to depth 2:

  • The launch (_emit_dspark) and the fit pricing (the draft depth used to size verify rows) share one helper, so the reserve matches what the child runs.
  • A depth the user sets (the settings field, extras or env) still wins.
  • Every other DSpark model, for example DeepSeek-V4-Flash, keeps depth 3.
  • MTP, DFlash and EAGLE-3 are untouched.

Measurements

Inkling-2-Mini, current DSpark pin (ggml-org#32218 at 0a9105de4 via unslothai/llama.cpp#405), dspark-Inkling-2-Mini-Q8_0.gguf drafter, llama-server, exclusive B200, greedy draft (server default), 4 prompts x 384 tokens, seed 1234. Each arm was run twice with the arms interleaved; the A/A spread is 3.4% or less in every arm.

Studio's Inkling 2 defaults on main (inference_defaults.json: temperature 1.0, top_p 1.0, top_k -1, min_p 0):

target no draft tok/s depth 2 tok/s depth 3 tok/s
UD-Q4_K_XL 73.2, 73.6 84.1, 85.3 (1.15x) 79.0, 80.3 (1.09x)
UD-IQ1_S 76.9, 75.7 91.7, 89.8 (1.19x) 80.3, 78.9 (1.04x)

Studio's generic defaults (temperature 0.6, top_p 0.95, top_k 20, min_p 0.01):

target no draft tok/s depth 2 tok/s depth 3 tok/s
UD-Q4_K_XL 82.1, 81.9 103.6, 104.0 (1.27x) 85.8, 85.9 (1.05x)
UD-IQ1_S 84.6, 85.0 106.5, 110.2 (1.28x) 96.2, 96.2 (1.13x)

Greedy (temperature 0), UD-IQ1_S: depth 2 1.28x, depth 3 1.19x, depth 5 1.15x, depth 7 1.08x.

Tests

  • New parametrized case in test_llama_cpp_mtp_detection.py: Inkling 2 in both layouts emits depth 2, a requested depth 3 stays 3, and deepseek4 and an unknown architecture stay at 3. The existing DeepSeek-V4-Flash case is unchanged.
  • test_llama_cpp_mtp_detection.py, test_spec_sidecar_fit_reserve.py, test_mtp_drafter_companion.py and test_llama_cpp_placement.py: 1458 passed. The placement file has teardown errors on a host with visible GPUs (CUDA device queries in CPU tests); the same test IDs error on main, and CI runners have no GPU.

Not covered

  • GPUs other than B200. The depth trade-off comes from acceptance (the third token is rarely kept), which does not depend on the GPU, but the speed ratio was only measured on B200.
  • A future DSpark pin. On the newer upstream head (e4b1cb531) the drafter decodes its full 8-token block every round and depth 2 is the slowest setting there, so this default should be revisited when the pin moves.

On B200 the current DSpark pin decodes 1.15-1.28x vs no draft at depth 2 and
1.04-1.13x at depth 3, under both Studio sampling defaults, since the third
draft token is rarely accepted. The launch and the fit pricing share the new
default; a requested depth and other DSpark models keep 3.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T19:56:34.081763Z 06c6c1d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 06c6c1d76d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 4fec605 into main Nov 22, 2026
@danielhanchen
danielhanchen deleted the studio-dspark-inkling2-n-max-2 branch November 22, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant