From 8720678ba695f903cb11bef79948663138372dbe Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 21 Mar 2025 16:44:10 -0700 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index c2c278ec22..30af5c0798 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -929,9 +929,9 @@ def LlamaModel_fast_forward_inference( temp_mlp = torch.empty((2, bsz, 1, mlp_size), dtype = X.dtype, device = "cuda:0") temp_gate, temp_up = temp_mlp[0], temp_mlp[1] - print(type(past_key_values), len(past_key_values)) - seq_len = past_key_values[0][0].shape[-2] + + print(type(past_key_values), len(past_key_values), seq_len) if bsz != 1: attention_mask = _prepare_4d_causal_attention_mask_for_sdpa( attention_mask,