Repository navigation
[Transformers backend] Support batch-sharded sampling - #66545
Merged
DarkLight1337 merged 2 commits intoNov 9, 2026
Merged
Conversation
Implement `compute_logits_local` in the backend's `CausalMixin` so that `enable_batch_sharded_sampling` is no longer silently disabled for Transformers modeling backend models, matching native Llama. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This was referenced Nov 9, 2026
hmellor
marked this pull request as ready for review
November 9, 2026 11:15
DarkLight1337
approved these changes
Nov 9, 2026
DarkLight1337
left a comment
Member
There was a problem hiding this comment.
Tbh we should have defined this method in the model interface but that's outside the scope of this PR. cc @WoosukKwon
Member
|
/ci run |
DarkLight1337
enabled auto-merge (squash)
November 9, 2026 11:27
|
✅ Triggered Buildkite CI #101090 for commit ℹ️ This PR is 48 commits behind upstream |
20 of 24 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Add
compute_logits_localto the Transformers modeling backend's causal models, so batch-sharded sampling (enable_batch_sharded_sampling) works for them as it does for native Llama. Part of serving Llama with the backend (#66547).Claims
Validation
B200, Llama-3.2-1B-Instruct, TP=2:
2 passed.
[llama-transformers]fails onmain(AssertionError: [False, False]: the sharded sampler never ran).Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
🤖 Generated with Claude Code