Skip to content

integration: bring heterogeneous GGUF cache into Qwen3.8 branch (conflict probe, closed) - #1

Closed
tmielsch wants to merge 4 commits into
qwen38-flash-next-gguffrom
upstream-pr-199-gguf-geometry-cache
Closed

integration: bring heterogeneous GGUF cache into Qwen3.8 branch (conflict probe, closed)#1
tmielsch wants to merge 4 commits into
qwen38-flash-next-gguffrom
upstream-pr-199-gguf-geometry-cache

Conversation

@tmielsch

@tmielsch tmielsch commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Temporary conflict-probe PR only. GitHub reported the expected conflicts between upstream FlashML-org#232 and the FlashML-org#102/FlashML-org#199 stack, so it was closed without merge. The compatible generic GGUF/geometry-cache blobs are being ported selectively into qwen38-flash-next-gguf instead.

probe and others added 4 commits August 23, 2026 19:55
Adds the laguna GGUF architecture: hybrid full/SWA attention with per-layer
query-head counts, QK RMSNorm, per-layer-type rope (YaRN partial-dim on full
layers, plain rope on SWA), a per-head softplus attention output gate, and
sigmoid + score-correction-bias MoE routing with one always-on shared expert.
Semantics follow llama.cpp src/models/laguna.cpp.

Poolside/Unsloth laguna checkpoints quantize per tensor, so this also
generalizes the GGUF plumbing:

- six more ggml types (Q3_K, Q4_K, Q5_K, IQ1_S, IQ2_S, IQ2_XXS, IQ3_XXS,
  IQ4_XS) wired into the dequant tables and mmvq/mmq/dequant dispatch
- a "gguf" expert-bank format whose per-layer quant types vary: flat padded
  [E, stride] host banks plus a new expert_stride_bytes argument threaded
  through the vendored moe_vec launchers (0 = previous dense behaviour)
- moe_vec calls chunked to min(65535, 16384) rows: the kernel indexes experts
  via blockIdx.z (CUDA grid-z cap 65535) and a 16k-token x top-8 prefill chunk
  also overflowed transient VRAM
- q/k/v kept as separate projections (a layer may quantize attn_v differently
  from attn_q/k -- observed on the XS Q4_K_M build)
- deferred GGUF linears materialized from the file's tensor table at conversion
  time, before the engine collects the state dict

Tested on: RTX 5080 (16 GB), 23 GB RAM, NVIDIA 610.62, CUDA 13,
wsl2. Checkpoints: unsloth/Laguna-S-2.1-GGUF (Laguna-S-2.1-UD-IQ1_S.gguf,
S, metadata/tensor coverage only) and poolside/Laguna-XS-2.1-GGUF
(Laguna-XS-2.1-Q4_K_M.gguf) plus a third-party APEX-I-Mini XS build
(Q3_K/Q4_K/Q5_K/Q6_K/IQ2_S) run end to end.

Validation on Laguna-XS-2.1-APEX-I-Mini.gguf:
  ft serve --model <model> --kv-cache-dtype fp8_e4m3 --num-tokens 262144 --kv-reserve-tokens 262144
- NIAH 3/3 at 250,054 tokens (needle at 10%/50%/90% depth, exact passcode),
  ~433 tok/s prefill
- decode 157-162 tok/s at 64k ctx, 21-23 tok/s at ~250k ctx (PCIe-bound)

Not done: S-model e2e (host lacked RAM for its ~37 GiB expert banks), hybrid/cpu
MoE backend for the gguf format, FTW conversion, TP>1. See tasks/laguna-handover.md.

Co-Authored-By: Claude <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@tmielsch tmielsch closed this Aug 28, 2026
@tmielsch tmielsch changed the title integration: bring heterogeneous GGUF cache into Qwen3.8 branch integration: bring heterogeneous GGUF cache into Qwen3.8 branch (conflict probe, closed) Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants