Downloads · 30 days
8
9% of all-time downloads
eulogik/nanowhale-100m-DIME
nanowhale-100m-DIME is a text generation model from eulogik. Use it when you need the model to write or continue text. It is set up for numpy. The card lists the license as apache-2.0.
<p align="center" <img src="DIME-logo.png" alt="DIME logo" width="320"/ </p
Downloads · 30 days
8
9% of all-time downloads
All-time downloads
85
Public
Repo size
645 KB
Likes
1
Public
Click a slice to open those files.
.png645 KB · 96%
From the Hugging Face model README
Pure-NumPy reference implementation of the DeepSeek-V4-Tiny architecture (MLA + Hyper-Connections + MoE).
Maintained by eulogik — building DIME, the disk-streaming Mixture Engine for running 284B-class MoE models on 16 GB Macs.
No PyTorch. No GPU. No CUDA. Just numpy + safetensors. And it matches the
official PyTorch reference exactly — cosine similarity = 1.000 on logits,
verified across 1–9 tokens.
This is the reference engine behind DIME (Disk-streaming Mixture Engine) — the runtime that runs 284B-class MoE models on a 16 GB Mac Mini by streaming experts from disk.
⚡ Run a 110M-parameter MoE model in ~10 lines, in the browser, on a phone, or on a toaster. The weights are ~441 MB and load with zero ML frameworks.
pip install numpy safetensors
from huggingface_hub import snapshot_download
from nanowhale_dime import NanowhaleDIME
model_dir = snapshot_download("cmpatino/nanowhale-100m")
model = NanowhaleDIME(model_dir)
print(model.generate("The future of efficient inference is", max_new_tokens=32))
Or just open the Colab notebook — zero setup.
nanowhale-100m is a 110M-parameter DeepSeek-V4-Tiny that distills the key
ideas of DeepSeek-V4 into a tiny, hackable package:
| Component | Detail |
|---|---|
| Layers | 8 |
| Attention | Multi-head Latent Attention (MLA) with RoPE |
| Experts | 4 routed + 1 shared, top-2 routing |
| Hyper-Connections | hc_mult=4 with Sinkhorn-iterating mixer |
| MTP | Multi-Token Prediction head |
| Params | ~110M (float32, ~441 MB safetensors) |
All of it is reimplemented in readable NumPy in a single file
(nanowhale_dime.py) that you can read end-to-end in one
sitting. Great for learning how modern MoE + MLA models actually work under the
hood.
We compared our NumPy forward pass against the official PyTorch reference model on logits for sequences of length 1, 4, and 9 tokens:
tokens=1 cos=1.000
tokens=4 cos=1.000
tokens=9 cos=1.000
The implementation faithfully reproduces:
DIME is an MoE inference runtime for Apple Silicon that breaks the "must fit in RAM" rule. It lazily loads expert weights from local or networked NVMe and keeps a frequency-promoted hot tier of the experts you actually use (the same trick ktransformers uses to run 236B models on consumer hardware).
nanowhale-100m-DIME is the fully self-contained, verified reference. Once the
math is proven at 110M params, the same engine scales to
DeepSeek-V4-Flash-class (284B) models — streamed, not loaded.
Follow eulogik for the 284B-on-a-Mac-Mini release. 🍎
Weights and tokenizer are from cmpatino/nanowhale-100m.
This repo contains only the NumPy inference engine + Colab + this card.
We build DIME (Disk-streaming Mixture Engine) — MoE inference for Apple Silicon that runs models far larger than RAM by streaming experts from disk. Follow @eulogik and star eulogik/dime for the 284B-on-a-Mac-Mini release. 🍎
Apache-2.0 (weights inherit their original license).