Fix yarn `mscale_all_dim` for DeepSeek v2 and Mistral 4 (#47435)
* Fix yarn `mscale_all_dim` for DeepSeek v2 and Mistral 4
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
* Extract to global function
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
* Add test
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
---------
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>