mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 03:35:17 +08:00
[Bugfix] Use random hidden states in dummy sampler run (#18543)
Signed-off-by: Bowen Wang <abmfy@icloud.com>
This commit is contained in:
parent
71075029f2
commit
4e04eceb58
@ -1721,6 +1721,10 @@ class GPUModelRunner(LoRAModelRunnerMixin):
|
||||
self,
|
||||
hidden_states: torch.Tensor,
|
||||
) -> torch.Tensor:
|
||||
# The dummy hidden states may contain special values,
|
||||
# like `inf` or `nan`.
|
||||
# To avoid breaking the sampler, we use a random tensor here instead.
|
||||
hidden_states = torch.rand_like(hidden_states)
|
||||
|
||||
logits = self.model.compute_logits(hidden_states, None)
|
||||
num_reqs = logits.size(0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user