logoalt Hacker News

mmastrac • today at 7:03 PM • 1 reply • view on HN

EDIT: I'm not sure why there's downvotes here - if you purport to come out with a new quantization format and it's not front-and-center what your inspiration and trellis are, that's a bit of a red flag (and especially any comparison to the mul1 codebook that it's evolved from).

Its seems unnecessarily hard to understand what NariQ is, but it appears to be a derivative of exl3's mul1 with k1-k6, costing ~2 IMAD + 2 LOP3 + 2 IDP + 1 pack IMAD. It's not a real half-width codebook, just averaging k2/k3 to make k2.5? Happy to see someone else discovering the integer addition tricks too.

FWIW in exlr8 we added a pmcgx codebook that likely does better than this at low bitrates, and has a real half-bit (it's pairwise so you can feed an odd number of bits to it). Our team just finished a quant on Qwen 3.8 flash next, but I might be able to spin one up on Qwen3.8-27B to do a direct head-to-head.

Ran a quick head-to-head on some pseudo weights via Claude too:

- NariQ's codebook comes out within ±0.3% of mul1 on every site. Neither of its two changes matters much at K2: the 6-bit digits and the skipped E4M3 rounding each move the error by about 0.1%.

- pmcgx L20 has 1.1% to 3.1% less error than mul1, so it beats NariQ by about the same margin.

Update:

- NariQ looks slightly better from K4-K6 f16 trellis (barely losing to mul1, which is the king there)

Side-by-side codebooks:

  mul1(s):                         nariq(s):                        pmcgx(w):   # w = 20-bit state, 2 values
    x = s * 0x83DCD12D               x = s * 0x83DCD12D               x1 = w * 0xCBAC1FED
    t = sum(bytes(x))                t = sum(bytes(x) >> 2)           x2 = w * 0xBCA14C51
    v = fp16(1024 + t)*c + d         v = t - 126                      m1 = (x1 & 0x8FFF8FFF) ^ 0x3B603B60
    return e4m3(v)                   return v      # int, exact       m2 = (x2 & 0x8FFF8FFF) ^ 0x3B603B60
                                                                    a  = fp16(m1.lo) + fp16(m2.hi)
                                                                    b  = fp16(m1.hi) + fp16(m2.lo)
                                                                    return e4m3(a), e4m3(b)

Replies

andai • today at 7:49 PM

Thanks for the info. As for votes, I wouldn't worry about it too much. Votes are mostly noise in my experience.

Though I've noticed when I say something important, it tends to get downvoted (uncomfortable?) and when I say something silly, it tends to get upvotes (feels good?).

So slightly worse than random, ime. (As far as the stated rules vs social rules go. Irks my autism!)

I've hidden the votes and my score with a userscript to preserve my sanity.