Skip to content

feat(dev-swift-v5): Add --dp_balance switch for twinkle DP workload balancing - #10502

Open
lincq2000 wants to merge 1 commit into
modelscope:dev-swift-v5from
lincq2000:feat/dp-balance-switch
Open

lincq2000 wants to merge 1 commit into
modelscope:dev-swift-v5from
lincq2000:feat/dp-balance-switch

Conversation

@lincq2000

Copy link
Copy Markdown
Contributor

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Depends on modelscope/twinkle#367; merge that first.

twinkle's TransformersModel now balances the DP workload by default. This PR adds a switch for it:

  • TrainConfig.dp_balance (default True); --dp_balance false turns it off.
  • builders/model.py passes it to the twinkle TransformersModel constructor.

Passes TrainConfig.dp_balance to twinkle's TransformersModel, which by
default reorders each Ray slice_dp batch so the DP ranks get similar
workloads. --dp_balance false turns it off.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant