Repository navigation
add modular blockset for diffusion gemma - #14978
Open
akshan-main wants to merge 2 commits into
Open
akshan-main wants to merge 2 commits into
akshan-main wants to merge 2 commits into
Conversation
Contributor
|
Hi @akshan-main, thanks for the PR! It does not appear to link an issue it fixes. If this PR addresses an existing issue, please add a closing keyword (e.g. Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Once the PR links an issue (or gets the |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
Adds a modular blockset for DiffusionGemma:
DiffusionGemmaBlocks+DiffusionGemmaModularPipeline, with a text encoder step, a generation setup step (canvas layout, KV cache, EOS state), a scheduler setup step that splits the budget into predictor and corrector steps, a canvas loop that prefills, denoises and appends each block, and a decode step that trims at EOS and detokenizes. It is the first modular pipeline with text output. The checkpoint keeps its weights at the repository root, so the docs build the components by hand as in the standard usage.Outputs match
DiffusionGemmaPipelinetoken for token with shared components and seed, on the tiny components and ongoogle/diffusiongemma-26B-A4B-itin bf16 (one and two canvases, temperature sampling, a batch of two prompts of different lengths, and the static cache path). The tests include the batched adaptive-stopping cases from #14386. Test components live in akshan-main/tiny-diffusion-gemma-modular-pipe.The first commit is the loader fix from #14661 (a transformers model folder that shadows a pipeline folder resolved to the wrong library, which broke save and reload here) and drops out once that lands. #14661 also makes the scheduler accept CPU generators on CUDA, which the GPU runs of the modular tests need.
Before submitting
Who can review?
@yiyixuxu @sayakpaul