Refactor consolidate transpose (#7934)
refactor(module_inject): consolidate duplicate transpose functions
- Extract the duplicated `transpose` function into
`deepspeed/module_inject/utils.py`.
- Remove redundant `transpose` definitions from `policy.py` and
`load_checkpoint.py`.
- This resolves an existing `TODO (lekurile)` to consolidate the
function across containers.
---------
Signed-off-by: nathon-lee <leejianwoo@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nathon-lee <248585198+nathon-lee@users.noreply.github.com>
Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>