Skip to content

Commit 9b76446

Browse files
Update model_patcher.py
1 parent c7b2d28 commit 9b76446

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

optimum/exporters/openvino/model_patcher.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4363,8 +4363,7 @@ def lm_forward(self, attention_mask, position_ids, past_key_values, inputs_embed
43634363
)
43644364
hidden_states = outputs[0]
43654365
# Only compute necessary logits, and do not upcast them to float if we are not computing the loss
4366-
slice_indices = slice(-1, None)
4367-
logits = self.lm_head(hidden_states[:, slice_indices, :])
4366+
logits = self.lm_head(hidden_states)
43684367
return (logits, outputs.past_key_values.to_legacy_cache())
43694368

43704369
model.__orig_forward = model.forward

0 commit comments

Comments
 (0)