Pyrite: Byte-Neutral Group-Size Trading for 2-Bit Quantization of 27B–33B Language Models on 16 GB Apple Silicon

Running 27B–33B parameter language models on a 16 GB unified-memory laptop requires roughly 2-bit weights, at which point quality degrades sharply. We describe Pyrite, a simple, kernel-free recipe for standard affine group quantization (as implemented in Apple MLX) that redistributes bits without changing the total tensor size by a single byte. The recipe widens the quantization group of the SwiGLU gate_proj/up_proj matrices from 64 to 128 and reinvests exactly the freed bytes to upgrade a sensitivity-ranked subset of projections from 2-bit to 3-bit. Because the cost of each move is an integer multiple of a common unit, any allocation satisfying 4*n_down + 5*n_gate/up = 2L (for L layers) yields a byte-identical model. On a sparse Mixture-of-Experts model (llm-jp-4-32b-a3b-base) the best configuration reduces held-out Japanese KL divergence to the BF16 teacher by 11.0% (English: 12.9%), and on a dense hybrid model (Qwen3.8-27B) by 22.3% (English) and 22.4% (Japanese), relative to uniform 2-bit quantization of identical size. In both architectures, allocations that mix down_proj upgrades with a small number of late-layer gate/up upgrades outperform allocations that upgrade down_proj only. All profiling and evaluation run on a single 16 GB M2 Pro by streaming one layer at a time. The resulting models load with unmodified mlx-lm. Version 2.0 adds empirical validation on the international flagship coding MoE: deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct (15.7B total, 2.36B active), achieving 4.88 GiB under exact zero-byte overhead with improved multi-domain validation perplexity and token accuracy.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-10-30
DOI
https://doi.org/10.5281/zenodo.23786704
Primary Topic
Advanced Neural Network Applications
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Pyrite: Byte-Neutral Group-Size Trading for 2-Bit Quantization of 27B–33B Language Models on 16 GB Apple Silicon

Masahiro Nakatsugawa
4 links
Zenodo (CERN European Organization for Nuclear Research)
Advanced Neural Network Applications
preprint

Pyrite: Byte-Neutral Group-Size Trading for 2-Bit Quantization of 27B–33B Language Models on 16 GB Apple Silicon

Masahiro Nakatsugawa
preprint en

Abstract

Running 27B–33B parameter language models on a 16 GB unified-memory laptop requires roughly 2-bit weights, at which point quality degrades sharply. We describe Pyrite, a simple, kernel-free recipe for standard affine group quantization (as implemented in Apple MLX) that redistributes bits without changing the total tensor size by a single byte. The recipe widens the quantization group of the SwiGLU gate_proj/up_proj matrices from 64 to 128 and reinvests exactly the freed bytes to upgrade a sensitivity-ranked subset of projections from 2-bit to 3-bit. Because the cost of each move is an integer multiple of a common unit, any allocation satisfying 4*n_down + 5*n_gate/up = 2L (for L layers) yields a byte-identical model. On a sparse Mixture-of-Experts model (llm-jp-4-32b-a3b-base) the best configuration reduces held-out Japanese KL divergence to the BF16 teacher by 11.0% (English: 12.9%), and on a dense hybrid model (Qwen3.8-27B) by 22.3% (English) and 22.4% (Japanese), relative to uniform 2-bit quantization of identical size. In both architectures, allocations that mix down_proj upgrades with a small number of late-layer gate/up upgrades outperform allocations that upgrade down_proj only. All profiling and evaluation run on a single 16 GB M2 Pro by streaming one layer at a time. The resulting models load with unmodified mlx-lm. Version 2.0 adds empirical validation on the international flagship coding MoE: deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct (15.7B total, 2.36B active), achieving 4.88 GiB under exact zero-byte overhead with improved multi-domain validation perplexity and token accuracy.

Zenodo (CERN European Organization for Nuclear Research)
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon