2525import mlx .core as mx
2626import mlx .nn as nn
2727
28- from ..patches .qwen3_5_attention import force_text_only_rope
29-
3028logger = logging .getLogger (__name__ )
3129
3230
@@ -270,14 +268,9 @@ def __call__(
270268 position_ids = mx .broadcast_to (
271269 positions [None , :, None ], (3 , B , L )
272270 )
273- # Decode never adds new image tokens; the broadcast
274- # collapses the 3 mRoPE sections to identical values,
275- # so the patched Qwen3_5Attention can skip its per-layer
276- # .item() probes and take the plain-RoPE branch directly.
277- with force_text_only_rope ():
278- result = self ._language_model (
279- input_ids , cache = cache , position_ids = position_ids , ** kwargs
280- )
271+ result = self ._language_model (
272+ input_ids , cache = cache , position_ids = position_ids , ** kwargs
273+ )
281274 else :
282275 result = self ._language_model (
283276 input_ids , cache = cache , ** kwargs
@@ -293,10 +286,9 @@ def __call__(
293286 position_ids = mx .broadcast_to (
294287 offsets [None , :, None ], (3 , B , L )
295288 )
296- with force_text_only_rope ():
297- result = self ._language_model (
298- input_ids , cache = cache , position_ids = position_ids , ** kwargs
299- )
289+ result = self ._language_model (
290+ input_ids , cache = cache , position_ids = position_ids , ** kwargs
291+ )
300292 else :
301293 result = self ._language_model (
302294 input_ids , cache = cache , ** kwargs
0 commit comments