How the Creator of Redis Squeezed a 284-Billion-Parameter DeepSeek Into an Ordinary Laptop

Redis creator antirez compresses 284B DeepSeek from 500GB to 80.8GB to run locally on a 128GB Mac.
Redis author antirez released DS4 "Dwarf Star," a pure-C inference engine that uses asymmetric quantization to compress the 284B-parameter DeepSeek V4 Flash from nearly 500GB to 80.8GB, enabling it to run at 26.7 tokens/sec on a 128GB unified-memory Mac. The article explores MoE architecture advantages, three deployment tiers, and the true barriers to local LLMs.
The DeepSeek You Installed Might Have Always Been a Watered-Down Version
Running large models locally is no longer new, but if you think the DeepSeek installed on your computer is the "full version," you may need to reconsider. The real problem isn't whether your graphics card is powerful enough — it's that this 284-billion-parameter model was never designed to fit consumer-grade hardware from the very beginning.
Let's get the facts straight first. In late April, DeepSeek open-sourced the V4 Flash version — 284 billion parameters, released under the MIT license. On the same day, it also released a 1.6-trillion-parameter Pro version. What the industry mainstream actually runs is the Flash version, and even this "entry-level" Flash requires nearly half a terabyte just to load into memory. This means that for the vast majority of people, so-called "local DeepSeek deployment" is actually running distilled, watered-down versions like 7B or 13B — not the same thing as the real flagship brain.
The so-called "distilled watered-down version" refers to a product created by transferring the capabilities of a large model to a smaller one via Knowledge Distillation. This technique was systematically proposed by Hinton and others in 2015: a pre-trained large model (the teacher model) generates soft labels to guide the training of a smaller model (the student model), so that the smaller model retains as much of the large model's reasoning ability as possible despite a drastic reduction in parameter count. The core insight of knowledge distillation is that a neural network's "dark knowledge" is not stored in hard labels (e.g., "this image is a cat"), but hidden in the teacher model's probability distribution across all categories — even when incorrect categories are assigned extremely low probabilities, these subtle relative probability relationships contain rich structural information that can guide the student model to learn more robust feature representations. DeepSeek officially provides multiple distilled versions based on the Qwen and Llama architectures (from 1.5B to 70B), which can run smoothly on ordinary hardware. However, their knowledge density, long-text processing ability, and complex reasoning performance differ fundamentally from the original 284B model — much like the difference between using a condensed textbook to pass an exam versus studying the original work. It's worth noting that the quality ceiling of distilled versions is inherently constrained by the capability boundary of the teacher model, and for tasks requiring cross-domain integrated reasoning or extremely long context processing, the capability loss caused by parameter compression often far exceeds what benchmark numbers suggest.
It wasn't until early May that the author of Redis (Salvatore Sanfilippo, aka antirez) released a dedicated inference engine written in pure C — DS4, nicknamed "Dwarf Star." It does just one thing: make this giant model actually run on a machine with 128GB of unified memory. The project garnered 13,000 stars in a single month and is now approaching 20,000.
About antirez: Salvatore Sanfilippo is the original author of Redis (Remote Dictionary Server). Redis is one of the most widely used in-memory databases in the world, renowned for its extreme performance and clean low-level C code, and is used for caching and real-time computing by tens of thousands of companies including Amazon, Twitter, and GitHub. Redis was born in 2009, originally a byproduct that antirez wrote to solve a real-time statistics problem for his startup, and later evolved into one of the most widely deployed in-memory data structure storage systems in the world. In the field of systems software, antirez is famous for "writing elegant code in C." His decision to deeply optimize for a single model while abandoning generality aligns closely with Redis's design philosophy of "do one thing and do it extremely well" — the secret to Redis's success is exactly the same as Dwarf Star's: refusing to be a general-purpose database and focusing on memory speed and the extreme expression of specific data structures. His entry into AI inference engineering is seen by the industry as an important endorsement of AI infrastructure by a systems software veteran.
The Core Secret: How Asymmetric Quantization Compresses a 500GB Model
Dwarf Star's ability to squeeze a half-terabyte model into a laptop relies not on brute-force compression, but on a carefully designed asymmetric quantization scheme.
To understand this scheme, you first need to look at the model's structure. DeepSeek V4 Flash is a typical Mixture of Experts (MoE) architecture, with 284B total parameters, but only 13B are actually activated per token. This means the vast majority of parameters in the model are in a "dormant" state during any single inference.
About the MoE Architecture: The Mixture of Experts architecture is a design paradigm that decomposes a neural network into multiple "expert sub-networks." It can be traced back to academic research in 1991 and has been adopted at scale in recent years by top labs such as Google, Meta, and DeepSeek. Its core idea is to use a lightweight "router network" to dynamically select a few experts to process the current input, allowing the model to have an enormous total parameter count (boosting knowledge breadth) while keeping the computation per inference comparable to that of a much smaller dense model. GPT-4, Mixtral 8x7B, and Gemini 1.5 all adopt similar designs.
The MoE routing mechanism poses a subtle engineering challenge: the router network must decide within milliseconds which experts to send the current token to, and this decision process itself is a key bottleneck affecting inference quality and efficiency. DeepSeek V4 Flash uses a Top-K routing strategy, where each token selects about 8 experts to activate from among hundreds. Although the router network's weight matrix has an extremely small parameter count, it carries the core responsibility of "cognitive sorting" — once the routing makes a wrong judgment, the entire token's processing is handed off to the wrong set of experts, and this error cannot be effectively corrected in subsequent layers; instead, it cascades and amplifies throughout the entire forward pass. This is exactly the core engineering rationale behind why Dwarf Star does not compress the routing layer: the routing layer's parameter share is extremely low, so the memory cost of preserving its original precision is negligible, but its value in safeguarding overall output quality is extremely high. Another challenge of MoE is that even though only a few experts are activated each time, the weights of all experts must remain resident in memory — this is precisely the fundamental reason DeepSeek V4 Flash requires nearly 500GB of storage.

