diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 4a6be0c569..2f7e357eb2 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -741,7 +741,7 @@ def LlamaForCausalLM_fast_forward( hidden_states = outputs[0] bsz, q_len, hd = hidden_states.shape - if bsz == 1 and q_len == 1: + if False:#bsz == 1 and q_len == 1: logits = torch.mv(self.lm_head.weight, hidden_states.ravel()) logits = logits.unsqueeze(0).unsqueeze(0) else: diff --git a/unsloth/models/mistral.py b/unsloth/models/mistral.py index 76f9af11e0..1d7a3e7fba 100644 --- a/unsloth/models/mistral.py +++ b/unsloth/models/mistral.py @@ -214,7 +214,7 @@ def MistralForCausalLM_fast_forward( hidden_states = outputs[0] bsz, q_len, hd = hidden_states.shape - if bsz == 1 and q_len == 1: + if False:#bsz == 1 and q_len == 1: logits = torch.mv(self.lm_head.weight, hidden_states.ravel()) logits = logits.unsqueeze(0).unsqueeze(0) else: