Weight Representations: Dense vs Sparse vs Quantized vs Pruned

AI & Machine Learning Foundations beginner How AI Works 13 min read

Overview

Every neural network is, at its core, a collection of weight matrices. How those weights are represented — their numerical format, sparsity pattern, and structural organization — determines the model’s memory footprint, inference speed, and deployment options. There are four fundamental approaches to weight representation, each trading off a different axis of efficiency.

This page is a comparative map of all four approaches. It links to the detailed topic pages for each technique, provides a side-by-side comparison table, and explains how these approaches compose in production systems. If you’re deciding how to optimize a model for deployment, start here.

The four representations are: Dense (full-precision, all weights active), Sparse/MoE (only a subset of weights activated per input), Quantized (lower numerical precision), and Pruned (weights permanently removed). Understanding when and how to apply each — and how they stack — is essential for deploying large models efficiently.

The Four Weight Representations

1. Dense (Full-Precision)

The baseline: every weight is stored in full precision (FP32 or BF16/FP16) and every weight participates in every forward pass. This is how models are typically trained. A 70B-parameter model in BF16 requires ~140 GB of memory just for weights — before accounting for activations, KV cache, or optimizer state.

2. Sparse / Mixture-of-Experts (MoE)

Instead of activating all parameters for every input, Mixture-of-Experts models route each token to a small subset of specialized “expert” sub-networks (typically 2 out of 8–64 experts). The total parameter count is high (for knowledge capacity), but the active parameter count per token is much lower (for compute efficiency). See Mixture of Experts (MoE) for the full treatment.

Models can be born as MoE or converted post-hoc via Sparse Upcycling or ToMoE.

3. Quantized (Low-Bit)

Quantization reduces the numerical precision of weights from 16-bit or 32-bit floating point to lower bit-widths — typically 8-bit, 4-bit, or even 2-bit integers or custom formats. This shrinks memory proportionally and enables faster integer arithmetic on supporting hardware. See Quantization for techniques like GPTQ, AWQ, and GGUF.

4. Pruned (Weights Removed)

Pruning permanently removes weights deemed unimportant — setting them to zero (unstructured) or removing entire rows/columns/heads (structured). The model becomes smaller and potentially faster. See Neural Network Pruning for SparseGPT, Wanda, and structured pruning.

Comparison Table

Representation

How It Works

Primary Benefit

Primary Cost

Stacks With

Dense

All weights active, full precision (FP16/BF16/FP32)

Maximum accuracy; simplest to train and debug

Highest memory and compute; may not fit on target hardware

Baseline — all others start here

Sparse / MoE

Router selects subset of expert FFN blocks per token

High capacity with low per-token compute (3–4× fewer active params)

Full model in memory; router complexity; communication overhead

Quantization, Pruning

Quantized

Weights mapped to lower bit-width (8-bit, 4-bit, 2-bit)

Linear memory reduction (4-bit = 4× smaller); faster integer ops

Accuracy loss below 4-bit; outlier handling needed; quantization artifacts

MoE, Pruning, Distillation

Pruned

Unimportant weights zeroed (unstructured) or removed (structured)

Smaller model; 2× speedup with 2:4 sparsity on NVIDIA GPUs

Sparse kernels needed for unstructured speedup; accuracy loss at >60% sparsity

Quantization, MoE

These Compose: Real-World Stacking

The four representations are not mutually exclusive — in fact, production models routinely combine multiple techniques for maximum efficiency. The key insight is that each technique targets a different source of redundancy:

Key Concept: The Composition Stack

A pruned, 4-bit-quantized MoE model upcycled from a dense checkpoint represents the full composition stack: start with a dense pre-trained model → upcycle into MoE (sparse activation) → prune inactive or low-importance weights → quantize to 4-bit. Each step compounds the savings. A model that would require 140 GB as a dense FP16 checkpoint might serve at under 20 GB as a pruned, quantized MoE — fitting on a single consumer GPU.

Real Examples of Composition

Choosing the Right Combination

The typical decision tree for deploying a large model:

  1. Does it fit in memory at FP16? If yes, start with quantization (4-bit AWQ/GPTQ) for easy 4× memory savings with minimal accuracy loss.
  2. Need more compute efficiency? Apply 2:4 pruning before quantization for hardware-accelerated sparsity on NVIDIA GPUs.
  3. Need massive scale with lower per-token cost? Use or upcycle to an MoE architecture, then quantize the experts.
  4. Extreme constraints (edge, mobile)? Combine structured pruning + aggressive quantization (2–4 bit) + knowledge distillation from the full model.

Fine-Tuning with Low-Bit Representations

Quantization doesn’t just help inference — it enables fine-tuning of models that wouldn’t otherwise fit in GPU memory. QLoRA quantizes the base model to 4-bit NormalFloat and trains only small LoRA adapters in full precision. This allows fine-tuning a 65B model on a single 48 GB GPU — democratizing access to large model customization.

Key Takeaways

Deep Dive Topics

Further Reading