Research how EAGLE-3 (the speculative decoding paper by the EAGLE team) selects which…
- User
Research how EAGLE-3 (the speculative decoding paper by the EAGLE team) selects which layers to use as auxiliary hidden states ("aux layers").
Context: EAGLE-3 uses hidden states from multiple intermediate layers of the target model as input to the draft model. The draft model concatenates these hidden states and projects them via an fc layer. The question is: how does the EAGLE-3 paper recommend choosing WHICH layers to use?
Search for:
- The EAGLE-3 paper (likely on arxiv, by authors associated with EAGLE/EAGLE-2 speculative decoding, possibly from Peking University or related groups)
- Specifically look for their methodology on selecting auxiliary layers - do they use linear probes? Mutual information? Some other criterion?
- How many aux layers do they recommend? Is there a scaling relationship?
- Any ablation studies on layer selection
Also check EAGLE-2 if EAGLE-3 doesn't have this detail - the aux layer concept may have been introduced earlier.
Report findings concisely - the key method and any specific recommendations.
Assistant
I'll research the EAGLE-3 paper and its methodology for selecting auxiliary layers.
Assistant
Now let me get the full paper content, specifically focusing on the layer selection methodology.
Assistant
Now let me look at the SpecForge training framework and the EAGLE-3 code to find the specific layer selection logic.
Assistant
Let me now look at the actual EAGLE-3 paper more carefully, and also check the SpecForge codebase for the concrete layer indices used.
Assistant
Excellent finding. Let me get one more piece -- the actual config.json from released EAGLE-3 models to see the concrete layer indices used.
Assistant
Now let me check the official EAGLE-3 repository and the SafeAILab code for the exact layer selection logic.
Assistant
Now let me also check the local project's eagle config for the actual layer indices used.
Assistant
Now let me look at the docs in this project for more details about their specific layer selection rationale.
Assistant
Found the key piece. Now let me look at the training-v2.md for the linear probe details.
Assistant
I have comprehensive information now. Let me compile the findings.
研究结果:EAGLE-3 辅助层(aux layers)选择方法
核心论文
EAGLE-3: Scaling up Inference Acceleration of Large Language Models via Training-Time Test (arXiv:2503.01840, NeurIPS 2025),作者 Yuhui Li, Fangyun Wei, Chao Zhang, Hongyang Zhang(Peking University / Microsoft Research Asia)。
层选择方法
- User
Assistant
I'll conduct a thorough audit of the EAGLE-3 draft model's loading and forward flow in sglang to identify bias/quantization/parameter loading inconsistencies. Let me start by exploring the codebase systematically.
Assistant
Let me search for the key files mentioned in the audit.
Assistant
Now let me check the sglang model loading side:
Assistant
Now let me check the quantization loading code:
Assistant
Let me continue reading the quantization file and check the exclude_modules logic:
Assistant
Now let me check the ColumnParallelLinear bias default and the training script:
Assistant
Now let me check the training script and the hf_quant_config.json:
Assistant
Now let me check the config and verify scale_emb handling:
Assistant
Now let me check the aux_hidden extraction and how it's used:
Assistant
Now let me check how lm_head is loaded and if it goes through NVFP4:
Assistant
Let me check the fc layer loading behavior more carefully:
Assistant
Now check the key part - how bias is handled in training vs deployment:
Assistant
Let me check if there's missing key handling in weight loading:
Assistant
Now let me check the eagle_worker to understand how aux_hidden is extracted during inference:
Assistant
Let me check eagle_info to see how aux_hidden is extracted from layer outputs:
Assistant
Let me search for where hidden_states is extracted from layer_ids:
Assistant
Let me search in the model runner or forward batch to see how aux_hidden concatenation happens:
Assistant
Critical! Let me verify how the hidden states are concatenated:
Assistant
Now let me check how the aux_hidden_states list is then processed in forward_batch:
Assistant
Let me search for where logits_output is created in forward:
Assistant
Found it! Let me check line 538:
Assistant
Perfect! Now let me check if the concatenation order preserves the order of layer_ids. Let me also check for potential issues with dtype:
Assistant
Now let me check what dtype the aux_hidden comes in:
Assistant
Now let me check the fc layer in llama_eagle3 to verify bias handling:
Assistant
Good! Now let me check safetensors to see what's actually in there:
Assistant
Perfect! Now let me check if there are issues with the fc layer in exclude_modules matching:
Assistant
Excellent! Now let me verify the fc layer will not have bias loaded and check the actual layer instantiation:
Assistant
Now let me check one more critical issue - whether the ColumnParallelLinear actually creates a bias even when bias=False:
Assistant
Perfect! Now let me verify the scale_emb is actually applied in forward:
Assistant
Perfect! Now let me do a final check on the lm_head to see if it will load correctly:
Assistant
Excellent! Now let me compile my findings. Let me search for the actual issue with the comment in llama_eagle3.py about lm_head:
Assistant