mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #651] [CLOSED] ple: read Q8_0 and Q5_1 n-gram tables #2743
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#2743
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/651
Author: @anon761
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:ple-q8-q5_1-tables📝 Commits (1)
02406dfple: read Q8_0 and Q5_1 n-gram tables; fault a locked table in on 16 threads📊 Changes
7 files changed (+163 additions, -36 deletions)
View changed files
📝
CMakeLists.txt(+6 -0)📝
include/strata/artifact/dequant.hpp(+16 -0)📝
include/strata/kernels/ngram.hpp(+2 -1)📝
src/kernels/dequant_bf16_test.cpp(+1 -0)📝
src/kernels/ngram.cpp(+47 -11)📝
src/kernels/ple_q5_parity.cpp(+51 -24)➕
tests/core/dequant_q5_1_test.cpp(+40 -0)📄 Description
What
Several ordinary GGUFs of Qwen3.8-Flash-Next ship
per_layer_token_embd.weightin a format the PLE reader refuses at start:UD-Q6_K_XLQ4_K_LQ5_K_MThe rest of these files already has a path in the engine (Q5_K/Q6_K/Q5_1/Q8_0 experts, the K-quant projections,
--compat-bf16). For the Q5_K_M file the table was the only thing keeping it from starting (end to end below); the Q8_0 tables are covered by the parity test on the real files.dequantize_q5_1instrata/artifact/dequant.hpp(ggml'sdequantize_row_q5_1: unsigned 5-bit codes timesdplus the block minimumm); Q8_0 rows use the existingdequantize_q8_0PleTabledecodes Q5_1 / Q8_0 rows on both readers. The direct reader already takes the row size at runtime (since the FP8 table), so no reader change was needed;PLE_ROW_BYTES_MAXgrows to 170--ple-io ram: beforemlock, 16 threads fault the table in.mlockalone brings a cold file in one page at a time from one thread; on a ZFS pool that read the 54 GB Q8_0 table at ~0.47 GiB/s (about two minutes), 16 threads at ~2 GiB/s (measured from a cold cache before the rebase onto currentmain; the container this was re-tested in cannot drop the file cache). The fallback whenmlockfails keeps the pages faulted in instead of touching them a second time.Tests
dequant_q5_1_test(new, CTest): 4096 synthetic blocks incl. the edge codes 0 and 31 and a negative minimum against ggml'sto_float, bit-exact. No model, no GPU.dequant_bf16_testknows Q5_1.ple_q5_paritynow takes a Q5_0, Q5_1 or Q8_0 table and checks both the mapped and the direct reader (single rows and a 16-row batch) against ggml'sto_floaton the real file:End to end
The Q5_K_M file (Q5_1 table) on 2x RTX 3090, layer split auto, 262K context,
--kv int8 --pcie-frac 0;mainrefuses it at start:--ple-ioram(table locked in 3.2 s, warm file cache)direct(default)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.