fix(server): do not warp prefill logits (#116)
This commit is contained in:
parent
1a2d68250a
commit
c0795de2f2
|
@ -75,6 +75,10 @@ class NextTokenChooser:
|
|||
|
||||
def __call__(self, input_ids, scores):
|
||||
# Warp logits
|
||||
if scores.shape[0] > 1:
|
||||
# only warp the last token logits
|
||||
scores[-1:, :] = self.warpers(input_ids, scores[-1:, :])
|
||||
else:
|
||||
scores = self.warpers(input_ids, scores)
|
||||
|
||||
# Compute logprobs
|
||||
|
|
Loading…
Reference in New Issue