50,340 karma · joined Jul 3, 2007 (19y ago) · 4,689 submissions
Playing with fun tech.
Mastodon: @mmastrac@hachyderm.io (https://hachyderm.io/@mmastrac)
Email me: matthew@mastracci.com
LinkedIn: https://www.linkedin.com/in/matthewmastracci/comment 18h ago · link · parent
Our approach might be slightly different however, as we encode multiple bit widths and then select per-profile manifest with the lowest KL we can solve at a given size using the per-expert/layer encoded chunks. The most recent quantization run we did for GLM 5.3 has some of the numbers and all of the slices as well.
https://huggingface.co/kindlingai/glm-5.3-exlr8-k2-k3-k4
Appreciate the response. Happy to chat more. I did find the paper with a bit more info and I'll have to see if there's anything we can learn from your approach!
comment 23h ago · link · parent
https://quantwiki.kindlingai.dev/codebooks/mul1
(claude assisted, obviously!)
And yes, hah, that blog has been through a long, long number of years.
comment 1d ago · link · parent
You lose the fine detail but keep the higher structure. Models are generally pretty resilient to it, especially larger ones. An over-quantized model tends to lose fine detail in its knowledge, lose some ability to track/accumulate accurately, and occasionally loops (because the activations are rounded off too much and lose energy, and it gets trapped in a state where it just can't escape).
When you quantize you try and get as big of a mix of calibration data as possible. You don't need to match the training _set_, just enough data that you exercise 99.999% of the most well-trod paths through the model. Anything outside of the calibration set is a crap-shoot as to whether it gets kept or not, but a well-balanced calibration set will keep performance near-unquantized.
On what calibration does: during quantization you try to minimize the error between the run of the model with original weights and the run of the model with the quant'd weights. Calibration data lets you weight the error away from the paths that are actually chosen with real data.
Apologies, this is a bit of a hand-wavey comment but it's sort of how you can look at it without needing to deal with the hairier math.
comment 1d ago · link · parent
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)5.
XNU Linux: Full OS X GUI Userspace on Linux(github.com ↗)
619 points · by mmastrac · 1d ago · 265 comments
comment 4w ago · link · parent
If the user types <tool_call>, you get < (token id = 32), tool_call (41), > (102). It never decodes to <tool_call>, which is spicy number 12345, for example.
The tool call tokens are _always_ composed of multiple real tokens, so you can never get them from normal text.
Seeing <tool_call> is a bit misleading because that's just a debug rendering if anything. The front-end sees a special number and knows it's a toolcall. The chat template uses that text form because it's easier than writing the spicy numbers there, but it also has a special parsing mode for those.
comment 4w ago · link · parent
Tool calling is fraught with peril, especially because there's nothing that necessarily says that a models tools are fixed in place for the life of its run. In some cases, tools are added mid-run to avoid a giant prefix miss and (at least last time I checked!), the industry has not settled on OpenAI-style chat message formats for tool call updates.
I would absolutely prefer to run in a fully-constrained tool call environment, and would love if we hadn't YOLO'd the whole thing! The PTC-style tools sort of fix this by punting tool calling to JavaScript, but that's even harder to enforce, and models not trained on the style might take a turn of failed tool calls to get it right.
comment 2mo ago · link · parent
What I think these models actually need is a structured decision thinking mode. As it stands now, the only way to think about the answers with DiffusionGemma is to diffuse a thinking block, but giving the model an auto-regressive thinking space to reason, even just lightly, could drastically improve performance.
18.
Near-real-time vision using DiffusionGemma in Jev mode(twitter.com ↗)
3 points · by mmastrac · 2mo ago · discuss
comment 2mo ago · link · parent
On my DGX Spark I get very similar latency numbers, and it matches my evals + or - a few points on each test (DG wins some, Jev wins some, both show low confidence when wrong).
I ran the same evals against a Qwen36 and it clearly lost to both of them, so you are leaving both knowledge and instinctual reasoning on the table with any smaller models, FWIW.
comment 2mo ago · link · parent
TBH I also ran the 400tok/s preview and that was just nuts. I just let the thing compact over and over over the course of a day attacking a couple of tough problems
comment 2mo ago · link · parent
Runs ~0.2s per decision on my DGX Spark.
10/10 programming language detection
9/10 human language detection
10/12 unit magnitude comparison
All incorrect answers are marked with low-P.It (DiffusionGemma with the Jev mode) can also solve an ASCII maze.
24.
vLLM: Jev-like mode for the DiffusionGemma model(github.com ↗)
1 points · by mmastrac · 2mo ago · discuss
comment 2mo ago · link · parent
Revenue: 13 933 kr
Token Cost: 14 882 kr
.. and a bastardization of the old Twitter joke:
"I told our CEO that our cafe keeps hitting its token spending limit but not making money. So I asked where he gets the tokens, and he said he just buys more credits from the console afterwards. So I said it sounds like he's building a machine to feed dollars to Anthropic, and then our data scientist started crying."
comment 2mo ago · link · parent
The PTC mode is pretty nice. Feels like models are still learning how to navigate it.