NPU Training Operators - RoPE MRoPE

导言

MindSpeed core_r0.16.0--use-fused-rotary-pos-emb 是普通 RoPE 路径:freqs -> cos/sin -> npu_rotary_position_embedding(x, cos, sin, mode)torch_npu 另有 npu_rotary_mulnpu_interleave_ropenpu_mrope,其中 npu_mrope 可以覆盖推理侧多模态 MRoPE;这和 Megatron Bridge 的 config.apply_rope_fusion 不是同一个开关。

客户报错 Qwen3VLMultimodalRotaryEmbedding has no attribute get_rotary_seq_len 的直接含义是:Qwen3-VL 的 MRoPE 对象被送进了 Megatron Core 的普通 rope 分支。先修正分支:position_embedding_type="mrope"apply_rope_fusion=False。如果要用 NPU MRoPE fused,应在 q/k rotary apply 处显式接 torch_npu.npu_mrope,不是打开普通 apply_rope_fusion

Read more