Preserve rope_scaling when building Eagle3 transformer config - #574
Conversation
The Eagle3 converter built the drafter's LlamaConfig via build_llama_config_rope_kwargs() but only forwarded rope_theta, never rope_scaling. The helper already supports rope_scaling (and the Eagle v1 converter forwards it), so any Eagle3 checkpoint converted for a rope-scaled target (e.g. Llama-3.1/3.3 "llama3" scaling, linear/dynamic NTK, YaRN) silently lost its scaling and fell back to default RoPE, producing incorrect positional encoding at long context. Forward rope_scaling from the Eagle config, mirroring the Eagle v1 converter, and add regression tests covering both the present and absent cases (transformers v4 rope_scaling and v5 rope_parameters layouts). Signed-off-by: supermario_leo <leo.stack@outlook.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:
📝 WalkthroughWalkthroughThe PR extends Eagle-3 checkpoint conversion to preserve RoPE scaling configuration. The converter now extracts ChangesRoPE scaling parameter propagation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsLinked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@tests/unit/convert/test_eagle3_converter.py`:
- Around line 157-158: The test currently assumes llama_config.rope_parameters
is a dict-like and calls .get("factor") which can raise AttributeError when
rope_parameters is None; update the negative assertion to first verify that
llama_config.rope_parameters is not None before calling .get (or assert that it
is None), i.e., guard the access to llama_config.rope_parameters.get("factor")
in the test_eagle3_converter.py negative case so it mirrors the defensive check
used in the positive test and will not call .get on a None value.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5de00bae-00d1-45f2-b868-6a8ec2a5add1
📒 Files selected for processing (2)
src/speculators/convert/eagle/eagle3_converter.pytests/unit/convert/test_eagle3_converter.py
Remove the two regression tests added in fcb796f as suggested in review. The rope_scaling forwarding fix in eagle3_converter.py is unchanged. Signed-off-by: supermario_leo <leo.stack@outlook.com>
…kite (#608) ## Summary - Migrate `development.yml` and `main.yml` GPU test workflows from GitHub Actions to Buildkite - Add Buildkite pipeline with K8s plugin supporting H100 (WDC) and L4 (GCP) GPU clusters - Delete GHA GPU workflows and composite action - CPU-only workflows (quality, link-checks, stale) remain on GHA ## What changed ### Added - `.buildkite/pipeline.yml` — Dispatcher entry point with build gating, build summary, and dynamic GPU runner selection - `.buildkite/gpu-tests/gpu-tests-H100.yml` — H100 K8s pod spec with unit/integration test matrix - `.buildkite/gpu-tests/gpu-tests-L4.yml` — L4 K8s pod spec with unit/integration test matrix - `.buildkite/gpu-tests/scripts/run-tests.sh` — Test runner script (replaces GHA composite action) ### Deleted - `.github/workflows/development.yml` — PR GPU test workflow (replaced by Buildkite) - `.github/workflows/main.yml` — Main branch GPU test workflow (replaced by Buildkite) - `.github/actions/setup-test-env/action.yml` — Composite action (only used by GPU workflows) ## Design decisions - **Single pipeline** for both PR and main triggers - **Dispatcher pattern**: `pipeline.yml` dynamically uploads the correct GPU sub-pipeline based on runner selection - **Build gating**: Buildkite native `if` condition using `build.pull_request.labels` (same approach as vllm-omni, no GITHUB_TOKEN needed) - **Manual GPU runner selection**: H100 (default) or L4 via Buildkite UI Steps input on manual builds - **Automatic retry** (limit 3) for infrastructure failures (exit_status -1, 255, signal_reason agent_stop) ## Build gating GPU tests run when: - Manual build from Buildkite UI - Push to `main` or `release*` branch - PR has the `ready` label GPU tests are skipped for PRs without the `ready` label and feature branch pushes. ## Test matrix Python (3.10, 3.13) × transformers (<5.0.0, latest) — skipping py3.13 + transformers <5.0.0 = **3 combos × 2 suites = 6 jobs** ## Test plan - [x] H100 tests passing on Buildkite — [Build #554](https://buildkite.com/vllm/speculators/builds/554/list) - [x] L4 tests passing on Buildkite — [Build #555](https://buildkite.com/vllm/speculators/builds/555/list) - [x] PR label gate blocks builds without 'ready' label — [Build #574](https://buildkite.com/vllm/speculators/builds/574/summary) - [ ] Verify Cancel Intermediate Builds works for in-progress PR builds --------- Signed-off-by: Deepak Kumar <deepakku@redhat.com> Co-authored-by: Dipika Sikka <dipikasikka1@gmail.com>
Summary
Eagle3Converter._create_transformer_config_from_eaglebuilds the drafter'sLlamaConfigthroughbuild_llama_config_rope_kwargs(...), but only forwardsrope_theta— it never passesrope_scaling. As a result, any Eagle3 checkpoint converted for a rope-scaled target silently loses its RoPE scaling and falls back to default RoPE.This is inconsistent with the Eagle v1 converter, which already forwards it:
build_llama_config_rope_kwargsalready fully supportsrope_scaling(both the transformers v4rope_scalingand v5rope_parameterslayouts), so the value was simply not being threaded through.Impact
Drafters converted for common long-context targets — Llama‑3.1 / Llama‑3.3 (
rope_type: "llama3"), linear/dynamic NTK, YaRN — get a transformer config with default RoPE instead of the scaled RoPE, i.e. wrong positional encoding at long context. The conversion succeeds with no error, so the regression is silent.Fix
Forward
rope_scalingfrom the Eagle config, mirroring the v1 converter (one line).Tests
Added to
tests/unit/convert/test_eagle3_converter.py:test_config_preserves_rope_scaling— allama3scaling config survives conversion (asserts onrope_parametersfor transformers v5 andrope_scalingfor v4).test_config_no_rope_scaling_when_absent— regression guard: when the Eagle config has norope_scaling, none is introduced.The first test fails on
main(rope_typestays"default"instead of"llama3") and passes with this change. Fulltests/unit/convert/test_eagle3_converter.pypasses, andruff check,ruff format --check, andmypy --check-untyped-defsare clean.