Update gemma.py

This commit is contained in:
Daniel Han-Chen 2024-02-25 03:03:31 +11:00
commit c96e8c28f8

View file

@ -85,7 +85,7 @@ class FastGemmaRotaryEmbedding(torch.nn.Module):
emb_new = torch.cat((freqs, freqs), dim=-1)
logger.warning_once(str(torch.dist(emb_old, emb_new)))
return emb_new.cos().to(dtype=x.dtype), emb_new.sin().to(dtype=x.dtype)
return emb_old.cos().to(dtype=x.dtype), emb_old.sin().to(dtype=x.dtype)
pass