From 4a3fddd055333f2eeb4ba58cdbf374e449ce3c3a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 23 Jul 2024 11:23:00 -0700 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index 8fc480d149..474dad329e 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -1067,13 +1067,14 @@ class LlamaExtendedRotaryEmbedding(torch.nn.Module): super().__init__() if config is not None: # [TODO] Hack to pass in config - need to remove later + print(1) base = config.rope_theta partial_rotary_factor = config.partial_rotary_factor if hasattr(config, "partial_rotary_factor") else 1.0 dim = int((config.hidden_size // config.num_attention_heads)) device = "cuda" max_position_embeddings = config.max_position_embeddings pass - + self.dim = dim self.max_position_embeddings = max_position_embeddings self.base = base