[PR #1336] [CLOSED] perf: opt-in compact fills for the Q8 secondary miss cache #3394

Closed
opened 2026-11-07 14:41:12 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1336
Author: @CC-David-CC
Created: 10/7/2026
Status: ❌ Closed

Base: main ← Head: perf/q8-compact-fill-main


📝 Commits (5)

  • b77c90c cuda: add opt-in read-only Q8 miss cache with compact fill traversal
  • 7150182 docs: record focused qualification and measured results
  • 468f01f Merge current main and preserve the opt-in read-only Q8 cache
  • 9a80b91 docs: validate compact Q8 fill against current main
  • 5d8844d Merge Strata v0.1.43 into perf/q8-compact-fill-main

📊 Changes

18 files changed (+8966 additions, -4 deletions)

View changed files

📝 CMakeLists.txt (+14 -2)
➕ docs/experiments/compact-q8-main/README.md (+38 -0)
➕ docs/experiments/compact-q8-main/current-main-refresh/README.md (+40 -0)
➕ docs/experiments/compact-q8-main/current-main-refresh/model-results.json (+4232 -0)
➕ docs/experiments/compact-q8-main/reproduce/README.md (+5 -0)
➕ docs/experiments/compact-q8-main/reproduce/case.py (+206 -0)
➕ docs/experiments/compact-q8-main/reproduce/memory_samples.py (+33 -0)
➕ docs/experiments/compact-q8-main/reproduce/plan.json (+141 -0)
➕ docs/experiments/compact-q8-main/results.json (+932 -0)
➕ docs/experiments/compact-q8-main/results.png (+0 -0)
➕ docs/experiments/compact-q8-main/results.svg (+2732 -0)
📝 include/strata/core/verify.hpp (+6 -0)
➕ include/strata/kernels/captured_branch.hpp (+21 -0)
➕ include/strata/kernels/readonly_miss_cache.hpp (+56 -0)
📝 src/core/verify.cpp (+63 -2)
➕ src/kernels/cuda/readonly_miss_cache.cu (+156 -0)
➕ tools/compact_miss_fill_bench.cu (+85 -0)
➕ tools/readonly_miss_cache_fixture.cu (+206 -0)

📄 Description

Adds an opt-in CUDA Q8 secondary expert cache and compact miss-fill path. New cache/fill switches remain off by default. Refreshed onto current main, preserving the newer backend build blocks and verifier includes.

Fresh RTX PRO 6000 Blackwell / Qwen3.8-Flash-Next Q8_0 / FP16 KV checks used 8192 fresh input and 512 output tokens, mmap PLE, fixed expert placement and no adaptive swaps. Default-off candidate matched main's complete output IDs. With 16 secondary-cache ways and MTP width 4, compact-fill off/on also matched full output IDs. All five function checks passed, with zero prompt reuse.

The observed width-4 decode rates were 109.301 tokens/s with compact fill off and 118.464 with it on; these are single fixed-order observations with warm filesystem caches, not a general speedup claim. Secondary copies cost additional VRAM, and historical results remain separately dated.

CUDA sm86 builds, read-only cache and byte/tail-guard fill fixtures passed. HIP gfx1012 and standalone SYCL builds passed; the implementation is CUDA-only and those builds do not claim cache functionality on other backends. Fresh results, source/binary identities, full output IDs and scope. Original design, usage and preserved reproduction.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/1336 **Author:** [@CC-David-CC](https://github.com/CC-David-CC) **Created:** 10/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `perf/q8-compact-fill-main` --- ### 📝 Commits (5) - [`b77c90c`](https://github.com/Niko1221/Strata/commit/b77c90ca3d210c842ff1ba26f03ddb2f4d9eecfb) cuda: add opt-in read-only Q8 miss cache with compact fill traversal - [`7150182`](https://github.com/Niko1221/Strata/commit/71501822fcc08a1cb2226f60dd41903796a2ca65) docs: record focused qualification and measured results - [`468f01f`](https://github.com/Niko1221/Strata/commit/468f01f18d9277448f12d995af7ad2c4338c6fd1) Merge current main and preserve the opt-in read-only Q8 cache - [`9a80b91`](https://github.com/Niko1221/Strata/commit/9a80b916827189dee140f313e284280b3fc75235) docs: validate compact Q8 fill against current main - [`5d8844d`](https://github.com/Niko1221/Strata/commit/5d8844da43f8495ebf529340fcf502ded2a00a37) Merge Strata v0.1.43 into perf/q8-compact-fill-main ### 📊 Changes **18 files changed** (+8966 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+14 -2) ➕ `docs/experiments/compact-q8-main/README.md` (+38 -0) ➕ `docs/experiments/compact-q8-main/current-main-refresh/README.md` (+40 -0) ➕ `docs/experiments/compact-q8-main/current-main-refresh/model-results.json` (+4232 -0) ➕ `docs/experiments/compact-q8-main/reproduce/README.md` (+5 -0) ➕ `docs/experiments/compact-q8-main/reproduce/case.py` (+206 -0) ➕ `docs/experiments/compact-q8-main/reproduce/memory_samples.py` (+33 -0) ➕ `docs/experiments/compact-q8-main/reproduce/plan.json` (+141 -0) ➕ `docs/experiments/compact-q8-main/results.json` (+932 -0) ➕ `docs/experiments/compact-q8-main/results.png` (+0 -0) ➕ `docs/experiments/compact-q8-main/results.svg` (+2732 -0) 📝 `include/strata/core/verify.hpp` (+6 -0) ➕ `include/strata/kernels/captured_branch.hpp` (+21 -0) ➕ `include/strata/kernels/readonly_miss_cache.hpp` (+56 -0) 📝 `src/core/verify.cpp` (+63 -2) ➕ `src/kernels/cuda/readonly_miss_cache.cu` (+156 -0) ➕ `tools/compact_miss_fill_bench.cu` (+85 -0) ➕ `tools/readonly_miss_cache_fixture.cu` (+206 -0) </details> ### 📄 Description Adds an opt-in CUDA Q8 secondary expert cache and compact miss-fill path. New cache/fill switches remain off by default. Refreshed onto current main, preserving the newer backend build blocks and verifier includes. Fresh RTX PRO 6000 Blackwell / Qwen3.8-Flash-Next Q8_0 / FP16 KV checks used 8192 fresh input and 512 output tokens, mmap PLE, fixed expert placement and no adaptive swaps. Default-off candidate matched main's complete output IDs. With 16 secondary-cache ways and MTP width 4, compact-fill off/on also matched full output IDs. All five function checks passed, with zero prompt reuse. The observed width-4 decode rates were 109.301 tokens/s with compact fill off and 118.464 with it on; these are single fixed-order observations with warm filesystem caches, not a general speedup claim. Secondary copies cost additional VRAM, and historical results remain separately dated. CUDA sm86 builds, read-only cache and byte/tail-guard fill fixtures passed. HIP gfx1012 and standalone SYCL builds passed; the implementation is CUDA-only and those builds do not claim cache functionality on other backends. [Fresh results, source/binary identities, full output IDs and scope](https://github.com/CC-David-CC/Strata-a5500/blob/9a80b916827189dee140f313e284280b3fc75235/docs/experiments/compact-q8-main/current-main-refresh/README.md). [Original design, usage and preserved reproduction](https://github.com/CC-David-CC/Strata-a5500/blob/9a80b916827189dee140f313e284280b3fc75235/docs/experiments/compact-q8-main/README.md). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:12 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#3394
No description provided.