Skip to content

Commit 2c674dc

Browse files
committed
refactor rotary embeddings
1 parent 8aebfd1 commit 2c674dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

keras_hub/src/models/smollm3/smollm3_causal_lm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def call_with_cache(
7070
x = self.backbone.token_embedding(token_ids)
7171

7272
# Each decoder layer has a cache; we update them separately.
73-
position_embeddings = self.backbone.rotary_embedding(x)
73+
position_embeddings = self.backbone.rotary_embedding(x, start_index=cache_update_index)
7474
updated_cache = []
7575
for i in range(self.backbone.num_layers):
7676
current_cache = cache[:, i, ...]

0 commit comments

Comments
 (0)