Draft
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
c7a156f to
fe81bdc
Compare
Add deepseek_eagle3.py implementing Eagle3DeepseekV2ForCausalLM for speculative decoding with DeepSeek Multi-head Latent Attention (MLA). This enables SGLang to load Eagle3 draft models that use MLA attention (e.g., lightseekorg/kimi-k2.5-eagle3-mla) which declare the architecture Eagle3DeepseekV2ForCausalLM. Previously only Llama-based Eagle3 models were supported via llama_eagle3.py. Key implementation details: - DeepseekEagle3DecoderLayer: Single decoder layer using DeepseekV2AttentionMLA with overridden fused_qkv_a_proj_with_mqa to accept 2*hidden_size input (concat of embeddings + hidden states) - DeepseekEagle3Model: Backbone with embed_tokens, fc projection (3*target_hidden_size -> hidden_size), single midlayer, and norm - Eagle3DeepseekV2ForCausalLM: Top-level class with lm_head, logits_processor, hot_token_id (d2t mapping), and custom weight loading that handles fused q_a_proj/kv_a_proj_with_mqa concatenation - Eagle3DeepseekV3ForCausalLM: Alias for V3 compatibility - Auto-registered via EntryClass for model registry discovery Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fe81bdc to
317b8cd
Compare
Author
|
/tag-and-rerun-ci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
support for MLA model speculative decoding https://huggingface.co/lightseekorg/kimi-k2.5-eagle3-mla
Modifications
Accuracy Tests
TODO
Speed Tests and Profiling
TODO
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci