DFlash GGUF missing sliding-window metadata -> draft acceptance collapses beyond short contexts

#10
by Dreadbyte - opened

laguna-s-2.1-DFlash-BF16.gguf is missing sliding-window metadata → draft acceptance collapses to ~0% beyond short contexts

Summary

The published DFlash draft GGUF (laguna-s-2.1-DFlash-BF16.gguf) carries no
dflash.attention.sliding_window key. The drafter's HF config
(poolside/Laguna-S-2.1-DFlash/config.json)
declares all 6 layers as sliding_attention with window 512:

"layer_types": ["sliding_attention", ...x6],
"sliding_windows": [512, 512, 512, 512, 512, 512]

but the GGUF metadata contains only:

dflash.context_length = 1048576
dflash.rope.freq_base = 500000.0
(no dflash.attention.sliding_window, no pattern)

The laguna branch of poolsideai/llama.cpp treats SWA as optional when loading
the dflash arch (src/models/dflash.cpp, load_arch_hparams), so the drafter
silently runs full global attention. That is in-distribution for prompts
shorter than the 512-token window and increasingly out-of-distribution beyond
it.

Observed impact

llama.cpp (fork @ 04b2b72), Laguna-S-2.1 UD-Q3_K_M target, greedy sampling,
--spec-draft-n-max 15:

Context depth mean accepted draft len (as published) (after fix)
~70 tok 3.61 3.61 (unchanged, inside window)
~18k tok 1.01 (acceptance 0.07% — drafts never survive) 2.12

After the fix, a depth ladder over the same document (1.7k → 18k tokens) is flat
and non-monotonic (mean len 2.28–3.16), i.e. the positional defect is gone and
the remaining variance is content.

Fix

Rewriting the GGUF with two added keys fully restores long-context drafting:

dflash.attention.sliding_window          = 512        (u32)
dflash.attention.sliding_window_pattern  = [1,1,1,1,1,1]  (u32 array)

(The pattern array is required by the fork's loader once sliding_window is
set.) No tensor changes needed.

Suggestions

  1. Re-publish the GGUF with the SWA metadata (this also affects CUDA users —
    it is not a backend-specific issue).
  2. Consider a loader-side warning or hard error in the fork when a dflash
    model whose training config is all-SWA is loaded without window metadata —
    the failure is silent and only visible as mysteriously bad long-context
    acceptance.

Happy to share the patched-GGUF script and full
benchmark logs (2× AMD MI50, ROCm).

Hi @Dreadbyte , thanks for flagging it - we've discovered some issues with the uploaded GGUF configs yesterday and we'll be updating the checkpoints soon. I'll make sure to update this thread once they're fixed.

Hi @Dreadbyte it's fixed! 🙏

Sign up or log in to comment