feat(train): default to Eagle 3.1 settings (llama arch + norms) - #692
Conversation
PR #610 benchmarks show Eagle 3.1 with --draft-arch llama --norm-before-fc --norm-output gives +7.2% average acceptance length over Eagle 3 baselines. Flip CLI defaults so new training runs use the better config automatically. - --draft-arch: default "qwen3" → "llama" - --norm-before-fc: default False → True (BooleanOptionalAction) - --norm-output: default False → True (BooleanOptionalAction) Users can opt out with --draft-arch qwen3 --no-norm-before-fc --no-norm-output. Config class defaults stay False for checkpoint backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR changes CLI defaults in scripts/train.py: ChangesCLI defaults and documentation update
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fynnsu
left a comment
There was a problem hiding this comment.
Looks good. Do we already have support for Eagle3.1 in vllm? Specifically loading from the speculators config?
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/unit/train/test_draft_config_init.py (1)
411-420: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider adding a
parse_args()default-value test.This file exercises
create_transformer_layer_configdirectly but nothing here (or shown elsewhere) asserts thatparse_args()actually yieldsdraft_arch="llama",norm_before_fc=True, andnorm_output=Trueby default, or that--no-norm-before-fc/--no-norm-outputcorrectly flip them. A small test would guard against future regressions in these argparse defaults.As per path instructions, "Check that new code paths introduced in the PR are covered."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/unit/train/test_draft_config_init.py` around lines 411 - 420, Add a parse_args default-value test to cover the new argparse code path: verify the parser in the training draft config flow returns draft_arch="llama", norm_before_fc=True, and norm_output=True by default, and that the --no-norm-before-fc and --no-norm-output flags correctly flip those values. Place the test alongside the existing create_transformer_layer_config coverage in test_draft_config_init.py so it directly exercises parse_args and guards the CLI defaults from regressions.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/unit/train/test_draft_config_init.py`:
- Around line 411-420: Add a parse_args default-value test to cover the new
argparse code path: verify the parser in the training draft config flow returns
draft_arch="llama", norm_before_fc=True, and norm_output=True by default, and
that the --no-norm-before-fc and --no-norm-output flags correctly flip those
values. Place the test alongside the existing create_transformer_layer_config
coverage in test_draft_config_init.py so it directly exercises parse_args and
guards the CLI defaults from regressions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b89bd0a9-adba-4b2b-acaf-045d77afed1e
📒 Files selected for processing (3)
docs/cli/train.mdscripts/train.pytests/unit/train/test_draft_config_init.py
…rm_output Guard argparse defaults and --no-* flag behavior with explicit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com>
There was a problem hiding this comment.
Defaults affect all speculator types, not just Eagle3
--draft-arch, --norm-before-fc, and --norm-output are global CLI args shared by all speculator types. Changing their defaults here silently changes behavior for DFlash/DSpark users who relied on the old defaults (e.g. --draft-arch qwen3).
Suggested fix: keep the argparse defaults as None and resolve per-speculator-type after parsing:
# After parsing, fill in speculator-specific defaults
if args.draft_arch is None:
args.draft_arch = "llama" if args.speculator_type == "eagle3" else "qwen3"
if args.norm_before_fc is None:
args.norm_before_fc = args.speculator_type == "eagle3"
if args.norm_output is None:
args.norm_output = args.speculator_type == "eagle3"This way Eagle 3.1 gets the new defaults, DFlash/DSpark keep the old ones, and explicit flags still override everything.
@fynnsu what do you think? The global effect of this slipped through, my bad.
I remember we previously discussed not complicating the defaults.
I see 3 options:
- we use defaults per speculator type (my recommendation)
- we close this PR and leave the defaults as they are
- we extrapolate that llama + norms is better for all spec types not just eagle3 (I believe this is risky and/or not scientific)
8f9c4ac to
a51d6d7
Compare
|
@orestis-z I think Fynn and I agree with you we should go with option 1, defaults for per speculator type. |
|
Pushed the per-speculator-type defaults fix in 09bdc78:
|
91aaff6 to
09bdc78
Compare
The --draft-arch, --norm-before-fc, and --norm-output flags are global CLI args shared by all speculator types. The Eagle 3.1 settings have only been validated for eagle3, so resolve defaults per speculator type: eagle3/peagle get llama arch + norms enabled, others keep qwen3 + norms disabled. Explicit flags still override everything. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com>
09bdc78 to
40b4478
Compare
…-project#692) ## Summary [PR vllm-project#610](vllm-project#610) benchmarks show that Eagle 3.1 with `--draft-arch llama --norm-before-fc --norm-output` gives **+7.2% average acceptance length** over Eagle 3 baselines (Qwen3-8B). This PR flips the CLI defaults so new training runs use these settings automatically. **Changes:** - `--draft-arch`: default `"qwen3"` → `"llama"` - `--norm-before-fc`: default `False` → `True`, switched to `BooleanOptionalAction` (adds `--no-norm-before-fc`) - `--norm-output`: default `False` → `True`, switched to `BooleanOptionalAction` (adds `--no-norm-output`) **Backward compatibility:** Config class defaults (`Eagle3SpeculatorConfig`) remain `False` — old checkpoints deserialize correctly. Users can restore Eagle 3 + qwen3 behavior with `--draft-arch qwen3 --no-norm-before-fc --no-norm-output`. ## Test plan - [x] `ruff check` passes on changed files - [x] `pytest tests/unit/train/test_draft_config_init.py` — all 36 tests pass - [x] `pytest tests/unit/test_config.py -k norm` — all 4 config roundtrip tests pass (config defaults unchanged) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…-project#692) ## Summary [PR vllm-project#610](vllm-project#610) benchmarks show that Eagle 3.1 with `--draft-arch llama --norm-before-fc --norm-output` gives **+7.2% average acceptance length** over Eagle 3 baselines (Qwen3-8B). This PR flips the CLI defaults so new training runs use these settings automatically. **Changes:** - `--draft-arch`: default `"qwen3"` → `"llama"` - `--norm-before-fc`: default `False` → `True`, switched to `BooleanOptionalAction` (adds `--no-norm-before-fc`) - `--norm-output`: default `False` → `True`, switched to `BooleanOptionalAction` (adds `--no-norm-output`) **Backward compatibility:** Config class defaults (`Eagle3SpeculatorConfig`) remain `False` — old checkpoints deserialize correctly. Users can restore Eagle 3 + qwen3 behavior with `--draft-arch qwen3 --no-norm-before-fc --no-norm-output`. ## Test plan - [x] `ruff check` passes on changed files - [x] `pytest tests/unit/train/test_draft_config_init.py` — all 36 tests pass - [x] `pytest tests/unit/test_config.py -k norm` — all 4 config roundtrip tests pass (config defaults unchanged) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Eros483 <arnabmandal2912@gmail.com>
Summary
PR #610 benchmarks show that Eagle 3.1 with
--draft-arch llama --norm-before-fc --norm-outputgives +7.2% average acceptance length over Eagle 3 baselines (Qwen3-8B). This PR flips the CLI defaults so new training runs use these settings automatically.Changes:
--draft-arch: default"qwen3"→"llama"--norm-before-fc: defaultFalse→True, switched toBooleanOptionalAction(adds--no-norm-before-fc)--norm-output: defaultFalse→True, switched toBooleanOptionalAction(adds--no-norm-output)Backward compatibility: Config class defaults (
Eagle3SpeculatorConfig) remainFalse— old checkpoints deserialize correctly. Users can restore Eagle 3 + qwen3 behavior with--draft-arch qwen3 --no-norm-before-fc --no-norm-output.Test plan
ruff checkpasses on changed filespytest tests/unit/train/test_draft_config_init.py— all 36 tests passpytest tests/unit/test_config.py -k norm— all 4 config roundtrip tests pass (config defaults unchanged)🤖 Generated with Claude Code