From the DeepSeek-V4-Flash-0731 interpretability project
DeepSeek-V4-Flash-0731 is a "mixture of experts" language model. Instead of processing every word through one big neural network, it has 256 small expert networks at each of its 43 layers. For each token (roughly, each word or piece of a word), a gate picks the best 6 experts for that token and sends it to just those. The rest sit idle.
| Property | Value | What it means |
|---|---|---|
| Layers | 43 | How many times the token gets processed in sequence |
| Experts per layer | 256 | How many sub-networks are available at each layer |
| Experts used per token | 6 | How many of those 256 actually get activated |
| Vocabulary | 129,280 | How many distinct tokens the model knows |
| Expert precision | fp4 | 4-bit floats for expert weights (saves memory, slight quality tradeoff) |
| Attention precision | fp8 | 8-bit floats for attention (good balance of speed and quality) |
| Gate function | sqrt-softplus | The math the gate uses to score each expert |
We wrote a Python script called observe_religious.py that does one simple thing: it feeds text to the model and records which experts get selected, without letting the model generate any output. It's like putting the model in an fMRI machine. We can see which parts light up, but we're not changing anything.
Here's what happens for each piece of text we feed in:
The harness runs on two GPU machines working together (the model is too big for one). We verified our interception code line-by-line against the model's actual gate logic to make sure we're recording what the model really does, not a distorted version of it.
We needed a way to rank which experts matter most for a given text. We use a metric called REAP, which is just two things multiplied together:
A high REAP score means the expert was both frequently selected and contributed a lot when selected. We compute this per expert, per layer, per text sample, then average across all samples in a category.
We also used two techniques to see what the model is "thinking" at each layer:
We ran both on 80 samples across all traditions. See the J-space lens page for details and the interactive viewer.
Every single record has to pass these checks before we accept it. If any check fails, we throw the record out and stop the run:
sequence_length x 6 (because 6 experts are picked per token, one frequency count per expert per token)Result: zero violations across all 3,682 records.
| What | Details |
|---|---|
| Two GPU servers | Both are DGX Spark machines. One acts as the "head" (rank 0), the other as the "worker" (rank 1). They communicate over a direct network link. |
| Container | The model runs inside a Docker container with all dependencies pinned. |
| Crash recovery | If the network link between the two GPUs hiccups (which happened several times), the harness skips already-completed records on restart. Zero data lost across 3,682 records and 3 crashes. |