feat: GDN GGUF/AWQ dual-layout support (mod16 + div3)

SU
4mo ago
+868-89

Summary

Support both GGUF (mod16) and AWQ/transformers (div3) packed layouts for GDN layers:

  • Dual-layout pack/unpack paths in gdn_linear_attn, switched by VLLM_GDN_GGUF_LAYOUT (GGUF=mod16, default AWQ=div3)
  • Fix div3 v->k head mapping in packed decode (root cause of wrong answers: 12*8=9 before fix)
  • Quantized-layer input must be fp16 for Marlin kernels (CT/WNA16 has no .weight; AWQ/GGUF qweight is int32 packed); GGUF FP32 mode (VLLM_GGUF_FP32=1) keeps fp32
  • GGUF multimodal detection via mmproj; shard ordering/splitting for merged in_proj_qkvz
  • Microbenchmark-pinned Triton configs (chunk_o / chunk_delta_h)

Verification / benchmark (dual RTX 2080Ti, TP2)

itemGGUF (mod16)AWQ (div3)
end-to-end load + servevalidatedvalidated
arithmetic sanity (12*8)96 (was 9 before div3 fix)96
GGUF FP32 mode (VLLM_GGUF_FP32=1)validatedn/a
  • Both routes smoke-tested on real Qwen3.5 27B GDN checkpoints
  • Microbenchmark-optimal Triton configs applied (from kernel sweeps on this hardware)

Notes

  • GGUF route: VLLM_GDN_GGUF_LAYOUT=1; AWQ route: leave unset
  • Deployment with GGUF multimodal requires the mmproj file

⚠️ Applying this PR alone (important)

This PR is one of a 4-PR series (one concern per PR, per the maintainer's review guidance). The four together form the complete feature set the SM75 serving stack depends on:

PRconcerndependency
#106int8 per-tensor KV cachefoundation
#107GDN GGUF/AWQ dual-layoutREQUIRED to serve GDN models
#108disable custom AR during profilingindependent
#109Triton decode fast pathdepends on #106

Applying only a subset leaves the tree incomplete and unsafe for the production serve environment:

  • Without #107, serving a GDN (Qwen3.5-style) model fails at engine init ( / worker exception during CUDA-graph capture). On the reference hardware this produced a systemd loop; the repeated load window escalated into a GPU Xid 154 (recovery action 0x2, Node Reboot Required). The incomplete tree is NOT a safe state.
  • Without #106, #109 has no int8 KV infrastructure to accelerate.
  • Merge order: #106 → #107 → #108 → #109 (or merge all four together).