The author's compression logic is very clear:
- Expert layers account for the bulk of the parameters, and the experts are mutually redundant — compressed to the extreme of 2-bit.
- Attention layers share expert output heads and are more important — kept at 8-bit.
- The most critical routing layer (the layer that decides which experts to call) is not compressed at all, retaining its original precision.
Behind this trade-off is a hard logic: if one expert is wrong, other experts can back it up; but if the routing is wrong, everything falls apart. So the precision budget should be spent where errors are most fatal. This is exactly what "asymmetric" means — not applying uniform compression across the board, but allocating the bit budget differentially according to how sensitive each layer is to errors.
About Quantization Technology: Quantization is the technique of compressing neural network weights from high-precision floating-point numbers (such as FP32, BF16) to low-precision integer representations, and it is a core engineering method for local deployment of large models. Measured in bits: each parameter takes 2 bytes in FP16, 1 byte in INT8, 0.5 bytes in INT4, and just 0.25 bytes per parameter in 2-bit quantization — this is the mathematical basis by which Dwarf Star can compress the model from about 500GB down to 80.8GB. The inherent cost of quantization is precision loss: the fewer the bits, the more likely the model's output quality will decline.
Mainstream quantization schemes in academia and industry each have their own focus: GPTQ (layer-by-layer quantization based on approximate second-order information) and AWQ (Activation-aware Weight Quantization, which reduces error by protecting salient weight channels) both focus on how to more finely allocate quantization error within a layer; schemes like llama.cpp's Q4_K_M seek a balance between format compatibility and runtime efficiency. The common starting point of these schemes is "intra-layer optimization" — making precision decisions within the range of the statistical characteristics of a single layer's weight distribution, with quantization granularity stopping at the layer level. Dwarf Star, on the other hand, elevates its perspective to the "architectural topology level": it directly encodes the functional roles and error-sensitivity differences of the expert layers, attention layers, and routing layers in the MoE structure into quantization decisions — essentially transforming the domain knowledge of the model architecture into prior constraints for the compression strategy. This kind of "structure-aware differentiated quantization" represents a paradigm evolution from "globally uniform quantization" toward a more refined direction, and it also provides an important engineering reference path for subsequent customized inference engines targeting specific architectures.
After compression, the model size drops from nearly 500GB to 80.8GB. On his own M3 Max, the author measured a generation speed of 26.7 tokens per second at a context length of 32K tokens — faster than a normal person's reading speed. Note: this is the author's self-reported data, not a third-party independent evaluation, so please keep a cautious judgment when referring to it.

The MoE Architecture's Dimensional Advantage: Why Sparse Activation Beats Dense Models
To verify Dwarf Star's actual performance, a tester used a workstation configured with dual 4090s (48GB VRAM) for comparison, running a 20.7B dense model.
The result was rather dramatic: this 20.7B dense model could fit entirely into VRAM, generating 27.6 tokens per second — seemingly only slightly faster than Dwarf Star. But keep in mind, this is a model with more than 10 times fewer parameters, and it barely managed to tie with Dwarf Star.

