Skip to content

[Clarification] Rename launch_vllm.py -> launch_vllm_hidden_states.py#820

Open
WindChimeRan wants to merge 1 commit into
vllm-project:mainfrom
WindChimeRan:rename-launch-vllm-hidden-states
Open

[Clarification] Rename launch_vllm.py -> launch_vllm_hidden_states.py#820
WindChimeRan wants to merge 1 commit into
vllm-project:mainfrom
WindChimeRan:rename-launch-vllm-hidden-states

Conversation

@WindChimeRan

@WindChimeRan WindChimeRan commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Purpose

TLDR: scripts/launch_vllm.py is slow because it always producing hidden states. So the name should not be generic.

scripts/launch_vllm.py always configures vLLM as a hidden-states producer (writes tensors to --hidden-states-path on every request), but its generic name reads like a plain-server launcher. So it gets reached for in workflows that only want vllm serve (e.g. response regeneration).

Rename it to launch_vllm_hidden_states.py, update all references, and add a one-line module docstring plus a one-sentence CLI-ref note. Pure rename + reference updates; no behavior change.

Tests

  • git grep 'launch_vllm\.py' / launch_vllm.md / launch_vllm/ → all empty.

Checklist

I have filled in:

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan/results, such as providing test command and pasting the results.
  • (Optional) The necessary documentation update.
  • I (a human) have written or reviewed the code in this pr to the best of my ability.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

The PR standardizes hidden-state extraction workflows on launch_vllm_hidden_states.py, updating the launcher metadata, training examples, E2E helper, CLI navigation, tutorials, commands, and references.

Hidden-states launcher migration

Layer / File(s) Summary
Launcher contract and references
scripts/launch_vllm_hidden_states.py, hs_connectors/src/hs_connectors/transfer.py
Adds launcher documentation and updates backend references to the hidden-states script.
Training and E2E launch wiring
examples/train/*, tests/e2e/utils.py, tests/e2e/{regression,smoke}/*
Switches example and E2E server launches to launch_vllm_hidden_states.py while preserving existing arguments and lifecycle behavior.
CLI and tutorial documentation
docs/cli/*, docs/user_guide/tutorials/*
Updates navigation, workflow diagrams, command examples, troubleshooting instructions, and CLI links to the hidden-states launcher.

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% 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 clearly and concisely states the main change: renaming the launcher script.
Description check ✅ Passed The description matches the changeset and explains the rename, reference updates, and lack of behavior changes.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@mergify mergify Bot added the documentation Improvements or additions to documentation label Jul 19, 2026
@WindChimeRan
WindChimeRan force-pushed the rename-launch-vllm-hidden-states branch from bb8f37d to 88eb70a Compare July 19, 2026 02:45
@WindChimeRan WindChimeRan changed the title Rename launch_vllm.py -> launch_vllm_hidden_states.py [Clarification] Rename launch_vllm.py -> launch_vllm_hidden_states.py Jul 19, 2026
The script always configures vLLM as a hidden-states producer
(extract_hidden_states + a kv_producer kv_transfer_config writing to
--hidden-states-path), but its generic name reads like a plain-server
launcher. Rename to make the specialization obvious, update all
references, and add a one-line module docstring plus a CLI-ref note
pointing plain-server users (e.g. response regeneration) at `vllm serve`.

Pure rename + reference updates; no behavior change.

Signed-off-by: Ranran Haoran Zhang <ranzhang@redhat.com>
@WindChimeRan
WindChimeRan force-pushed the rename-launch-vllm-hidden-states branch from 88eb70a to 4a75a77 Compare July 19, 2026 02:52
@WindChimeRan
WindChimeRan marked this pull request as ready for review July 19, 2026 02:53

@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 `@docs/cli/launch_vllm_hidden_states.md`:
- Line 5: Update the documentation sentence near the `--hidden-states-path`
reference to qualify that requests write tensors there only when using the
default file-based `--hidden-states-backend`, or describe the destination
behavior for each supported backend. Ensure the statement does not imply that
non-file backends write to this path.
🪄 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: 1ab09816-05aa-4cd6-9dca-42092f508f7a

📥 Commits

Reviewing files that changed from the base of the PR and between 065ecd2 and 4a75a77.

📒 Files selected for processing (23)
  • docs/.nav.yml
  • docs/cli/data_generation_offline.md
  • docs/cli/index.md
  • docs/cli/launch_vllm_hidden_states.md
  • docs/cli/train.md
  • docs/user_guide/tutorials/train_dflash_online.md
  • docs/user_guide/tutorials/train_eagle3_offline.md
  • docs/user_guide/tutorials/train_eagle3_online.md
  • docs/user_guide/tutorials/train_mtp_online.md
  • docs/user_guide/tutorials/train_peagle_offline.md
  • examples/train/dflash_qwen3_8b_sharegpt_online_5k.sh
  • examples/train/dspark_qwen3_0_6b_sharegpt_online.sh
  • examples/train/eagle3_llama3_8b_ultrachat_offline_5k.sh
  • examples/train/eagle3_qwen3_8b_sharegpt_online_5k.sh
  • examples/train/mtp_qwen3_5_9b_gsm8k_online.sh
  • examples/train/peagle_qwen3_8b_sharegpt_online_5k.sh
  • hs_connectors/src/hs_connectors/transfer.py
  • scripts/launch_vllm_hidden_states.py
  • tests/e2e/regression/test_eagle3_offline_acceptance.py
  • tests/e2e/regression/test_eagle3_online_acceptance.py
  • tests/e2e/smoke/test_offline_training.py
  • tests/e2e/smoke/test_online_training.py
  • tests/e2e/utils.py


Launches a vLLM server configured for hidden states extraction, used for online training or offline hidden states generation.

Every request writes hidden-state tensors to `--hidden-states-path`; for a plain server (e.g. response regeneration) use `vllm serve`.

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Qualify the output-path claim for alternate backends.

The launcher supports selectable --hidden-states-backend implementations, while --hidden-states-path is backend-specific. Saying every request writes tensors to that path is inaccurate for non-file backends. Limit this statement to the default file backend or document backend-specific destinations.

As per path instructions, documentation changes must be accurate and complete.

🤖 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 `@docs/cli/launch_vllm_hidden_states.md` at line 5, Update the documentation
sentence near the `--hidden-states-path` reference to qualify that requests
write tensors there only when using the default file-based
`--hidden-states-backend`, or describe the destination behavior for each
supported backend. Ensure the statement does not imply that non-file backends
write to this path.

Source: Path instructions

@fynnsu

fynnsu commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

I'm not entirely sold on this. We already have docstrings and an argparse description making it clear this is for hidden states extraction. I get that we could make this more explicit, but I'm not convinced its necessary.

@mergify

mergify Bot commented Jul 24, 2026

Copy link
Copy Markdown

Merge Protections

🔴 1 of 1 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require approval from approved reviewers list 👀 reviews

🔴 Require approval from approved reviewers list

Waiting for any of

  • approved-reviews-by = dsikka
  • approved-reviews-by = fynnsu
  • approved-reviews-by = orestis-z
  • approved-reviews-by = rahul-tuli
  • approved-reviews-by = shanjiaz
This rule is failing.

All pull requests must have at least one approving review from a member of the approved reviewers list before merging.

  • any of:
    • approved-reviews-by = dsikka
    • approved-reviews-by = fynnsu
    • approved-reviews-by = orestis-z
    • approved-reviews-by = rahul-tuli
    • approved-reviews-by = shanjiaz

@WindChimeRan

Copy link
Copy Markdown
Contributor Author

@fynnsu

docstrings and an argparse description

No one actually read it (both human and agent).

issue: people & agent frequently use launch_vllm.py for regen, which is wrong. (it'll be super slow due to saving hidden state to disk) (I think I saw it 3 times, one by my own claude agent, one by a user in an issue, one by #847)

Also

scripts/ is not in the wheel. so the only valid way is installing from main from source.

I recommend ship the file renaming first (file renaming is the smallest fix for it), then re-design the UX, by merging some scripts functionalities to the src/

@mergify

mergify Bot commented Jul 25, 2026

Copy link
Copy Markdown

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @WindChimeRan.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-rebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants