Skip to content

[diffusion] Per-section LoRA adapters on fused linear layers - #34933

Merged
AgainstEntropy merged 1 commit into
sgl-project:mainfrom
Rockdu:feat/fused-lora-shards
Aug 18, 2026
Merged

AgainstEntropy merged 1 commit into
sgl-project:mainfrom
Rockdu:feat/fused-lora-shards

Conversation

@zhihengy

@zhihengy zhihengy commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor
  • Compose unequal fused LoRA sections (e.g. GQA q/k/v) into one block-diagonal 2D A/B pair so the existing forward/merge/TP paths apply unchanged.
  • Enable LoRA for the Cosmos3 pipeline.
  • Update the weights updater to route per-section LoRA pairs into their fused layer and honor lora_merge_mode.

CI States

Latest PR Test (Base): ✅ Run #32064445576
Latest PR Test (Extra): ❌ Run #32064445291

@github-actions github-actions Bot added lora diffusion SGLang Diffusion labels Aug 15, 2026
@zhihengy
zhihengy force-pushed the feat/fused-lora-shards branch from a5c8ae9 to 052233c Compare August 16, 2026 03:19
@zhihengy zhihengy changed the title [diffusion] Per-shard LoRA adapters on fused linear layers [diffusion] Per-section LoRA adapters on fused linear layers Aug 16, 2026
@zhihengy
zhihengy force-pushed the feat/fused-lora-shards branch 2 times, most recently from a314177 to 7c44b18 Compare August 16, 2026 11:08
@niehen6174

Copy link
Copy Markdown
Collaborator

GQA q/k/v cannot stack into the 3D layout, so one option is to keep this as a loader-side fix: buffer fused lora_A/lora_B until both are complete, stack when shapes match, otherwise compose into one 2D pair and store the normal keys. The existing fused layer path should already handle that.

If that works for your case, linear.py, the extra pipeline methods, and the partial-group output_sizes lookup may not be needed. For IPC, it might be simpler to call the same helper instead of reimplementing it.

@zhihengy
zhihengy force-pushed the feat/fused-lora-shards branch 2 times, most recently from a5feb52 to 3caddd5 Compare August 17, 2026 08:45
@mickqian

Copy link
Copy Markdown
Collaborator

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Aug 17, 2026
@zhihengy
zhihengy force-pushed the feat/fused-lora-shards branch from 3caddd5 to 042623d Compare August 17, 2026 20:11
@AgainstEntropy

Copy link
Copy Markdown
Collaborator

/rerun-failed-ci

@AgainstEntropy
AgainstEntropy merged commit 772018f into sgl-project:main Aug 18, 2026
224 of 248 checks passed
longxin9715 added a commit to longxin9715/sglang that referenced this pull request Aug 18, 2026
…n-transport1

* 'main' of https://github.com/sgl-project/sglang: (255 commits)
  [Perf] Hoist DSv4 draft-extend SWA write locs; unify SWA graph buffer naming (sgl-project#34890)
  [Chore] Move version tag helper to release scripts (sgl-project#35196)
  [DSV4] Turn on mhc post pre fusion by default (sgl-project#35214)
  [diffusion] Per-section LoRA adapters on fused linear layers (sgl-project#34933)
  [XPU] Fix decode graph runner is_current_stream_capturing on non-CUDA devices (sgl-project#35050)
  [AMD] Update amd k3 cookbook for PR#34580 (sgl-project#35263)
  [Diffusion][Refactor] Refactor and extract complex RoPE implementation to layers/rotary_embedding for MOVA DiT (sgl-project#31453)
  refactor: rename chat response token IDs (sgl-project#35225)
  [mem_cache][8/N] refactor: move MambaPoolHost to pool_host.mamba (sgl-project#31180)
  [AMD] Fix Quark Shared Experts Fusion Gate after load-time-override Removal (sgl-project#35200)
  [AMD] Scope the EAGLE greedy-verify TP broadcast to ROCm only (sgl-project#35195)
  [AMD] Add the Kimi-K3 MI35x perf benchmarks in nightly (sgl-project#34985)
  Skip inkling sheared bias under batch invariance (sgl-project#35161)
  [AMD] Optimize KIMI-K3 with Triton MLA decode kernel by tuning the stage-1 geometry for gfx950 (sgl-project#34580)
  [Docs] Enable PD disaggregation for DSV4 low-latency recipes (sgl-project#35224)
  [DCP] Drop the prefill index-selection syncs by taking each rank's rows by stride (sgl-project#35084)
  [Feature] Optimize TP LMHead with All-to-All (sgl-project#32313)
  [XPU] Enable fused GDN QKV split Triton kernel on XPU (sgl-project#30144)
  [CPU] Explicitly import sgl_kernel in CPU kernel tests (sgl-project#35119)
  [diffusion] feat: load quantized H3 text encoder checkpoints (sgl-project#34986)
  ...

# Conflicts:
#	python/sglang/srt/multimodal/processors/base_processor.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

diffusion SGLang Diffusion lora run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants