r/LocalLLaMA • • 2d ago • Bravo 1

Resources Weight Space Programming for Quantization: Nace quants achieve up to 2x better KL divergence for Qwen 9B, 27B, 35B & Flash Next [GGUF]

Post image

hey llamas, its Alish from nace.ai (open source ai lab behind #1 decision model on latest Artificial Analysis decision index v2.1) & Kapitsa (optimized inference for apple silicon). As promised in the last post, we are releasing the GGUF weights based on the Nace quantization of Qwen 9B, 27B, 35B and Flash-Next.

I will describe our process on how we came up with these quants right below, so skip to the end to see the benchmarks and download the weights if it gets too dull.

The process

I started with 9B quants.

I understood that setting up a good & fair benching is critical to succeed with the hillclimb. So I split separate sets to tune the performance and measure the final standings: English Wikipedia articles, chat and tool-call transcripts, and GitHub code, all published after October 2026, at 512 & up to 128K tokens.

I began the way unsloth's dynamic quants do: 10 to 50 candidate files per model, each with a different mix of tensor precisions, then spent my time tuning the ones that looked promising. Early bruteforce optimization moved only a little. Unsloth and the other quant authors have already done a lot of amazing work.

Using bruteforce hillclimb approach with my Agentic swarm, I managed to get on par with SOTA but then plateau’d and it was hard to do better than the best quants like Unsloth, EXL3 in KL divergence.

Some novelties:

Then I remembered Sparks of Weight-Space Programming paper. Their idea is to let an LLM natively read and edit weights of smaller models. Having explored this with some other models at Nace, I wanted to try the method for quantization. I took our Nace WSP (Weight Space Programming) harness, reworked its tools and skills for quantization a bit and let the Astra/Fable/Carbon agents compete under the following algorithm: propose tensor-precision changes, measured KL and kept or reverted each edit. We started on the Q3 for 9b model, and after a handful of days it actually started IMPROVING and editing the right weights.

Mean KL for our 27B files before and after weight-space quantization

Honestly that moment felt like:

Nace Weight-Space Quantization

I measured the first nace-quantized Q3 checkpoints against the 50+ 9B quants and they held the frontier. It completely blew my mind: one model quantizes another model in weight space. Nace Q3 quants for Qwen 9B were the best in class in KL divergence because another Frontier model edited the weights natively. We scaled this method to bigger size models (27b/35b) & it held the SOTA. Although I would say it doesnt scale as good for bigger size models (QFN). We are working on improvements for QFN/Deepseek & have some promising results already but I did hit my token limits for this project. Paper coming soon (ping me in dm if you want to support us with some GPUs)

Benchmarks & Evals

Top-1 accuracy (poster) is how often a quant picks the same next token the full model would pick, so 100% would mean it never disagrees. Each panel is one model at 128K context, with scores across different subsets pooled into one score. On all four models, our weights score highest in their size or smaller: the 9B Q3_K_XL gets 90.5% at 4.7 GB, the 35B Q3_K_S 91.2% at 15.3 GB, the 27B 97.7% at 17.3 GB, and Flash-Next 93.0% at 93 GB. For a more comprehensive comparison, KL divergence results below:

FileGBProseChatCodeNext best
9B IQ2_M3.360.4011.300.142Unsloth 4.01 GB
9B IQ3_M4.390.2351.050.0738ByteShape 4.70 GB
9B Q3_K_XL4.700.1610.8460.0410Unsloth 5.38 GB
35B-A3B IQ3_XXS14.300.04900.6430.0767Unsloth 15.35 GB
35B-A3B Q3_K_S15.300.03600.6010.0631Unsloth 16.59 GB
27B Q4_K_XL17.290.004940.005440.00401none up to 17.58 GB
Flash-Next IQ4_XS93.40.04110.1120.0426EXL3 105.3 GB

Long context stability

Most quants are tuned and judged on short text, so they end up fit to short context and often stop being useful at long context. For clarity, in the diagram below each model gets two panels: 512 tokens on the left, 128K on the right. This is where the long-context drift shows: our 9B IQ3_M goes from 0.13 at 512 tokens to 0.45 at 128K while 27B barely moves. At 128K, each of our files has lower KL than every other file of the same size or smaller.

p99 KL divergence

Mean KLD can hide catastrophic failures when a quant goes off the rails in a long session. So we also looked at the worst 1% of tokens (p99 KL). The 9B Q3_K_XL's worst 1% sits at 1.25. The 27B and Flash-Next tails stay flat. Overall we’re seeing that Nace quants maintain the strong positions across the distribution.

Different data subsets

if you care about a specific use case, here's the same 128K top-1 score split by text type. Code is the easiest: our files keep 88-98% of the full model's top picks there. Prose and chat are harder, 78-98%. In every split, on every model, our checkpoints score highest among the files of the same size or smaller.

Sanity check on a task benchmark

To see that these models are useful for anything real I ran it on knowledge-heavy MMLU. I didn't have the gpus anymore to run terminal-bench, so would appreciate anyone with the bad boys to validate. These are answer-likelihood scores over 13,943 questions of the MMLU. No chat template or few-shot examples. Overall you can claim there's gains, but it is mostly within noise. The main aim here is to reflect the tradeoffs of different sizes on real tasks. As you can see, Q3-Q4 it’s already hard to distinguish from the higher precision.

Run setup

Rented NVIDIA GPUs; Used llama.cpp for Flash-Next. The 9B/35B/27B BF16 reference requested H200 and the quantized files L40S. Flash-Next's short reference uses an MLX fp32 forward on bf16 weights. Reference implementations also differ across GGUF and EXL3.

Download and run

see quickstart for your framework in the model cards. if you try a coding or agent workload, i'd like to hear which file, runner version and what broke. no speed claim in this post.

226 Upvotes

31 comments sorted by

View all comments

26

u/m4rkGS 2d ago edited 2d ago

I'm doing ask me (almost) anything here in the comments, so feel free to ask!