We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 68a9788 commit 0779d69Copy full SHA for 0779d69
unsloth/models/llama.py
@@ -1051,6 +1051,10 @@ def LlamaModel_fast_forward(
1051
# Also, transformers 4.45.0 supports granite but with the attention refactor (it always had the refactor)
1052
# unsloth's check for granite too has "version >= 4.45.0 (rightly so)".
1053
# so let granite always use the attention refactor implementation.
1054
+
1055
+ self.rotary_emb.extend_rope_embedding(
1056
+ hidden_states, self.config.max_position_embeddings
1057
+ )
1058
position_embeddings = self.rotary_emb.get_cached(
1059
self.config.max_position_embeddings, hidden_states.device.index
1060
)
0 commit comments