-
Notifications
You must be signed in to change notification settings - Fork 368
inplement mix hidden_states for eagle3; deprecate eagle1 #946
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
Changes from all commits
ba9b129
2dd7392
0969873
ad1d17c
48cc15f
ef832c4
486001b
00bf3e9
e2b7e0e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,12 +29,6 @@ | |||||||||||||||||
| eagle3_default_config.update({"use_aux_hidden_state": True, "use_last_layernorm": True}) | ||||||||||||||||||
| eagle_mtp_default_config.update({"use_last_layernorm": True, "use_mtp_layernorm": True}) | ||||||||||||||||||
|
|
||||||||||||||||||
| EAGLE1_DEFAULT_CFG = { | ||||||||||||||||||
| "algorithm": "eagle", | ||||||||||||||||||
| "config": { | ||||||||||||||||||
| "eagle_architecture_config": deepcopy(default_eagle_config), | ||||||||||||||||||
| }, | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| EAGLE3_DEFAULT_CFG = { | ||||||||||||||||||
| "algorithm": "eagle", | ||||||||||||||||||
|
|
@@ -105,3 +99,14 @@ class EagleConfig(ModeloptBaseConfig): | |||||||||||||||||
| default="llama", | ||||||||||||||||||
| description=("The class of eagle decoder to use. Available options: llama, kimik2"), | ||||||||||||||||||
| ) | ||||||||||||||||||
|
|
||||||||||||||||||
| eagle_ttt_steps: int = ModeloptField( | ||||||||||||||||||
| default=4, description=("The number of train-time-test steps in training.") | ||||||||||||||||||
| ) | ||||||||||||||||||
|
Comment on lines
+103
to
+105
Contributor
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. Add a lower-bound validation for At Line 103, 💡 Proposed fix eagle_ttt_steps: int = ModeloptField(
- default=4, description=("The number of train-time-test steps in training.")
+ default=4,
+ ge=1,
+ description=("The number of train-time-test steps in training."),
)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||
|
|
||||||||||||||||||
| eagle_mix_hidden_states: bool = ModeloptField( | ||||||||||||||||||
| default=False, | ||||||||||||||||||
| description=( | ||||||||||||||||||
| "Whether to mix hidden states of multiple TTT steps. It is a technique to reduce training cost." | ||||||||||||||||||
| ), | ||||||||||||||||||
| ) | ||||||||||||||||||
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.
data_modulecan be undefined for non-eagle3modes.TrainingArguments.modestill allows"medusa", but only theeagle3branch initializesdata_module, which can crash at trainer construction.💡 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents