-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
feat: Add support for speculators Eagle checkpoints #20436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
rahul-tuli
wants to merge
23
commits into
vllm-project:main
Choose a base branch
from
rahul-tuli:feat/speculators-eagle-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+378
−9
Draft
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
bf388d8
feat: Add support for speculators Eagle checkpoints
rahul-tuli b2888ab
cleanup: Remove unused imports from speculators_eagle.py
rahul-tuli 43c098a
fix: Support HuggingFace model IDs in speculators Eagle config
rahul-tuli dea7fdf
fix: Add method field to speculators Eagle config for V1 compatibility
rahul-tuli 31d9af6
fix: Use speculators_model_type for method field instead of hardcoding
rahul-tuli b7d286f
fix: Add eagle model_type detection for automatic method setting
rahul-tuli 73a548c
fix: Add speculators Eagle detection as special case in V1 check
rahul-tuli c6b71b2
fix: Add speculators weight remapping to llama_eagle model
rahul-tuli 4667abd
fix: Complete speculators Eagle support fixes
rahul-tuli b0f61c2
docs: Add comprehensive V1 engine Eagle support documentation
rahul-tuli e9bda92
feat: Add generic Eagle-3 speculators support
rahul-tuli eef118e
fix: Add HASS Eagle layernorm support for V1 engine
rahul-tuli 9262a34
refactor: Clean up speculators Eagle config implementation
rahul-tuli e4e87fb
chore: Remove V1 engine Eagle support documentation
rahul-tuli 7d4e0f2
refactor: Focus speculators Eagle support on V1 engine only
rahul-tuli 95f6069
feat: Comprehensive code cleanup for speculators Eagle support
rahul-tuli ddd6123
refactor: Consolidate Eagle speculators weight mapping
rahul-tuli 00da923
feat: Add support for Eagle models in speculators format
rahul-tuli d63ef14
remove changes to gitignore
rahul-tuli b905811
add back .gitignore
rahul-tuli 7df8c9d
Add norm_before_residual support for llama_eagle3.py
rahul-tuli 1408fb8
Fix bug
rahul-tuli 46e398a
simplify logic
rahul-tuli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,9 +40,11 @@ | |
NemotronConfig, NVLM_D_Config, | ||
OvisConfig, RWConfig, | ||
SkyworkR1VChatConfig, SolarConfig, | ||
SpeculatorsEagleConfig, | ||
Telechat2Config, UltravoxConfig) | ||
# yapf: enable | ||
from vllm.transformers_utils.configs.mistral import adapt_config_dict | ||
from vllm.transformers_utils.configs.speculators_eagle import is_speculators_eagle_config | ||
from vllm.transformers_utils.utils import check_gguf_file | ||
from vllm.utils import resolve_obj_by_qualname | ||
|
||
|
@@ -350,6 +352,19 @@ | |
raise ValueError(error_message) from e | ||
|
||
if config_format == ConfigFormat.HF: | ||
# Speculators Eagle models use a different config format that requires | ||
# translation to vLLM's expected format. This must be handled before | ||
# the standard config loading to ensure proper model initialization. | ||
if is_speculators_eagle_config(model): | ||
config = SpeculatorsEagleConfig.from_pretrained( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are all existing supported models just going through the PretrainedConfig pathway? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes! |
||
model, | ||
revision=revision, | ||
code_revision=code_revision, | ||
token=_get_hf_token(), | ||
**kwargs, | ||
) | ||
return config | ||
|
||
config_dict, _ = PretrainedConfig.get_config_dict( | ||
model, | ||
revision=revision, | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be under a check where we first check if there's a speculators config present in self.config?