Skip to content

Preserve rope_scaling when building Eagle3 transformer config - #574

Merged
fynnsu merged 5 commits into
vllm-project:mainfrom
SuperMarioYL:fix/eagle3-converter-preserve-rope-scaling
Jun 18, 2026
Merged

Preserve rope_scaling when building Eagle3 transformer config#574
fynnsu merged 5 commits into
vllm-project:mainfrom
SuperMarioYL:fix/eagle3-converter-preserve-rope-scaling

Conversation

@SuperMarioYL

Copy link
Copy Markdown
Contributor

Summary

Eagle3Converter._create_transformer_config_from_eagle builds the drafter's LlamaConfig through build_llama_config_rope_kwargs(...), but only forwards rope_theta — it never passes rope_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:

# src/speculators/convert/eagle/eagle_converter.py
**build_llama_config_rope_kwargs(
    rope_theta=eagle_config.get("rope_theta", 10000.0),
    rope_scaling=eagle_config.get("rope_scaling"),   # <-- forwarded
),

# src/speculators/convert/eagle/eagle3_converter.py (before this PR)
**build_llama_config_rope_kwargs(
    rope_theta=eagle_config.get("rope_theta", 10000.0),
    # rope_scaling dropped
),

build_llama_config_rope_kwargs already fully supports rope_scaling (both the transformers v4 rope_scaling and v5 rope_parameters layouts), 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_scaling from the Eagle config, mirroring the v1 converter (one line).

Tests

Added to tests/unit/convert/test_eagle3_converter.py:

  • test_config_preserves_rope_scaling — a llama3 scaling config survives conversion (asserts on rope_parameters for transformers v5 and rope_scaling for v4).
  • test_config_no_rope_scaling_when_absent — regression guard: when the Eagle config has no rope_scaling, none is introduced.

The first test fails on main (rope_type stays "default" instead of "llama3") and passes with this change. Full tests/unit/convert/test_eagle3_converter.py passes, and ruff check, ruff format --check, and mypy --check-untyped-defs are clean.

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>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fa13e500-aaca-42e4-b44f-cd82f3eb8676

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR extends Eagle-3 checkpoint conversion to preserve RoPE scaling configuration. The converter now extracts rope_scaling from the Eagle3 config and passes it to the RoPE builder, enabling the generated LlamaConfig to reflect scaling settings from the source checkpoint. Two tests validate the behavior for both Transformers versions and handle the regression case where scaling is absent.

Changes

RoPE scaling parameter propagation

Layer / File(s) Summary
RoPE scaling parameter passing and tests
src/speculators/convert/eagle/eagle3_converter.py, tests/unit/convert/test_eagle3_converter.py
_create_transformer_config_from_eagle now passes eagle_config.get("rope_scaling") into build_llama_config_rope_kwargs. Tests verify that rope_scaling is correctly mapped to rope_parameters (Transformers v5) or rope_scaling (Transformers v4) when present, and confirm no scaling fields are introduced when the Eagle3 config omits rope_scaling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • vllm-project/speculators#462: Introduced the initial RoPE-argument wiring refactor for newer Transformers versions that this PR extends to rope_scaling propagation.

Suggested labels

bug, eagle3

Suggested reviewers

  • shanjiaz
  • dsikka
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and clearly summarizes the main change: forwarding rope_scaling in Eagle3 converter configuration to preserve RoPE scaling settings during conversion.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the bug, its impact on rope-scaled targets, and the fix with supporting test details.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Linked repositories: Your configuration references 1 linked repositories, but your current plan allows 0. Analyzed ``, skipped vllm-project/vllm.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added bug Something isn't working eagle3 labels Jun 4, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 4c7240f and fcb796f.

📒 Files selected for processing (2)
  • src/speculators/convert/eagle/eagle3_converter.py
  • tests/unit/convert/test_eagle3_converter.py

Comment thread tests/unit/convert/test_eagle3_converter.py Outdated

@fynnsu fynnsu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pr!

Comment thread tests/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>
@fynnsu fynnsu added the ready This PR is ready for review label Jun 17, 2026
dsikka added a commit that referenced this pull request Jun 18, 2026
…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>
@fynnsu
fynnsu merged commit f8f53f4 into vllm-project:main Jun 18, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working eagle3 ready This PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants