Skip to content

Commit de79b8d

Browse files
committed
rotary embed in loop
1 parent 630cc70 commit de79b8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keras_hub/src/models/smollm3/smollm3_backbone.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@ def __init__(
118118
)
119119

120120
cache_update_index = kwargs.get('self_attention_cache_index')
121-
print(cache_update_index)
122121

123122
start_index = (
124123
cache_update_index if cache_update_index is not None else 0
125124
)
126125

127126
hidden_states = self.token_embedding(token_id_input)
128-
position_embeddings = self.rotary_embedding(hidden_states, start_index=start_index)
127+
129128

130129
for decoder_layer in self.transformer_layers[:num_layers]:
130+
position_embeddings = self.rotary_embedding(hidden_states, start_index=start_index)
131131
hidden_states = decoder_layer(
132132
hidden_states,
133133
position_embeddings=position_embeddings,

0 commit comments

Comments
 (0)