Skip to content

feat(gallery): add Qwen DFlash speculative-decoding models#10791

Merged
mudler merged 1 commit into
masterfrom
worktree-gallery-qwen-dflash
Jul 12, 2026
Merged

feat(gallery): add Qwen DFlash speculative-decoding models#10791
mudler merged 1 commit into
masterfrom
worktree-gallery-qwen-dflash

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

What

Adds four ready-to-run DFlash speculative-decoding entries to the model gallery for the llama-cpp backend, now that upstream DFlash support (draft-dflash, ggml-org/llama.cpp#22105, merged 2026-06-28) is in the pinned llama.cpp (e3546c7).

Gallery name Target (Q4_K_M) DFlash drafter (Q8_0)
qwen3-4b-dflash unsloth/Qwen3-4B-GGUF lym00/Qwen3-4B-DFlash-GGUF-Test
qwen3.5-9b-dflash unsloth/Qwen3.5-9B-GGUF lym00/Qwen3.5-9B-DFlash-GGUF-Test
qwen3.6-27b-dflash unsloth/Qwen3.6-27B-GGUF Alittlehammmer/Qwen3.6-27B-DFlash-GGUF-llama.cpp
qwen3.6-35b-a3b-dflash unsloth/Qwen3.6-35B-A3B-GGUF (UD-Q4_K_M) Alittlehammmer/Qwen3.6-35B-A3B-DFlash-GGUF-llama.cpp

Each entry bundles a full target model plus its small z-lab block-diffusion drafter and configures:

flash_attention: "on"          # DFlash requires flash attention
draft_model: <drafter>.gguf
options:
  - use_jinja:true
  - spec_type:draft-dflash
  - spec_n_max:15

How DFlash works

The drafter emits a whole block of tokens in one forward pass (block diffusion) and consumes the target model's hidden states, so it stays tiny while drafting is GPU-friendly. The drafter is not a standalone chat model; it only runs paired with its target, which is why both are bundled per entry. A GPU is recommended.

Note on the 4B entry

It pairs the base Qwen3-4B target (not Qwen3.5-4B). The only upstream-compatible 4B drafter reports general.name = "Qwen3 4B DFlash" / general.basename = "Qwen3", i.e. it is trained for Qwen3-4B and is the canonical pairing documented upstream (z-lab/Qwen3-4B-DFlash + Qwen/Qwen3-4B). The Anbeeld / psychopenguin "Qwen3.5-4B-DFlash" GGUFs use the fork-only dflash-draft / DFlashDraftModel architecture and would fail to load in the upstream backend, so they were deliberately not used.

Verification

  • Backend support: confirmed draft-dflash is registered in the pinned llama.cpp (common_speculative_type_from_name_map).
  • Drafter load-compatibility: every drafter was downloaded and its GGUF general.architecture confirmed to be dflash (not dflash-draft / DFlashDraftModel).
  • Integrity: every drafter SHA256 was verified against the downloaded bytes (they equal the HF x-linked-etag, which is distinct from x-xet-hash on these Xet repos, i.e. the true content hash). Target SHA256s use the HF content hash.
  • go test ./core/config/meta/ and go test ./core/gallery/ pass (override keys valid, index parses).

Not verified: end-to-end acceptance/speedup on a GPU (config-and-integrity verification per scope).

🤖 Generated with Claude Code

Add four ready-to-run DFlash speculative-decoding entries for the
llama.cpp backend, now that upstream DFlash support (draft-dflash) is in
the pinned llama.cpp. Each entry bundles a full target model with its
small z-lab block-diffusion drafter and sets spec_type:draft-dflash,
spec_n_max:15, and flash attention (required by DFlash):

- qwen3-4b-dflash          (Qwen3-4B + Qwen3-4B-DFlash drafter)
- qwen3.5-9b-dflash        (Qwen3.5-9B + Qwen3.5-9B-DFlash drafter)
- qwen3.6-27b-dflash       (Qwen3.6-27B dense + drafter)
- qwen3.6-35b-a3b-dflash   (Qwen3.6-35B-A3B MoE + drafter)

The 4B pair uses the base Qwen3-4B target (not Qwen3.5-4B): its drafter
reports general.name "Qwen3 4B DFlash" and is the canonical pairing
documented upstream. All drafters were downloaded and verified to carry
GGUF architecture "dflash" (not the fork-only "dflash-draft" /
"DFlashDraftModel") so they load in the upstream backend, and every
drafter SHA256 was confirmed against the downloaded bytes.

Signed-off-by: Ettore Di Giacinto <[email protected]>
Assisted-by: Claude:claude-opus-4-8 [Claude Code]
@mudler mudler merged commit fb0f5e4 into master Jul 12, 2026
66 checks passed
@mudler mudler deleted the worktree-gallery-qwen-dflash branch July 12, 2026 09:14
richiejp pushed a commit to richiejp/LocalAI that referenced this pull request Jul 16, 2026
)

Add four ready-to-run DFlash speculative-decoding entries for the
llama.cpp backend, now that upstream DFlash support (draft-dflash) is in
the pinned llama.cpp. Each entry bundles a full target model with its
small z-lab block-diffusion drafter and sets spec_type:draft-dflash,
spec_n_max:15, and flash attention (required by DFlash):

- qwen3-4b-dflash          (Qwen3-4B + Qwen3-4B-DFlash drafter)
- qwen3.5-9b-dflash        (Qwen3.5-9B + Qwen3.5-9B-DFlash drafter)
- qwen3.6-27b-dflash       (Qwen3.6-27B dense + drafter)
- qwen3.6-35b-a3b-dflash   (Qwen3.6-35B-A3B MoE + drafter)

The 4B pair uses the base Qwen3-4B target (not Qwen3.5-4B): its drafter
reports general.name "Qwen3 4B DFlash" and is the canonical pairing
documented upstream. All drafters were downloaded and verified to carry
GGUF architecture "dflash" (not the fork-only "dflash-draft" /
"DFlashDraftModel") so they load in the upstream backend, and every
drafter SHA256 was confirmed against the downloaded bytes.

Assisted-by: Claude:claude-opus-4-8 [Claude Code]

Signed-off-by: Ettore Di Giacinto <[email protected]>
Co-authored-by: Ettore Di Giacinto <[email protected]>
Signed-off-by: Richard Palethorpe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants