mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-22 17:20:17 +00:00
Bylines, paper authorship, correspondence addresses and the founder blurb under each post named an individual. They name the organisation that published the work instead: the brand on posts and pages, the research byline on papers, and research@ in place of a personal address. Both are what these repositories already used elsewhere — nothing new was coined. Co-authors are untouched. Where a paper named someone else alongside, they stay named; only the one byline changed. Bibliography entries, running heads, PDF metadata and affiliations move with it, so a citation still resolves to whoever the cited paper names. Sample and fixture data uses the placeholder name these tests already use elsewhere, so no assertion changed meaning.
322 lines
12 KiB
TeX
322 lines
12 KiB
TeX
\documentclass[11pt,a4paper]{article}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage{amsmath,amsfonts,amssymb}
|
|
\usepackage{graphicx}
|
|
\usepackage{hyperref}
|
|
\usepackage{listings}
|
|
\usepackage{color}
|
|
\usepackage{booktabs}
|
|
\usepackage{float}
|
|
\usepackage{algorithm}
|
|
\usepackage{algorithmic}
|
|
\usepackage{geometry}
|
|
\geometry{margin=1in}
|
|
\definecolor{zenblue}{RGB}{41,121,255}
|
|
\hypersetup{colorlinks=true,linkcolor=zenblue,urlcolor=zenblue,citecolor=zenblue}
|
|
|
|
\title{\textbf{BitDelta: Extreme Model Compression for the Zen Family}\\
|
|
\large Technical Report v2025.10}
|
|
\author{Antje Worring, Hanzo AI Research, Zen LM Research Team\\
|
|
\texttt{[email protected]}}
|
|
\date{October 2025}
|
|
|
|
\begin{document}
|
|
\maketitle
|
|
|
|
\begin{abstract}
|
|
We present BitDelta, a 1-bit weight delta compression technique achieving a 31.87$\times$
|
|
compression ratio on the Zen model family with less than 0.5\% MMLU degradation and
|
|
2.8$\times$ inference speedup. BitDelta exploits the observation that fine-tuned model
|
|
weights reside close to a pretrained base, and the \emph{delta} (difference) is both
|
|
low-magnitude and compressible to a single sign bit. A learned per-layer scale factor
|
|
reconstructs full-precision semantics at decode time. Unlike prior quantization methods
|
|
that compress the full weight tensor, BitDelta preserves base model semantics exactly
|
|
while aggressively compressing the task-specific adaptation. We evaluate across the full
|
|
Zen family (600M to 480B parameters) and report throughput, memory, and quality results
|
|
on standard benchmarks. BitDelta is now the default deployment format for Zen models
|
|
on the Hanzo inference network.
|
|
\end{abstract}
|
|
|
|
\section{Introduction}
|
|
|
|
Deploying large language models at scale requires reducing memory footprint and
|
|
increasing throughput without unacceptable quality loss. Standard quantization
|
|
techniques (INT8, INT4, GPTQ~\cite{frantar2022gptq}, AWQ~\cite{lin2023awq})
|
|
compress the full weight matrix $W \in \mathbb{R}^{m \times n}$.
|
|
|
|
BitDelta takes a different approach: it separates the weight matrix into a frozen
|
|
base $W_0$ (the pretrained checkpoint) and a learned delta $\Delta W$ (the
|
|
fine-tuning update):
|
|
|
|
\begin{equation}
|
|
W = W_0 + \Delta W
|
|
\end{equation}
|
|
|
|
The insight is that $\|\Delta W\|_\infty \ll \|W_0\|_\infty$ after fine-tuning from
|
|
a strong pretrained base. BitDelta compresses $\Delta W$ to 1 bit per element using
|
|
a signed binary representation with a learned scale:
|
|
|
|
\begin{equation}
|
|
\hat{\Delta W} = \alpha \cdot \text{sign}(\Delta W), \quad \alpha \in \mathbb{R}
|
|
\end{equation}
|
|
|
|
The base $W_0$ is stored in BF16 (uncompressed) and loaded once into GPU memory.
|
|
Multiple fine-tuned variants can share the single base, each requiring only 1-bit
|
|
deltas plus per-layer scalars. This enables serving multiple task-specific models
|
|
at the memory cost of one.
|
|
|
|
\section{Background}
|
|
|
|
\subsection{Delta Compression Intuition}
|
|
|
|
After fine-tuning, weight matrices change by a small fraction of their initial magnitude.
|
|
For Zen-7B fine-tuned on code, the mean absolute delta $\mathbb{E}|\Delta W_{ij}| = 0.0043$
|
|
versus $\mathbb{E}|W_{0,ij}| = 0.18$ -- a ratio of 2.4\%. This small-delta property
|
|
motivates binary compression: the sign of the delta captures directional information
|
|
while the learned scale reconstructs magnitude.
|
|
|
|
\subsection{Related Quantization Methods}
|
|
|
|
\textbf{Post-Training Quantization (PTQ)} methods such as GPTQ and AWQ quantize full
|
|
weight matrices to 4-bit integer representations. They achieve 4$\times$ compression
|
|
but require calibration data and introduce reconstruction error across all weights.
|
|
|
|
\textbf{LoRA}~\cite{hu2021lora} decomposes $\Delta W = BA$ with rank-$r$ matrices,
|
|
achieving parameter efficiency during training but not inference-time compression.
|
|
|
|
\textbf{1-bit LLMs}~\cite{ma2024bitnet} quantize full weights to 1.58 bits but
|
|
require training from scratch with this objective. BitDelta applies to already-trained
|
|
models without retraining.
|
|
|
|
\section{BitDelta Method}
|
|
|
|
\subsection{Formalization}
|
|
|
|
Given a fine-tuned weight matrix $W \in \mathbb{R}^{m \times n}$ and pretrained base
|
|
$W_0 \in \mathbb{R}^{m \times n}$, we compute:
|
|
|
|
\begin{equation}
|
|
\Delta W = W - W_0
|
|
\end{equation}
|
|
|
|
BitDelta approximates $\Delta W$ as:
|
|
|
|
\begin{equation}
|
|
\hat{\Delta W} = \alpha \cdot B, \quad B_{ij} = \text{sign}(\Delta W_{ij}) \in \{-1, +1\}
|
|
\end{equation}
|
|
|
|
The scale $\alpha$ minimizes reconstruction error:
|
|
|
|
\begin{equation}
|
|
\alpha^* = \arg\min_\alpha \|\Delta W - \alpha \cdot B\|_F^2 = \frac{\|\Delta W\|_1}{mn}
|
|
\end{equation}
|
|
|
|
This closed-form solution is the mean absolute value of $\Delta W$.
|
|
|
|
\subsection{Per-Layer Scale Refinement}
|
|
|
|
The closed-form scale $\alpha^*$ minimizes Frobenius error but not task-specific
|
|
loss. We optionally fine-tune scales via a calibration step:
|
|
|
|
\begin{algorithm}[H]
|
|
\caption{BitDelta Scale Calibration}
|
|
\begin{algorithmic}[1]
|
|
\REQUIRE Base $W_0$, binary delta $B$, calibration data $\mathcal{D}_\text{cal}$, steps $T$
|
|
\STATE Initialize $\alpha_l \leftarrow \|\Delta W_l\|_1 / (m_l n_l)$ for each layer $l$
|
|
\FOR{step $t = 1 \ldots T$}
|
|
\STATE Sample batch $(x, y) \sim \mathcal{D}_\text{cal}$
|
|
\STATE Forward pass: $W_l = W_{0,l} + \alpha_l \cdot B_l$ for all layers $l$
|
|
\STATE $\mathcal{L} \leftarrow \text{CrossEntropy}(\pi(x), y)$
|
|
\STATE Update $\{\alpha_l\}$ via Adam with $\eta = 5\times10^{-4}$
|
|
\ENDFOR
|
|
\RETURN $\{\alpha_l\}$
|
|
\end{algorithmic}
|
|
\end{algorithm}
|
|
|
|
Calibration runs for 500 steps on 512 samples and takes under 10 minutes for Zen-7B.
|
|
It recovers 60\% of the quality gap between closed-form and full-precision inference.
|
|
|
|
\subsection{Storage Format}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lrr}
|
|
\toprule
|
|
\textbf{Component} & \textbf{Format} & \textbf{Size (Zen-7B)} \\
|
|
\midrule
|
|
Base weights $W_0$ & BF16 & 14.0 GB \\
|
|
Binary delta $B$ & 1-bit packed & 0.44 GB \\
|
|
Scale factors $\{\alpha_l\}$ & FP32 & 0.002 GB \\
|
|
\midrule
|
|
Total (single fine-tune) & -- & 14.44 GB \\
|
|
$N$ additional fine-tunes & -- & $N \times 0.44$ GB \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{BitDelta storage for Zen-7B. Compression ratio of delta: 32$\times$ (BF16$\to$1-bit).}
|
|
\end{table}
|
|
|
|
\subsection{Quantization-Aware Distillation}
|
|
|
|
For maximum quality at high compression, we optionally apply quantization-aware
|
|
distillation (QAD) where the BitDelta model is distilled from the full-precision model:
|
|
|
|
\begin{equation}
|
|
\mathcal{L}_\text{QAD} = \text{KL}\left[\pi_\text{fp}(\cdot|x) \| \pi_\text{bd}(\cdot|x)\right] + \lambda \cdot \mathcal{L}_\text{task}
|
|
\end{equation}
|
|
|
|
Only the scale factors $\{\alpha_l\}$ are updated during QAD; the binary deltas $B$
|
|
are frozen. This constrained distillation is computationally cheap (1\% of pretraining
|
|
cost) and recovers an additional 15\% of quality loss versus closed-form scales.
|
|
|
|
\section{Experiments}
|
|
|
|
\subsection{Compression Ratio Analysis}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lrrrrr}
|
|
\toprule
|
|
\textbf{Model} & \textbf{FP16 Size} & \textbf{BitDelta Size} & \textbf{Ratio} & \textbf{Delta Only} \\
|
|
\midrule
|
|
Zen-600M & 1.2 GB & 0.038 GB (delta) & 31.6$\times$ & 97\% base shared \\
|
|
Zen-7B & 14.0 GB & 0.44 GB (delta) & 31.8$\times$ & 97\% base shared \\
|
|
Zen-32B & 64.0 GB & 2.00 GB (delta) & 32.0$\times$ & 97\% base shared \\
|
|
Zen-235B-MoE & 470 GB & 14.7 GB (delta) & 31.9$\times$ & 97\% base shared \\
|
|
\midrule
|
|
\textbf{Average} & -- & -- & \textbf{31.87$\times$} & -- \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{BitDelta compression ratios across Zen model family.}
|
|
\end{table}
|
|
|
|
\subsection{Quality Benchmarks}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lcccccc}
|
|
\toprule
|
|
\textbf{Model / Format} & \textbf{MMLU} & \textbf{HumanEval} & \textbf{MATH} & \textbf{GSM8K} & \textbf{MT-Bench} \\
|
|
\midrule
|
|
Zen-7B FP16 (reference) & 85.3 & 78.2 & 67.4 & 84.1 & 8.62 \\
|
|
Zen-7B GPTQ-4bit & 84.1 & 76.8 & 65.9 & 82.7 & 8.44 \\
|
|
Zen-7B AWQ-4bit & 84.4 & 77.1 & 66.2 & 83.0 & 8.47 \\
|
|
Zen-7B BitDelta (ours) & \textbf{85.1} & \textbf{77.9} & \textbf{67.1} & \textbf{83.8} & \textbf{8.59} \\
|
|
\midrule
|
|
$\Delta$ (BitDelta vs. FP16) & $-0.2$ & $-0.3$ & $-0.3$ & $-0.3$ & $-0.03$ \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Quality comparison of quantization methods on Zen-7B. MMLU delta $< 0.5\%$.}
|
|
\end{table}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lcccc}
|
|
\toprule
|
|
\textbf{Format} & \textbf{MMLU} & \textbf{$\Delta$ MMLU} & \textbf{Memory} & \textbf{Speedup} \\
|
|
\midrule
|
|
FP16 reference & 85.3 & -- & 14.0 GB & 1.0$\times$ \\
|
|
BitDelta (closed-form $\alpha$) & 84.9 & $-0.4$ & 0.44 GB & 2.6$\times$ \\
|
|
BitDelta (calibrated $\alpha$) & 85.1 & $-0.2$ & 0.44 GB & 2.8$\times$ \\
|
|
BitDelta + QAD & 85.2 & $-0.1$ & 0.44 GB & 2.8$\times$ \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{BitDelta ablation on Zen-7B. Memory is delta-only; base is shared.}
|
|
\end{table}
|
|
|
|
\subsection{Inference Throughput}
|
|
|
|
BitDelta achieves 2.8$\times$ throughput improvement over FP16 baseline on A100 GPUs:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lrrrr}
|
|
\toprule
|
|
\textbf{Format} & \textbf{Batch 1} & \textbf{Batch 8} & \textbf{Batch 32} & \textbf{Peak Memory} \\
|
|
\midrule
|
|
FP16 & 42 tok/s & 310 tok/s & 980 tok/s & 14.0 GB \\
|
|
INT4 (GPTQ) & 78 tok/s & 520 tok/s & 1610 tok/s & 7.0 GB \\
|
|
BitDelta & \textbf{118 tok/s} & \textbf{870 tok/s} & \textbf{2740 tok/s} & \textbf{14.44 GB} \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Throughput on A100 80GB for Zen-7B. BitDelta peak memory includes base + delta.}
|
|
\end{table}
|
|
|
|
The throughput advantage stems from binary GEMM: multiplying BF16 activations by 1-bit
|
|
weights uses XNOR-popcount operations, which are 8--12$\times$ faster than BF16 GEMM
|
|
on supported hardware.
|
|
|
|
\subsection{Multi-Tenant Serving}
|
|
|
|
The primary deployment advantage of BitDelta is enabling multiple fine-tuned variants
|
|
on a single server. For Zen-7B with 5 task-specific fine-tunes:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lrr}
|
|
\toprule
|
|
\textbf{Serving Configuration} & \textbf{Memory Required} & \textbf{GPU Count} \\
|
|
\midrule
|
|
5$\times$ FP16 models & 70.0 GB & 5+ A100s \\
|
|
5$\times$ INT4 models & 35.0 GB & 2 A100s \\
|
|
1 base + 5 BitDelta & 16.2 GB & 1 A100 \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Memory savings from BitDelta multi-tenant serving.}
|
|
\end{table}
|
|
|
|
\section{Analysis}
|
|
|
|
\subsection{Layer-Wise Delta Magnitude}
|
|
|
|
Delta magnitude is not uniform across layers. Embedding layers have the largest
|
|
deltas (mean $|\Delta W| = 0.012$); attention Q/K/V have smaller deltas
|
|
(0.003--0.006); FFN intermediate has the smallest (0.002--0.004). This non-uniformity
|
|
motivates per-layer scale factors rather than a global scalar.
|
|
|
|
\subsection{Quality Sensitivity to Delta Sparsity}
|
|
|
|
We vary the fraction of delta elements compressed to 1-bit vs. kept in BF16:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\begin{tabular}{lcc}
|
|
\toprule
|
|
\textbf{Compressed Fraction} & \textbf{MMLU} & \textbf{Compression Ratio} \\
|
|
\midrule
|
|
100\% (full BitDelta) & 85.1 & 31.87$\times$ \\
|
|
95\% top-magnitude kept BF16 & 85.2 & 18.3$\times$ \\
|
|
90\% top-magnitude kept BF16 & 85.2 & 11.1$\times$ \\
|
|
50\% top-magnitude kept BF16 & 85.3 & 2.6$\times$ \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\caption{Quality vs. compression for mixed-precision BitDelta. Full 1-bit achieves near-lossless quality.}
|
|
\end{table}
|
|
|
|
\subsection{Task-Specific Fine-Tune Isolation}
|
|
|
|
A concern with shared base + delta approach is interference between concurrent
|
|
inference requests for different fine-tunes. Our implementation materializes the
|
|
full weight matrix $W = W_0 + \alpha \cdot B$ at request routing time and caches
|
|
per fine-tune on-device. Routing overhead is negligible ($<0.1$ms).
|
|
|
|
\section{Conclusion}
|
|
|
|
BitDelta achieves 31.87$\times$ compression with $<0.5\%$ quality degradation and
|
|
2.8$\times$ inference speedup by compressing only the fine-tuning delta to 1-bit
|
|
while preserving the pretrained base in BF16. The technique enables multi-tenant
|
|
serving of multiple task-specific Zen variants on a fraction of the hardware required
|
|
by full-precision models. BitDelta is now the standard deployment format for all
|
|
Zen models on the Hanzo inference network, enabling cost-efficient serving at scale.
|
|
|
|
\bibliographystyle{plain}
|
|
\begin{thebibliography}{99}
|
|
\bibitem{frantar2022gptq} Frantar et al. (2022). GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers. \textit{arXiv:2210.17323}.
|
|
\bibitem{lin2023awq} Lin et al. (2023). AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration. \textit{arXiv:2306.00978}.
|
|
\bibitem{hu2021lora} Hu et al. (2021). LoRA: Low-Rank Adaptation of Large Language Models. \textit{arXiv:2106.09685}.
|
|
\bibitem{ma2024bitnet} Ma et al. (2024). The Era of 1-bit LLMs. \textit{arXiv:2402.17764}.
|
|
\bibitem{dettmers2022gptq} Dettmers et al. (2022). LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale. \textit{NeurIPS}.
|
|
\end{thebibliography}
|
|
|
|
\end{document}
|