feat(tito): add DeepSeek V3.2 speculative session verification#1628
feat(tito): add DeepSeek V3.2 speculative session verification#1628guapisolo wants to merge 3 commits into
Conversation
Add a manual TP8/EP8 session test and expose the fixed EAGLE serving recipe through ModelConfig. Keep SGLang TP/DP/PP/EP namespace fields on Miles' short-name contract, and forward the effective V3.2 thinking mode so SGLang separates reasoning before TITO comparison.
There was a problem hiding this comment.
Code Review
This pull request introduces support for speculative decoding in sglang-based session verification, updates sglang parallel size argument handling to use shorter destination names (such as sglang_ep_size), and implements thinking mode forwarding for DeepSeek V3.2. The reviewer suggests avoiding hardcoded speculative decoding parameters in namespace_to_train_args and instead retrieving them dynamically from the namespace or model configuration.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if ns.enable_spec: | ||
| parts.extend( | ||
| [ | ||
| "--sglang-speculative-algorithm EAGLE", | ||
| "--sglang-speculative-num-steps 2", | ||
| "--sglang-speculative-eagle-topk 1", | ||
| "--sglang-speculative-num-draft-tokens 3", | ||
| ] | ||
| ) |
There was a problem hiding this comment.
Avoid hardcoding speculative decoding parameters (such as algorithm, num_steps, eagle_topk, and num_draft_tokens) directly inside namespace_to_train_args. Per the general rules, model serving parameters should be retrieved from the model configuration or the argparse.Namespace to allow different models to use different speculative serving configurations.
| if ns.enable_spec: | |
| parts.extend( | |
| [ | |
| "--sglang-speculative-algorithm EAGLE", | |
| "--sglang-speculative-num-steps 2", | |
| "--sglang-speculative-eagle-topk 1", | |
| "--sglang-speculative-num-draft-tokens 3", | |
| ] | |
| ) | |
| if ns.enable_spec: | |
| spec_algo = getattr(ns, "speculative_algorithm", "EAGLE") | |
| spec_steps = getattr(ns, "speculative_num_steps", 2) | |
| spec_topk = getattr(ns, "speculative_eagle_topk", 1) | |
| spec_tokens = getattr(ns, "speculative_num_draft_tokens", 3) | |
| parts.extend( | |
| [ | |
| f"--sglang-speculative-algorithm {spec_algo}", | |
| f"--sglang-speculative-num-steps {spec_steps}", | |
| f"--sglang-speculative-eagle-topk {spec_topk}", | |
| f"--sglang-speculative-num-draft-tokens {spec_tokens}", | |
| ] | |
| ) |
References
- Model parameters, such as
index_topk, should be retrieved from the model configuration rather than being hardcoded.
Remove the old-to-new mapping table and select tp_size, dp_size, pp_size, or ep_size directly from SGLang's registered aliases without changing the CLI surface.
Document that argparse derives its destination from the first alias, which is why Miles selects SGLang's short parallel-size field names.
Summary
Add TP8/EP8 DeepSeek V3.2 TITO session verification with fixed EAGLE launch settings.
Motivation
Add a manual TP8/EP8 session test and expose the fixed EAGLE serving recipe through ModelConfig.
Keep SGLang TP/DP/PP/EP namespace fields on Miles' short-name contract, and forward the effective V3.2 thinking mode so SGLang separates reasoning before TITO comparison.
Usage
Run the manual verifier against a local checkpoint:
The test launches one session verifier with
tp=8,ep=8, and EAGLE steps/top-k/draft-tokens set to2/1/3.Design Notes
ModelConfig.enable_specconditionally emits the fixed EAGLE recipe.add_sglang_argumentsmaps parallel-size aliases to Miles' short Namespace fields.DeepSeekV32TITOTokenizerforwards the resolved thinking mode aschat_template_kwargs["thinking"].Verification
test_sglang_parallel_sizes_use_short_namespace_fieldscovers parallel-size aliases.test_namespace_to_train_args_enables_eagle_speculative_decodingcovers EAGLE serialization.test_deepseek_v32_forwards_effective_thinking_modecovers thinking-mode precedence.DeepseekV3ForCausalLMNextNlacksfuse_qkv_a_proj.Review Focus
_SGLANG_PARALLEL_SIZE_DESTSalias-to-Namespace mapping.DeepSeekV32TITOTokenizereffective-mode precedence.namespace_to_train_argsfixed EAGLE option serialization.