The more crucial turning point appears when the context is lengthened. As the context grows, about 20% of the dense model's parameters overflow into main memory, and its speed plummets directly to 5.7 tokens per second. Meanwhile, Dwarf Star is almost unaffected.
The root cause again comes back to the architectural advantage of MoE: only 13B is activated per token, and it's 2-bit quantized. Doing the math, the amount of data that Dwarf Star actually involves in computation to generate each word is even less than that 27B dense model. This is sparse activation's dimensional strike against dense models — large and sparse turns out to be more efficient than small and dense.
There's also a key hardware bandwidth bottleneck issue involved here. The speed of large model inference is often limited not by compute (FLOPS), but by memory bandwidth — that is, how much weight data can be moved from memory to the compute units per second. The inference phase of large models (especially the autoregressive decoding phase) has a typical "memory-bandwidth-bound" characteristic: to generate each token, all the weights of the activated layers need to be read from memory once, while the actual number of floating-point operations performed is relatively few, leaving the GPU's compute units idle waiting for data most of the time. When a dense model overflows VRAM, data needs to be transferred back and forth between VRAM and main memory via the PCIe bus. The theoretical bandwidth of PCIe 4.0 x16 is only about 32GB/s, over 30 times slower than GPU VRAM bandwidth (GDDR6X at about 1TB/s). This is precisely the physical root of the cliff-like speed drop after overflowing into memory (from 27.6 to 5.7 tokens/s) — the starvation effect caused by the sudden bandwidth drop is far more destructive than the increase in computational load. Dwarf Star, under a unified memory architecture, has the CPU and GPU sharing the same high-bandwidth memory pool, avoiding this cross-bus transfer penalty.
This also explains a counterintuitive phenomenon: more parameters does not mean slower. The key is how many are actually activated per inference, and whether the activated data can be efficiently transferred to the compute units.
A Controversial Design: Rejecting Flexibility, Wanting Only Correctness
Dwarf Star also has a design that drew a lot of criticism — it rejects universal formats and runs only this one model. Quantized files must be officially verified before release, and users cannot freely load other models.
Many criticized this as "locking things down," sacrificing the flexibility that local inference has always prided itself on. But the author's reasoning is equally clear: local inference has been a "toy" for years precisely because any model can run, but the quality is all guesswork. He explicitly chose correctness over flexibility.

This design decision carries profound meaning at the level of engineering philosophy. General-purpose inference frameworks (such as llama.cpp, Ollama) pursue the goal of "running everything," and their optimization strategy inevitably targets the lowest common denominator: supporting universal formats like GGUF and being compatible with hundreds of model architectures, but consequently making it difficult to deeply customize for any specific model's topology. The cost of this generality is implicit — when a framework needs to support dozens of different architectures like Llama, Mistral, Qwen, and DeepSeek simultaneously, key decisions such as memory layout, computation scheduling, and quantization granularity can only take the intersection of all architectures, rather than the optimal solution for any single architecture. Dwarf Star chose an orthogonal path: hard-coding its understanding of the DeepSeek V4 Flash architecture into the inference engine, with the quantization scheme, memory layout, and computation scheduling all tailor-made for this one model. This is exactly like the engineering approach of "customizing firmware for specific hardware" in embedded systems development — giving up portability in exchange for extreme targeted performance. The official verification mechanism further brings quantization quality into a trusted system: every released quantized weight file is benchmark-tested and verified to ensure output quality remains within an acceptable range, fundamentally eliminating the uncertainty of "the model runs but you don't know what nonsense it's spouting." In his blog, antirez wrote a rather weighty statement: after playing with local models for so many years, this is the first time he has handed a serious job to a local run — previously, such tasks would only be sent to a cloud-based flagship model. This sentence is perhaps the true significance of Dwarf Star: it attempts to push local large models from a "just needs to run" toy toward a "can be entrusted with production tasks" tool.
Three Tiers of Reality: Stop Trusting Memory Calculators
Let's divide the reality of locally deploying this model into three tiers, so everyone can find where they fit:
Tier One: Machines with 128GB Unified Memory (High-Memory M-Series Macs)
Dwarf Star runs directly and is genuinely usable. This is currently the only path verified to be "usable and works well."
About the Unified Memory Architecture: Apple's M-series chips' "Unified Memory Architecture (UMA)" is the core reason for their unique advantage in the field of AI inference. In traditional PC architectures, CPU memory and GPU VRAM are physically isolated, data transfer across the bus incurs latency, and capacity is limited by the GPU's VRAM ceiling (consumer-grade typically maxes out at 24GB). M-series chips integrate the CPU, GPU, and Neural Engine on the same chip, sharing the same physical memory pool — the M3 Max supports up to 128GB, and the M2 Ultra supports up to 192GB. Model weights, activations, and the KV cache can all reside here, and the GPU accesses them directly without cross-bus transfer.
The memory bandwidth dimension deserves special attention: the M3 Max's peak memory bandwidth is about 300GB/s, the M2 Ultra reaches 800GB/s, while ordinary PC DDR5 memory bandwidth is about 80GB/s. Since large model inference is a typical "Memory Bandwidth Bound" task, this bandwidth gap directly translates into an inference speed advantage. From the complete perspective of system architecture, UMA's advantage goes beyond the bandwidth numbers: it eliminates the hard ceiling on VRAM capacity, allowing the 80.8GB model weights plus the dynamically growing KV Cache during inference to share the same contiguous address space. The memory allocator does not need to maintain two separate memory management strategies on the CPU side and GPU side, which also greatly reduces complexity at the engineering implementation level. When Dwarf Star keeps the entire 80.8GB model resident in the M3 Max's unified memory, the weight movement required for each inference can fully leverage this high-bandwidth channel — this is exactly the complete hardware logic behind why Dwarf Star treats the 128GB Mac as the "only usable path."
Tier Two: Ordinary Graphics Card Workstations
On paper, adding VRAM and main memory seems like it can fit, but in practice it's too slow to use. Being able to load doesn't mean being able to use. As soon as the context gets larger, it overflows and the speed drops off a cliff.
Tier Three: Ordinary Computers
It's advisable to patiently wait for the backend ecosystem to mature, and not to bother for now. And stop treating the watered-down 7B version as the full DeepSeek.
Here's an important reminder: Don't trust memory calculators. Those tools that tell you "XX memory can run XX model" only calculate the loading space, not the activation overhead, context expansion, and backend efficiency during actual inference. Between being able to load and being able to run lies a chasm that can only be crossed with real-world testing.
The so-called "KV cache bloat" is the key trap here: when processing long contexts, the Transformer architecture needs to cache the Key and Value vectors (i.e., the KV Cache) of every historical token at every layer, and its memory footprint is linearly proportional to the context length. To feel its magnitude with concrete numbers: DeepSeek V4 Flash has 60 Transformer layers, with a KV head dimension of 128 per layer. Using BF16 precision, the KV Cache for 32K tokens takes up roughly: 60 layers × 2 (K and V) × 32,768 tokens × 128 dimensions × 2 bytes ≈ 50GB — this overhead is completely absent from most memory calculators, yet it is the biggest competitor for memory space against the model weights in actual operation. This is exactly the direct cause of the "overflows as soon as the context gets larger" phenomenon, and it's why Dwarf Star's choice of 32K as the benchmark context length is particularly significant: it's the engineering balance point between weight usage and KV Cache growth under the 128GB memory constraint.
The value of Dwarf Star lies not only in squeezing a giant model into a laptop, but more in the fact that it uses differentiated quantization to prove one thing: the bottleneck for local large models is often not the hardware, but whether anyone is willing to do deep, generality-sacrificing engineering optimization for a specific model. When a systems engineering master like antirez enters the arena, the ceiling of local AI inference is being redefined.
Key Takeaways
Related articles

Gemini 3.7 Flash Hands-On: Coding Capabilities Skyrocket, Year-End Deals Worth Grabbing
Google Gemini 3.7 Flash hands-on review: code quality hits 43.6% surpassing Sonic 5, software engineering jumps to 65.3%. Year-end promo at $0.75/M input tokens. Same day, OpenAI achieves 14x speedup via Cerebras chips.

Sim-to-Real Gap in Quadruped Robots: Causes and Solutions for Bridging the Simulation-Reality Divide
Explore the Sim-to-Real Gap in quadruped robots: causes like physics mismatch, sensor noise, and actuator dynamics, plus solutions including domain randomization and system identification.

The AI Spending Divide: 1% of Companies Are Going All In While Most Are Still Spending 'Lunch Money'
Ramp AI Index data shows the top 1% of companies treat AI as essential operating expense while median firms spend 'lunch money.' Analysis of the divide, causes, and actionable takeaways.