You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: V1 engine ignores custom logits processors and does not implement min-p sampling
Problem
Custom logits processors: In the new V1 engine, specifying a logits_processor in SamplingParams for LLM.generate() has no effect. The code in gpu_model_runner.py never passes any sampling metadata into self.model.compute_logits(...), so the logits processor is silently ignored.
Min-p: Similarly, min_p (a sampling parameter supported in V0 akin to top_k and top_p) is not applied at all in V1. The sampler.py for the new engine appears to skip it entirely, so it never factors into the final token selection.
If those features are not yet supported, consider at least raising a warning or error to avoid silent failures.
Possible Fix for Logits Processor Issue
Create a new data class to hold relevant metadata for self.model.compute_logits(...).
Could simply hold request ids and and request states (CachedRequestState).
Patch LogitsProcessor.forward() inside logits_processor.py to handle the new V1 metadata class alongside old V0 SamplingMetadata class.
DefineLogitsProcessor._apply_logits_processor_v1(...) or something similar to properly handle preprocessed hidden_states tensor in V1 model runner, as opposed to re-using the V0 version.
Add min_p field to SamplingMetadata data class in metadata.py.
Modify forward function of Sampler in sampler.py to apply min-p filtering.
Before submitting a new issue...
Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
The text was updated successfully, but these errors were encountered:
Your current environment
vLLM Version: 0.7.0
Model Input Dumps
No response
🐛 Describe the bug
Issue: V1 engine ignores custom logits processors and does not implement min-p sampling
Problem
Custom logits processors: In the new V1 engine, specifying a
logits_processor
inSamplingParams
forLLM.generate()
has no effect. The code ingpu_model_runner.py
never passes any sampling metadata intoself.model.compute_logits(...)
, so the logits processor is silently ignored.Min-p: Similarly,
min_p
(a sampling parameter supported in V0 akin totop_k
andtop_p
) is not applied at all in V1. Thesampler.py
for the new engine appears to skip it entirely, so it never factors into the final token selection.If those features are not yet supported, consider at least raising a warning or error to avoid silent failures.
Possible Fix for Logits Processor Issue
self.model.compute_logits(...)
.CachedRequestState
).GPUModelRunner.execute_model(...)
.logits_processor.py
to handle the new V1 metadata class alongside old V0 SamplingMetadata class.LogitsProcessor._apply_logits_processor_v1(...)
or something similar to properly handle preprocessedhidden_states
tensor in V1 model runner, as opposed to re-using the V0 version.Possible Fix for Min-p Issue
InputBatch
ingpu_input_batch.py
.SamplingMetadata
data class inmetadata.py
.Sampler
insampler.py
to apply min-p filtering.Before submitting a new issue...
The text was updated successfully, but these errors were encountered: