From 5c31fd1e5b17697df30087a4436f1d0234ffda1a Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Sun, 25 Feb 2024 02:34:18 +1100 Subject: [PATCH] Update gemma.py --- unsloth/models/gemma.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unsloth/models/gemma.py b/unsloth/models/gemma.py index 7e8d7345bc..a88c387618 100644 --- a/unsloth/models/gemma.py +++ b/unsloth/models/gemma.py @@ -82,8 +82,8 @@ class FastGemmaRotaryEmbedding(torch.nn.Module): freqs = (inv_freq_expanded @ position_ids_expanded).transpose(1, 2) emb_new = torch.cat((freqs, freqs), dim=-1) - print(torch.dist(emd_old, emd_new)) - return emb.cos().to(dtype=x.dtype), emb.sin().to(dtype=x.dtype) + print(torch.dist(emb_old, emb_new)) + return emb_new.cos().to(dtype=x.dtype), emb_new.sin().to(dtype=x.dtype) pass