ple: read Q8_0 and Q5_1 n-gram tables (#651)
Ordinary GGUFs ship per_layer_token_embd.weight in other formats than IQ4_NL: Unsloth's UD-Q6_K_XL and Swift-1.5 Q4_K_L as Q8_0 (170-byte rows, ~54 GB), a Q5_K_M finetune as Q5_1 (120-byte rows). The engine refused both at start. - dequantize_q5_1 in strata/artifact/dequant.hpp (ggml's dequantize_row_q5_1: unsigned 5-bit codes times d plus the block minimum m); Q8_0 rows use the existing dequantize_q8_0 - two entries in the PLE format list (the table-driven commit before this one): Q5_1 and Q8_0, on both readers; PLE_ROW_BYTES_MAX grows to 170 - tests: dequant_q5_1_test (synthetic blocks against ggml, no model, no GPU), dequant_bf16_test knows Q5_1, ple_q5_parity takes Q5_0, Q5_1 or Q8_0 tables and checks both the mapped and the direct reader Ported onto the format table by the maintainer from anon761's PR #651 (the --ple-io ram fault-in is the next commit). Quality of the Q8_0 table: ksanislo measured 0.53% error against the BF16 table, FP8 2.66%, IQ4_NL 7.59%. Co-authored-by: ksanislo <ksanislo@users.noreply.github.com>
This commit is contained in:
1 parent
ce62f5058f
commit
74945954fe
8 files changed
+126
-26
No files matched your search
@@ -25,6 +25,7 @@ bool cpu_block(int type, const uint8_t* b, float* out) {
|
||||
switch (type) {
|
||||
case 2: dequantize_q4_0(b, out); return true;
|
||||
case 6: dequantize_q5_0(b, out); return true;
|
||||
case 7: dequantize_q5_1(b, out); return true;
|
||||
case 8: dequantize_q8_0(b, out); return true;
|
||||
case 11: dequantize_q3_K(b, out); return true;
|
||||
case 12: dequantize_q4_K(b, out); return true;
|
||||
|
||||
Reference in new issue
Block a user