Skip to content

Conversation

chaodengusc
Copy link

Summary:
Added a check to validate if zch config is compatible between the source model and the target model. This update is to avoid incorrectly MaaS transfer.

For example if the bucket number in the source model is 16 and the number in the target mdoel is 12, even if the zch table size stays the same between these two models, we should apply MPZCH transfer, instead of a noraml transfer, because each row in the source table could map to a different location in the target table.

In this update:

  1. We added bucket number into state_dict in the checkpoint
  2. We compared the bucket numbers between a source model and a target model during transfer.
  3. If the bucket number in the source cannot be divided by the number in the target, we raise an exception.

Differential Revision: D83580368

Summary:
Added a check to validate if zch config is compatible between the source model and the target model. This update is to avoid incorrectly MaaS transfer.

For example if the bucket number in the source model is 16 and the number in the target mdoel is 12, even if the zch table size stays the same between these two models, we should apply MPZCH transfer, instead of a noraml transfer, because each row in the source table could map to a different location in the target table.

In this update:
1. We added bucket number into state_dict in the checkpoint
2. We compared the bucket numbers between a source model and a target model  during transfer.
3. If the bucket number in the source cannot be divided by the number in the target, we raise an exception.

Differential Revision: D83580368
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 1, 2025
@facebook-github-bot
Copy link
Contributor

@chaodengusc has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83580368.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants