Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/evidence/amd-speed-20261114/addendum-4bit-quality/BAR-section1.md # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / evidence / amd-speed-20261114 / addendum-4bit-quality / BAR-section1.md` 52 lines · 4173 bytes Raw Blame History Rendered 1 ## 1. Acceptance bar (fixed 2026-11-13, before any 4-bit quality number existed) 2 3 ### What is compared 4 Teacher-forced CPU forward passes (float32 arithmetic) of the Qwen3.8-27B text model (64 layers + final norm + 5 lm_head), checkpoint `Qwen/Qwen3.8-27B-FP8` rev ``017b9c7af6b5689d5dd426a76e0bc077eb5ca20a``, run on the Spark CPU one 6 layer at a time by `tools/q4eval.py`. Every arm uses the same code, tokens and order; only weights differ: 7 8 | Arm | Linear weights | Activation into those linears | 9 |---|---|---| 10 | `fp8` (reference) | E4M3 x BF16 block scale, decoded exactly to float32 | float32 | 11 | `q4` (candidate A) | Q4D8-1 from the container for every FP8 linear of the 64 layers (GDN `in_proj_qkv`/`in_proj_z` at seg 4, all others seg 16); lm_head BF16 | Q4D8 activation format (CONTAINER.md section 2), exactly what the kernel consumes | 12 | `q4keep` (candidate B) | as `q4`, but GDN `in_proj_qkv`/`in_proj_z` stay FP8 | Q4D8 format only into Q4 linears | 13 | `q4+lmq4` (lm_head variant, final-hidden of `q4`) | as `q4`, plus lm_head Q4D8 seg 16 | as `q4` | 14 15 Norms, convolution, A_log, dt_bias, `in_proj_a`/`in_proj_b`, embeddings and everything else are the checkpoint's own 16 BF16 values in every arm. MTP and vision are not run. 17 18 ### Fixed inputs (token ids recorded with sha256 in `evidence/data.json` before the run) 19 1. **Perplexity text:** WikiText-2 raw test file (`wiki.test.raw`), the first 2048 tokens as 2 windows of 1024, 20 scored on positions 1..1023 of each window (2046 predictions). 21 2. **Lighthouse prompt:** `oracle/lighthouse256.json` from CUDApp ``dc536882`` (30 prompt + 256 generated ids). 22 3. **Coding prompt:** the GOLD prompt and its 24 generated ids from `oracle/driver-real2.py` at CUDApp ``dc536882``. 23 4. **Task benchmark:** ARC-Challenge test (Hugging Face `allenai/ai2_arc`, revision 24 ``210d026faf9955653af8916fad021475a3f00453``, `ARC-Challenge/test-00000-of-00001.parquet`), the first 100 rows in 25 file order, zero-shot: `Question: ...` then one line per choice `A. text`, then `Answer:`; the 26 prediction is the choice letter whose token (` A`, ` B`, ...) has the largest logit at the last position. 27 28 ### Thresholds, chosen from published 4-bit results before measuring 29 Sources (FORMAT.md section 2): paired AWQ int4 g128 vs FP8 on this model, 99.1-99.99 % recovery 30 ([nicosuter](https://github.com/nicosuter/Qwen3.8-27B-AWQ/blob/master/results/2026-08-23-published-quants/README.md)); 31 Q4_K_M top-1 agreement with BF16 about 96 % ([kingy.ai audit, via Umar Salim](https://umarsalim.com/blog/quantising-qwen3-8-27b-where-quality-plateaus)); 32 NVIDIA NVFP4 within 1.54 points on six benchmarks ([aexol summary](https://aexol.ai/benchmarks/quant/qwen-3.8-27b)). 33 34 | # | Measure | Pass when | 35 |---|---|---| 36 | B1 | Perplexity ratio `PPL(arm) / PPL(fp8)` on input 1 | <= 1.03 | 37 | B2 | Top-1 agreement with `fp8` over every scored position of inputs 1-3 (2046 + 256 + 24 = 2326 positions) | >= 94 % | 38 | B3 | Top-1 agreement with `fp8` on the 280 generated positions of inputs 2 and 3 (teacher-forced on the fixture ids) | >= 95 % | 39 | B4 | Mean KL(fp8 ‖ arm) per position over inputs 1-3, nats | <= 0.05 | 40 | B5 | ARC-100: items `fp8` gets right and the arm gets wrong, minus the reverse | <= 3 | 41 42 Also reported, no threshold: ARC-100 accuracy of each arm, the free-running first-divergence index of each arm on 43 inputs 2 and 3 (exact when `fp8`'s own teacher-forced argmax equals the fixture), the per-linear relative output 44 error on real activations, and per-tensor weight error. 45 46 **Decision rule (fixed now):** candidate A ships if it passes B1-B5. Otherwise candidate B ships if it passes 47 B1-B5 (so the `q4keep` arm is run only when `q4` fails; the first run is `fp8` + `q4`). Otherwise the result is FAIL, with the numbers. The Q4 lm_head is adopted only if `q4+lmq4` also passes 48 B1-B5; otherwise lm_head stays BF16. No threshold, input or arm definition changes after the first arm starts; a 49 wrong bar gets a dated correction file beside this one, never an edit. 50 51 The bar is a check on agreement with the FP8 checkpoint at this scale (2.3k positions, 100 items), not a claim 52 about long-context, multilingual or agentic behaviour, which are NOT_RUN.