mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-31 12:47:10 +08:00
compute_logits
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
This commit is contained in:
parent
631b5b47c1
commit
bc73f674bb
@ -178,7 +178,7 @@ class GPUModelRunner:
|
|||||||
num_reqs=num_reqs,
|
num_reqs=num_reqs,
|
||||||
device=self.device,
|
device=self.device,
|
||||||
)
|
)
|
||||||
logits = self.model.compute_logits(hidden_states, None)
|
logits = self.model.compute_logits(hidden_states)
|
||||||
self.sampler(logits, sampling_metadata)
|
self.sampler(logits, sampling_metadata)
|
||||||
|
|
||||||
def profile_run(self) -> None:
|
def profile_run(self) -> None:
|
||||||
@ -377,7 +377,7 @@ class GPUModelRunner:
|
|||||||
input_batch: InputBatch,
|
input_batch: InputBatch,
|
||||||
) -> SamplerOutput:
|
) -> SamplerOutput:
|
||||||
sample_hidden_states = hidden_states[input_batch.logits_indices]
|
sample_hidden_states = hidden_states[input_batch.logits_indices]
|
||||||
logits = self.model.compute_logits(sample_hidden_states, None)
|
logits = self.model.compute_logits(sample_hidden_states)
|
||||||
pos = input_batch.positions[input_batch.logits_indices]
|
pos = input_batch.positions[input_batch.logits_indices]
|
||||||
idx_mapping_np = input_batch.idx_mapping_np
|
idx_mapping_np = input_batch.idx_mapping_np
|
||||||
num_reqs = logits.shape[0]
|
num_reqs = logits.shape[0]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user