-
Notifications
You must be signed in to change notification settings - Fork 437
Add support for dLLM encoder-decoder models (DiffusionGemma) [tied-weight PTQ export support ] #1707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
juhi10071998
wants to merge
8
commits into
NVIDIA:main
Choose a base branch
from
juhi10071998:northbloom
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add support for dLLM encoder-decoder models (DiffusionGemma) [tied-weight PTQ export support ] #1707
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
47d4ab6
Onboard DiffusionGemma (northbloom) block-diffusion text model to hf_…
juhi10071998 60d4ebb
moe export: alias bit-identical per-expert buffers between tied modules
juhi10071998 225072b
export: alias bit-identical buffers between tied dense Linears
juhi10071998 a0d9b65
export: opt-in reorder of tied-weight aliases to canonical-side names
juhi10071998 e351c0f
export: max-merge tied input_quantizer amaxes; alias input_scale buffers
juhi10071998 d684477
quantization: exclude self_conditioning from default disabled_quantizers
juhi10071998 d0a735e
tests: cover tied-weight dedup, canonical reorder, and input-amax sync
juhi10071998 0543907
docs: add CHANGELOG entry for tied-weight PTQ support
juhi10071998 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docstring contradicts implementation for
input_scalealiasing.Line 51 states
input_scale is left per-side, but line 221 explicitly aliasesinput_scalealong withweight_scaleandweight_scale_2. The implementation comment at lines 195-198 correctly explains thatinput_scaleIS aliased becausesync_tied_input_amaxruns earlier.📝 Suggested docstring fix
Tied-experts dedup: when multiple fused-expert modules share their 3-D source params via HF ``_tied_weights_keys``, the unpacking creates fresh per-expert tensors that break the tie. We cache the source ``data_ptr()`` at entry and on a later cache hit alias the per-expert ``weight`` / - ``weight_scale`` / ``weight_scale_2`` back to the prior module so - downstream dedup catches them. ``input_scale`` is left per-side. + ``weight_scale`` / ``weight_scale_2`` / ``input_scale`` back to the prior + module so downstream dedup catches them. ``input_scale`` aliasing is safe + because ``sync_tied_input_amax`` runs earlier and max-merges the shared + input_quantizer amaxes, so both sides derive bit-identical values.🤖 Prompt for AI Agents