downcast MiniMax-H3 position_ids at the device transfer on fp64-less backends (#14767)
Both layout steps build position_ids in float64 on CPU and then move it to the execution device with a plain .to(device), which raises on MPS. Pass the dtype through maybe_adjust_dtype_for_device so the transfer lands as float32 on mps/npu/neuron and is unchanged everywhere else. The fp64 construction is untouched, and MiniMaxH3RotaryPosEmbed.forward already casts position_ids to float32, so no device sees different rotary angles. Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
S
Sammy Tourani committed
e0abab83b5df05de9e7abd788643c1a7c1e42e28
Parent: bdc2bea
Committed by GitHub <noreply@github.com>
on 9/26/2026, 2:42:16 AM