Skip to content

Consider fuller-NVFP4 Qwen3.8-27B weight profile #70

Description

@cometkim

I read this in the nvfp4 profile description.

NVFP4 MLP weights in Text layers 0–55 and row-scaled FP8 for the token embedding, attention input/output projections, GDN Q/K/V/Z and output projections, output head, and remaining MLP weights

I guess it is came from Unsloth's checkpoint, but I wondered that is really useful. Because if we use nvfp4 here more aggressively, we could get more space for KV cache.

I built and validated a fuller-NVFP4 weight profile for qwen3.8-27b that extends NVFP4 from the MLP (layers 0–55) to nearly the whole Text backbone, using the exception pattern already registered for qwen3.6-27b-nvfp4

  • every Text MLP parent NVFP4 (0–55 copied bit-exact from unsloth, 56–63 quantized locally)
  • every GDN query_key_value_z + GDN output on 47/48 layers,
  • full-attention query_key_gate_value on the 10 deepest layers, attention/output on 14/16,
  • nine BF16 exception parents (layers 3,7,11,15,19,23 input; 3,7 attention output; 4 GDN output),
  • W8G32_F16S embedding/head instead of row-scaled FP8.

Result: 17.07 GiB vs the registered profile's 20.02 GiB, with no significant quality loss observed (GPQA 89.39% vs 90.40%, a two-question difference on single-sample runs at n=198)

Why this fits the existing engine

No new kernels are needed.

Every NVFP4 op class at these exact shapes already runs for qwen3.6-27b-nvfp4. The engine-side change is one WeightsProfile value whose binder reuses the qwen3.6 NVFP4 allocation pattern (with this target's fused a_b_projection naming) plus W8 endpoints — the same shape as the existing Qwen38Nvfp4 case.

Evidence

Quality (registered serving profile: thinking, MTP3, INT8 KV, 262,144 ctx; EvalScope 1.9.0, 0-shot rule scoring, temp 0.6, seed 42, single sample):

Benchmark nvfp4full registered nvfp4 (published)
GPQA-Diamond 89.39% (177/198) 90.40% (179/198)

Per-tensor fidelity vs the BF16 source (relative Frobenius error, same metric both rows):

locally quantized parents unsloth-copied parents
max / typical 0.0951 / ~0.0948 0.126 / ~0.11

Speed (RTX 5090, same engine binary, greedy):

Regime nvfp4full registered nvfp4
Prefill 8,032 tok (MTP0) 9,536 tok/s 7,749 tok/s (+23%)
Decode @8k ctx (MTP0) 72.9 tok/s 63.7 tok/s (+14.5%)
Decode @8k ctx (MTP3) 166.4 tok/s 159.9 tok/s (+4%)

Memory at 262,144-token INT8 KV: 4.91 GiB free after startup (registered profile: 2.22 GiB; its published eval ceiling was 252,928 tokens). Full native context now fits with room to spare.

Links

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions