Skip to content

Duplicate the SamplingMetadata class #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 8, 2025
Merged

Conversation

maxdebayser
Copy link
Collaborator

@maxdebayser maxdebayser commented Jul 3, 2025

We were previously reusing the GPU SamplingMetadata class but there have been incompatible changes upstream (PR vllm-project/vllm#16728)

Since it's not clear for now whether we want, should or can reuse the LogitsProcessor implementation as is, I'm making temporarily making a copy of the old versions of the files that we need for the spyre backend.

This won't affect any features for now since the vllm change was an internal refactoring without UX impact.

Follow-up issue to give a definitive solution: https://github.ibm.com/ai-foundation/aiu-app-sw-tracker/issues/804

We were previously reusing the GPU SamplingMetadata
class but there have been incompatible changes upstream
(PR vllm-project/vllm#16728)

Since it's not clear for now whether we want, should
or can reuse the LogitsProcessor implementation as is,
I'm making a copy of the old version of the class for
the spyre backend.

This won't affect any features for now since the vllm
change was an internal refactoring without UX impact.

Signed-off-by: Max de Bayser <[email protected]>
Copy link

github-actions bot commented Jul 3, 2025

👋 Hi! Thank you for contributing to vLLM support on Spyre.
Just a reminder: Make sure that your code passes all the linting checks, otherwise your PR won't be able to be merged. To do so, first install the linting requirements, then run format.sh and commit the changes. This can be done with uv directly:

uv sync --frozen --group lint --active --inexact

Or this can be done with pip:

uv pip compile --group lint > requirements-lint.txt
pip install -r requirements-lint.txt
bash format.sh

Now you are good to go 🚀

Signed-off-by: Max de Bayser <[email protected]>
Signed-off-by: Max de Bayser <[email protected]>
Signed-off-by: Max de Bayser <[email protected]>
Signed-off-by: Max de Bayser <[email protected]>
Copy link
Collaborator

@yannicks1 yannicks1 left a comment

Choose a reason for hiding this comment

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

If this is the preferred way to tackle these breaking changes upstream, then it LGTM.

Comment on lines 10 to 11
# This is a copy of the vLLM vllm file prior to PR
# https://github.com/vllm-project/vllm/pull/16728
Copy link
Collaborator

Choose a reason for hiding this comment

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

duplicate lines 3-4

@joerunde
Copy link
Collaborator

joerunde commented Jul 7, 2025

We were previously reusing the GPU SamplingMetadata class

I don't think that class is gpu-specific though, right? It's the sampling metadata used by all in-tree platforms supported by vllm

@maxdebayser
Copy link
Collaborator Author

I don't think that class is gpu-specific though, right? It's the sampling metadata used by all in-tree platforms supported by vllm

No, for example, in the TPU it's a different class: vllm/v1/sample/tpu/metadata.py

Copy link
Collaborator

@prashantgupta24 prashantgupta24 left a comment

Choose a reason for hiding this comment

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

Any chance we can rebase this to get merged to vllm-main-updates instead of main?

@maxdebayser
Copy link
Collaborator Author

Any chance we can rebase this to get merged to vllm-main-updates instead of main?

Sorry, I'm not sure I understand. These commits here are already in vllm-main-updates, rght?

@prashantgupta24
Copy link
Collaborator

Any chance we can rebase this to get merged to vllm-main-updates instead of main?

Sorry, I'm not sure I understand. These commits here are already in vllm-main-updates, rght?

You're right, I said that just in case we wanted to merge any new changes

Signed-off-by: Max de Bayser <[email protected]>
@joerunde joerunde enabled auto-merge (squash) July 8, 2025 17:12
@github-actions github-actions bot added the ready label Jul 8, 2025
@joerunde joerunde merged commit 785a5d5 into main Jul 8, 2025
17 of 19 checks passed
@joerunde joerunde deleted the fix_sampling_metadata branch July 8, 2025 17:17
maxdebayser added a commit that referenced this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants