Repository navigation
FLUX.3 Klein fused family; one-time device move of fused group constants (0.13.0) - #19
Merged
Merged
Conversation
… constants (0.13.0) - orbitquant.fused.families.flux3 fuses Black Forest Labs' native flux3.dit.DiT: per-mode and single-stream blocks with Q|K|V and SwiGLU GEMMs over one set of codes, Q/K RMSNorm + RoPE in one kernel and gated residuals in the GEMM epilogues. A mode whose tokens share one time embedding computes its AdaLN modulation on one row. - Fused groups built on the host kept their codebook surrogate codes on the CPU and copied them to the GPU in every decode: a blocking transfer per GEMM. The constants now move to the weight device once. On an RTX 5090 this cuts FLUX.3 Klein 1024x1024 generation from 2.44 s to 2.06 s with bit-identical images. - The activation quantizer no longer copies a plain bf16 input before rotating it; it writes only the token norms.
Owner
Author
|
GPU checks, RTX 5090, Torch 2.12.1 CUDA 13.0:
|
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.
Changes
orbitquant.fused.families.flux3fuses Black Forest Labs' nativeflux3.dit.DiT(FLUX.3 Image Klein): per-mode and single-stream blocks, Q|K|V and SwiGLU GEMMs over one set of activation codes, Q/K RMSNorm and RoPE in one kernel, gated residuals in the GEMM epilogues. A mode whose tokens share one time embedding computes its AdaLN modulation on one row.Measurements
One RTX 5090, Torch 2.12.1 CUDA 13.0, FLUX.3 Klein W4A4 release, 1024x1024, warm median:
The images are bit-identical to the 0.12.0 runtime for both workloads. *The peak also includes loader changes in the model bundle (text encoder trimming, expandable allocator segments).
Checks
GPU test run and kernel checks on the RTX 5090 are in progress; results will be added here before merge.