Content-Length: 272729 | pFad | http://github.com/vllm-project/vllm-spyre/pull/179/files/671ed65b7e3f22da057afd5097cfa1d127ae1ae5

A3 Add maybe_update_max_tokens for class SpyrePlatform by gmarinho2 · Pull Request #179 · vllm-project/vllm-spyre · GitHub
Skip to content

Add maybe_update_max_tokens for class SpyrePlatform #179

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions vllm_spyre/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,16 @@ def _get_matching_warmup_shapes(
if prompt_len <= shape['prompt_length']
and max_tokens <= shape['new_tokens']
]

@classmethod
def maybe_update_max_tokens(self, prompt_len: int,
default_max_tokens: int) -> int:
if self._warmup_shapes is None:
return default_max_tokens

max_new_tokens = 1
for shape in self._warmup_shapes:
if prompt_len <= shape['prompt_length']:
max_new_tokens = max(max_new_tokens, shape['new_tokens'])

return max_new_tokens








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/vllm-project/vllm-spyre/pull/179/files/671ed65b7e3f22da057afd5097cfa1d127ae1ae5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy