@@ -150,9 +150,7 @@ def _cast_embeddings(
150150 return cos , sin
151151
152152 def forward (self , op : builder .OpBuilder , position_ids : ir .Value ):
153- cos , sin = get_rotary_pos_emb (
154- op , position_ids , self .cos_cache , self .sin_cache
155- )
153+ cos , sin = get_rotary_pos_emb (op , position_ids , self .cos_cache , self .sin_cache )
156154 return self ._cast_embeddings (op , cos , sin )
157155
158156
@@ -306,9 +304,7 @@ def forward(self, op: builder.OpBuilder, position_ids: ir.Value):
306304 )
307305 offset = op .Mul (use_long , self .original_max_position_embeddings )
308306 position_ids = op .Add (position_ids , offset )
309- cos , sin = get_rotary_pos_emb (
310- op , position_ids , self .cos_cache , self .sin_cache
311- )
307+ cos , sin = get_rotary_pos_emb (op , position_ids , self .cos_cache , self .sin_cache )
312308 return self ._cast_embeddings (op , cos , sin )
313309
314310
@@ -394,9 +390,7 @@ def find_correction_dim(num_rotations):
394390 self ._llama4_original_max_pos = float (original_max_pos )
395391
396392 def forward (self , op : builder .OpBuilder , position_ids : ir .Value ):
397- cos , sin = get_rotary_pos_emb (
398- op , position_ids , self .cos_cache , self .sin_cache
399- )
393+ cos , sin = get_rotary_pos_emb (op , position_ids , self .cos_cache , self .sin_cache )
400394 cos , sin = self ._cast_embeddings (op , cos , sin )
401395 if self ._llama4_beta is None :
402396 return cos , sin
0 commit comments