Skip to content

Conversation

@gmarinho2
Copy link
Collaborator

FIX: #148

Currently the class SpyrePlatform uses the default max_tokens set in the OpenAI frontend code. This new method selects the warmup shape that fits the prompt and has the biggest shape['new_tokens']. This way SpyrePlatform will use the maximum number possible for token generation when max_tokens is not set in the request body.

@github-actions
Copy link

👋 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 🚀

@wallashss
Copy link
Collaborator

I think you should probably set this PR as draft and wait for the feedback of the vllm community on vllm-project/vllm#18557. This changes depends on that.

@gmarinho2 gmarinho2 marked this pull request as draft May 22, 2025 19:15
Copy link
Collaborator

@maxdebayser maxdebayser left a comment

Choose a reason for hiding this comment

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

LGTM, once the upstream PR gets merged.

@gmarinho2 gmarinho2 changed the title Add maybe_update_max_tokens for class SpyrePlatform Add get_max_output_tokens for class SpyrePlatform Jul 9, 2025
@maxdebayser maxdebayser marked this pull request as ready for review July 9, 2025 16:28
Signed-off-by: Gabriel Marinho <[email protected]>
@maxdebayser maxdebayser merged commit 13492ed into vllm-project:main Jul 9, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect default max_completion_tokens being set

3 participants