fix RoPE t range issue for fp16#26602
Conversation
|
Seems fair, WDYT @Rocketknight1 ? |
|
This will cause outputs to change numerically a bit when running in |
|
After testing, outputs seem equivalent for |
|
@rui-ren let me know if you want to add anything else to this PR, or if you're happy for me to merge it now! |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
|
@Rocketknight1 Please merge this PR. Thank you for your review. |
|
Done. Thanks for a clean and helpful PR @rui-ren! |
Issue
Sometimes training with
fp16, thedtypeofself.inv_freqwill be changed fromfp32tofp16. This scenario will cause the positiontto use dtype offp16, likeAfter converting to onnx graph, however, Range Ops in
onnxdo not supportfp16as hereUpdate
Use the below to avoid this scenario