Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
3f770f44
Unverified
Commit
3f770f44
authored
Nov 12, 2025
by
Isotr0py
Committed by
GitHub
Nov 11, 2025
Browse files
[Performance] Cache loaded custom logitsprocs to avoid overheads (#28462)
Signed-off-by:
Isotr0py
<
mozf@mail2.sysu.edu.cn
>
parent
48c87936
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vllm/v1/sample/logits_processor/__init__.py
vllm/v1/sample/logits_processor/__init__.py
+8
-2
No files found.
vllm/v1/sample/logits_processor/__init__.py
View file @
3f770f44
...
...
@@ -5,7 +5,7 @@ import inspect
import
itertools
from
abc
import
abstractmethod
from
collections.abc
import
Sequence
from
functools
import
partial
from
functools
import
lru_cache
,
partial
from
typing
import
TYPE_CHECKING
import
torch
...
...
@@ -216,11 +216,17 @@ def build_logitsprocs(
)
cached_load_custom_logitsprocs
=
lru_cache
(
_load_custom_logitsprocs
)
def
validate_logits_processors_parameters
(
logits_processors
:
Sequence
[
str
|
type
[
LogitsProcessor
]]
|
None
,
sampling_params
:
SamplingParams
,
):
for
logits_procs
in
_load_custom_logitsprocs
(
logits_processors
):
logits_processors
=
(
tuple
(
logits_processors
)
if
logits_processors
is
not
None
else
None
)
for
logits_procs
in
cached_load_custom_logitsprocs
(
logits_processors
):
logits_procs
.
validate_params
(
sampling_params
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment