Pushing the Frontier of Ternary Post-Training Quantization

Summary

Post-training quantization (PTQ), the act of converting pretrained language models into lower precision formats, doesn't work well at ternary weights, decimating intelligence on reasoning tasks in particular. We built a new post-training quantization algorithm and were able to show significant gains on many more rigorous benchmarks compared to the published baseline. Self-Calibrated Ternary Quantization (SCTQ) uses tool-call and reasoning examples generated by the original model as calibration data. It keeps 99% of Qwen3-30B-A3B's tool-calling score and 76% of its score on graduate-level science questions, but only 37–38% on two long-context benchmarks. Our biggest takeaway was that our benchmark improvements came mostly from either more or better training data, leading us to conclude that when it comes to ultra-fast ternary conversion, there are no major shortcuts. Significant data volume is required to recover the original model's intelligence on targeted capabilities, and a complete recovery is likely impossible. However, PTQ with a targeted data mix is likely a practical path to specialized ternary models without native pretraining.

Ternary language models

In a ternary language model, each weight takes one of three values, −1, 0 or +1. A ternary weight therefore carries up to log2 3 ≈ 1.58 bits of information. Compared to an 8-bit model equivalent, each weight in ternary can represent 8/1.58 = ~5x less raw information (in practice ternary is often implemented at slightly higher bit widths).

So if you believe, as I do, that intelligence is fundamentally a problem of cleverly representing high-dimensional state space, why bother with ternary?

Memory footprint is an obvious answer. The smaller a language model, the more its weights can be made available in scarce and fast memory sources. We quantized GLM-5.3 to ternary and reduced its memory footprint from 755.6 GB at 8-bit down to 224 GB at ~2.4 bits per weight, which means the entire model could fit in the HBM of a single B300 GPU instead of relying on multiple (for those who are uninitiated, that's really good).

Ternary models also provide unique computational benefits at the hardware level that allow for significantly faster inference, by transforming multiplication operations into additions and subtractions (multiplying by 1 or −1 is the same as adding or subtracting).

Lastly, significant evidence points to the idea that high bit-width models store far fewer bits worth of actual knowledge per parameter (Allen-Zhu and Li, 2024). This is to say that conversions into lower bit-widths often distill the knowledge from higher precisions rather than compress it.

At Lightwave, we are certain that ultra-low-bit language models are the future.

Why post-training quantization is so tempting

Microsoft showed in 2024 that the strongest ternary models are trained from scratch, and actually match FP16 intelligence at the same parameter count (Ma et al., 2024). This is bad news for us, because training a frontier model costs millions of GPU-hours. For reference, DeepSeek-V3 (671 billion parameters) shared that it required 2.79 million H800 GPU-hours on 14.8 trillion tokens (DeepSeek-AI, 2024) to train. With all those GPU-hours spent training, surely there is a way to build a ternary model without restarting completely?

Post-training quantization (PTQ) attempts to harness the initial training investment. PTQ converts a trained model to fewer bits by fitting the low-bit weights to calibration data (a small sample of text, usually a few million tokens) via a learned quantization function. Various forms of PTQ are already used to convert high precision models to 8-bit and 4-bit representations with success.

An important note: Quantization-aware training (QAT) falls somewhere in between PTQ and training from scratch, and functions less as a conversion to ternary and more as a fresh training run that starts from pre-initialized weights. Because the compute requirement is so much higher for QAT, we didn't focus on it for this work. However, forms of QAT have been shown to be incredibly effective at converting to ternary.

This brings us to the main question: is PTQ capable of converting pretrained models to ternary and maintaining intelligence relative to their parent?

PTQ is nearly free down to four bits

For converting a model from 16 bits down to 8 bits, PTQ costs almost nothing with regard to intelligence. A large study of Llama-3.1 found that FP8 (8-bit floating-point) quantization of weights and activations is "effectively lossless across all model scales" (Kurtic et al., 2024). Recovery is a quantized model's score as a percentage of the unquantized model's score. In that study, average recovery was 99.3% at 8B, 99.7% at 70B and 100.1% at 405B.

It's important to note that intelligence benchmarks are varied in both difficulty and domain, especially across studies. Yet, they are often rolled up into a recovery score to be compared head to head. I'll do my best to clarify discrepancies where they're important. Otherwise, know that while the recovery metric is a flawed one, I am reporting these comparisons in good faith.

At 4 bits, the cost becomes visible. NVFP4 is NVIDIA's 4-bit floating-point format, with one 8-bit scale for each block of 16 values. NVIDIA reports that DeepSeek-R1-0528 went from 81 to 80 on GPQA Diamond when converted from FP8 to NVFP4 (NVIDIA, 2025). In a separate study that quantized both weights and activations, Llama-3.1-8B-Instruct recovered 95–96% on the authors’ task average (Egiazarian et al., 2025).

Published methodsSelf-Calibrated Ternary Quantization (SCTQ-v4)Best result in each column
Figure 1. Each point gives recovery on its own evaluation. Models, benchmarks and quantization settings differ across studies. Bit widths describe the weight codes and exclude shared scales. Both Llama studies also quantize activations. The DeepSeek-R1 point averages seven per-task score ratios relative to FP8. The two SCTQ points show the same Qwen checkpoint on our development evaluation and on four held-out benchmarks.
Show data

Ternary PTQ today

Recent methods targeting roughly 2 bits per weight or less include BiLLM, PTQ1.61, PTQTP, Tequila, SliderQuant, and CAT-Q (Wang et al., 2026).

Most of these papers measure perplexity (how well a model predicts held-out text) and short multiple-choice tasks, and they appear to do pretty well. But when challenged with more substantive tasks, especially having to do with reasoning, they fail. An example that illustrates this idea well is as follows:

CAT-Q illustrates how much the task and the calibration data matter. Its original recipe retained 87% of Qwen3-235B-A22B’s average score on five zero-shot tasks. In a separate pilot it scored zero on MATH-500 (competition mathematics) and HumanEval+ (code generation). In the same table, changing the calibration data raised those scores to 58.4 and 54.0 with a variant called CAT-Q+ (Wang et al., Appendix E).

The authors later used reasoning traces generated by the original model in a method called ScaleQ-1.58. On Qwen3-30B-A3B, they reported 76.8 on MATH-500 and 60.4 on HumanEval+ (Wang et al., 2026). Our head-to-head comparison uses our reproduction of the original CAT-Q recipe. On our held-out Qwen reasoning and long-context suite, that baseline scored 0.0 on four benchmarks and 0.1 on the fifth. Almost every answer ran into the output limit.

Our attempt: Self-Calibrated Ternary Quantization

To see which abilities we could recover, we built Self-Calibrated Ternary Quantization (SCTQ) starting from the original CAT-Q method. We tested it on Qwen3-30B-A3B, a mixture-of-experts (MoE) model. SCTQ makes the expert weights ternary. Those weights account for 95% of the parameters. Attention, the router, the embeddings and the output head stay in BF16 (bfloat16).

SCTQ works in three stages, shown in Figure 2. It starts each group of weights from the closest possible ternary fit. Then, as other recent PTQ methods do, it trains the model a few layers at a time to reproduce the original model's intermediate outputs. Finally, it tunes the whole quantized model to match the original model's next-token probabilities.

SCTQ improves on existing methods in its data, its start and its finish. The original model writes chat, tool-call and long reasoning transcripts to supplement web text. The closest-fit start replaces the baseline's statistics-based start, so training begins with less error. The final pass can correct errors that build up from layer to layer.

SCTQ improvementStandard PTQ step
Original model BF16 weights writes Calibration data SCTQ DATA MIX web text + model-written: chat tool calls reasoning weights training data 1 Closest fit SCTQ STEP Start each group at its closest ternary values: −s, 0 or +s. + 0 0 − + 0 + − 2 Layer by layer STANDARD STEP Train a few layers at a time to reproduce the original model's intermediate outputs. 3 Final pass SCTQ STEP Tune weights across the whole model to match the original output probabilities. Ternary model OUTPUT Experts: 2.125 bits per weight, down from 16. Attention stays in BF16. attn BF16 experts
Figure 2. How SCTQ converts a model. Each layer of an MoE model holds attention and small feed-forward networks called experts. SCTQ makes the expert weights ternary and keeps attention in BF16. The original model writes part of the calibration data and supplies the targets for stages 2 and 3. The weights in the diagram are illustrative.

We developed SCTQ using an agentic research loop. We tested changes to the algorithm or calibration data against the previous best model, using paired tests on the same evaluation items. We checked the changes we kept with a fresh random seed. We report five checkpoints, SCTQ-v0 to SCTQ-v4. The last is a rerun of the v3 recipe with a held-out seed.

Each ternary expert weight costs 2.125 bits in our packed format, including its share of one 16-bit scale per 128 weights. At that rate, Qwen’s weights would shrink from 61.1 GB to 10.8 GB, a 5.7× reduction. We calculated the packed size and evaluated Qwen using BF16 weights reconstructed from the ternary codes and scales.

Results: SCTQ against CAT-Q

On Qwen3-30B-A3B, SCTQ-v4 scored higher than our CAT-Q baseline on every benchmark in Figure 3.1 On the non-live split of the Berkeley Function Calling Leaderboard (BFCL), which tests whether a model selects the right functions and arguments, the score rose from 0.7 to 88.7. The original model scored 89.8, giving SCTQ 99% recovery. On GPQA Diamond (graduate-level science questions), the score rose from 0.0 to 45.8 against the original model’s 60.6, or 76% recovery.

Long-context performance varied by task. SCTQ-v4 retained 73% of the original score on MRCR v2 (reproducing a specified response from a long conversation), 38% on AA-LCR (reasoning across documents, scored on the 37 prompts that fit our full output budget), and 37% on GraphWalks (searching a graph described in the prompt).

We gave those three benchmarks and GPQA equal weight, averaging each score as a percentage of the original model’s score. The mean was 56% for both SCTQ-v0 and SCTQ-v4. Including HLE Diamond would give v4 a five-benchmark mean of 67%, because a small difference near the floor (3.7 versus 3.3 out of 100) counts as 112% recovery. The separate 91% development score gives equal weight to recovery on the five-task zero-shot average, BFCL and our development evaluation of GPQA.

Original (BF16)CAT-Q recipeSCTQ-v4
Figure 3. Each line runs from our CAT-Q baseline to SCTQ on the same model. The hollow circle marks the original model, and the right-hand column gives SCTQ's result. Qwen3-30B-A3B shows SCTQ-v4. GLM-5.3 shows the better of two early SCTQ configurations, rerun with a held-out seed. Its BFCL comparison has only the two quantized models. Select “Score” to see their results. Hover over a row for the task and scores.
Show data

Does it hold at 753B?

We also applied an early version of SCTQ to GLM-5.3, a model released in FP8 with 753B parameters in the checkpoint when its multi-token prediction layer is included. Across five tasks, SCTQ recovered 92% of the FP8 model’s mean score (83.8 against 90.7), compared with 48% for our CAT-Q baseline. MATH-500 fell 9.0 points, MMLU-Pro (broad knowledge questions) fell 10.0 and IFEval (instruction following) fell 9.8. On GSM8K (grade-school mathematics), the 0.4-point gap was within sampling uncertainty. Select GLM-5.3 in Figure 3 to see each task. It retained a roughly similar share of its original score compared to Qwen on short tasks despite its much larger parameter count, an early and tentative sign that SCTQ may scale to larger models. How it handles the held-out reasoning and long-context suite remains an open question.

Pushing the frontier

SCTQ scores far above the published baseline. It beats the CAT-Q recipe on every benchmark that we ran, on both models, and often lifts scores from near zero. We found no published ternary PTQ method that reports comparable reasoning, tool-call or long-context results at this scale. The ScaleQ-1.58 authors likewise found that calibrating on the original model’s reasoning traces helped preserve reasoning ability, though a head-to-head comparison with SCTQ remains open.

"Wow Ryan, you're a genius!" I hear you saying. You're exactly right, but let's also clarify that the result is less magical than it seems. Yes, we discovered meaningful algorithmic improvements that pushed SCTQ's intelligence recovery at ternary well past the published baseline, but the more profound takeaway here is actually that data volume and mix on which the quantized model was calibrated were the biggest driver of benchmark improvement, which is antithetical to the dream that a sufficiently clever PTQ method could one-shot a model conversion down to ternary.

Tool calls were in the data from SCTQ-v0 onward, and BFCL recovery reached 99%. Long reasoning transcripts entered the final pass in SCTQ-v2. From v0 to v4, held-out GPQA rose from 61% to 76% of the original score, while GraphWalks fell from 57% to 37%. That tradeoff disappears in the four-benchmark mean.

This pattern suggests that PTQ is likely an effective way to turn a generalist frontier model into a specialized ternary model, given the right data mix. A team that knows which tasks its model must do can generate calibration data for those tasks and keep most of the model's ability on them.

Paying for ternary: data, parameters, or generality

LOST BITS Data Pretraining-scale tokens BitNet b1.58 2B4T: 4 trillion tokens Parameters A larger model A ternary weight holds ≤ 1.58 bits Generality Specialized tasks BitDistill: 10 billion tokens
Figure 4. A ternary model pays for its lost bits with data, parameters or generality. Each corner gives the strongest published example. The cyan corner marks the route that our results point to. All three examples come from models with 4B parameters or fewer, tested on short benchmarks.

A ternary model must pay for its lost bits in at least one of three ways. It can pay in data: ternary models trained from scratch match full precision at 2B to 4B parameters, but they need 100 billion to 4 trillion tokens (Ma et al., 2024; Kaushal et al., 2024; Ma et al., 2025). It can pay in parameters: a ternary weight carries at most 1.58 bits of information, but language models store about 2 bits of knowledge per parameter (Allen-Zhu and Li, 2024). Or it can pay in generality: BitDistill matches full precision on specific tasks with only 10 billion tokens (Wu et al., 2025). Teams without a pretraining-scale budget can best afford to give up generality. Agents mostly "perform a small number of specialized tasks repetitively" (Belcak et al., 2025), and our results suggest that PTQ with a targeted data mix can build ternary models for them.

Next Steps

We intend to use our SCTQ algorithm to build small ternary domain expert models and test them on tasks within and outside their calibration mix. We will use the results to try to model the tradeoffs among calibration data volume, parameter count, and the range of capabilities the models retain.