Add EagleSpeculatorConfig for EAGLE1 and HASS models with unified architecture support#34
Add EagleSpeculatorConfig for EAGLE1 and HASS models with unified architecture support#34
Conversation
serialization support - Add LlamaEagleSpeculator model class - Implement model serialization/deserialization - Add torch as a project dependency - Include unit and integration tests - Fixes for serialization handling This introduces the core LlamaEagleSpeculator functionality with full serialization support
…for the Eagle config
There was a problem hiding this comment.
Pull Request Overview
This PR implements a unified configuration for EAGLE1 and HASS speculator models by introducing the EagleSpeculatorConfig class and updating related configuration utilities.
- Added a new configuration class (EagleSpeculatorConfig) in src/speculators/models/eagle.py.
- Updated init.py to expose EagleSpeculatorConfig.
- Modified speculators/config.py to remove the from_pretrained method and add a from_dict override for speculators_config conversion.
- Added "torch" as a dependency in pyproject.toml.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/speculators/models/eagle.py | Introduces a new unified configuration class for Eagle speculator models. |
| src/speculators/models/init.py | Updates exports to include EagleSpeculatorConfig. |
| src/speculators/config.py | Removes from_pretrained method and adds a from_dict override for handling speculators_config conversion. |
| pyproject.toml | Adds "torch" as a dependency. |
|
📦 Build Artifacts Available |
|
📦 Build Artifacts Available |
|
📦 Build Artifacts Available |
|
📦 Build Artifacts Available |
MeganEFlynn
left a comment
There was a problem hiding this comment.
Looks good to me as long as we can update/build on this when adding new models beyond llama.
|
📦 Build Artifacts Available |
|
📦 Build Artifacts Available |
…tains all current expected config implementations
a56e3c4 to
6771fd1
Compare
|
📦 Build Artifacts Available |
Summary
This pull request implements the
EagleSpeculatorConfigclass to support EAGLE1 and HASS speculator models within the Speculators framework. It introduces a unified configuration allowing both variants through configurable parameters while cleaning up related model config handling.Details
EagleSpeculatorConfig:transformer_layer_architecture,transformer_layer_config,layernorms, andfusion_bias.model_validatorto ensure the transformer layer architecture is included in the architectures list.SpeculatorModelConfig:__init__to strip Pydantic fields before initializingPretrainedConfig.TransformerSpeculatorConfigimplementation.test_config.pyto:EagleSpeculatorConfig.Test Plan
pytest tests/unit/test_config.pyto ensure:SpeculatorModelConfig.registered_classes()includes EagleSpeculatorConfig.Related Issues