mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3342
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1262
Author: @merbanan
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:feat/hc-req8📝 Commits (2)
115419aSTRATA_HC_REQ8: hyper-connection projections requantized to int8 + fp32 scale per 32 at loadcf1cd26bench: STRATA_HC_REQ8 distribution check (teacher-forced KL, a BF16 rerun as the control)📊 Changes
11 files changed (+442 additions, -38 deletions)
View changed files
➕
bench/results/2026-10-06-hc-req8/README.md(+32 -0)➕
bench/results/2026-10-06-hc-req8/compare.txt(+14 -0)➕
bench/results/2026-10-06-hc-req8/req8_kl.py(+130 -0)📝
include/strata/core/weights.hpp(+9 -0)📝
include/strata/kernels/fused_gr.hpp(+6 -0)📝
src/core/layer.cpp(+4 -4)📝
src/core/verify.cpp(+1 -0)📝
src/core/weights.cpp(+86 -0)📝
src/kernels/cuda/fused_gr.cu(+119 -25)📝
src/prefill/prefill.cpp(+26 -9)📝
src/program/generate.cpp(+15 -0)📄 Description
The rebased #704, under the name asked for there (
STRATA_HC_Q8now reads the GGUF's Q8_0 bytes, a different thing).Opt-in, off by default.
What
The four BF16
hc_*projections per layer (1,200 MiB) are skipped by the loader and uploaded as int8 codes with onefp32 scale per 32 values (675 MiB). The freed VRAM goes to the expert cache like any other.
The changes requested on #704:
gr_down_kernel,gr_up_kernel,gr_down_multi_kernel,gr_up_multi_kernel). The BF16 instantiations compile exactly as before; the launchsites pick the Q8 ones when
w_down/w_upcarry scales. The inject rows stay BF16.fseeko/_fseeki64).Paths that read the BF16 rows directly are skipped for it: the staged and v3 down kernels,
STRATA_HC_UPMIX,STRATA_PF_HCDOWN,STRATA_HCD_EXACT, and the gfx906STRATA_GR_SPLITpath. The prompt path expands the codesinto one reused bf16 scratch for its GEMM.
Measured
RTX 2060 SUPER 8 GB (sm_75), Ryzen 9 3900X, 60 GB RAM, Q2_0,
--max-context 8192 --kv int8, 400 MiB reserve(the distribution check's engines below):
STRATA_HC_REQ8=1Distribution check (teacher-forced)
The method of
docs/UNSLOTH_Q4.md: a serve engine withSTRATA_LOGPOS+STRATA_LOGPOS_TOPK=256,--short-read 1600so every prompt token is read through the verify windows and scored,
--adapt-every 100000 --pcie-frac 0(fixedexperts), greedy. Three ~1,000-token texts of this repository (code:
native_rope.cu; docs:DETAILS.md; prose:BATCHING.md). KL is bf16 || other over the bf16 run's top 256 plus one bucket for the rest. Control: a second BF16run.
The BF16 reruns are bit-identical, so the REQ8 rows are the int8 projections alone. For scale: the prompt-attention
kernel's check (
bench/results/2026-10-03-v100-prompt-attn) moved the median KL by 0.0007-0.022 with controls thatonly change the rounding order, and the experimental speed projection (
bench/results/2026-09-27-esp) measuredmean 0.063. Code is the most sensitive of the three texts here (its heavy tail: p99 1.03, max 6.9).
Reproduce:
bench/results/2026-10-06-hc-req8/req8_kl.py run, thencompare(paths at the top of the script).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.