00 Lab notes · November 11, 2026
How an AI model picks its experts
I logged which parts of a large open AI model fired for every word it wrote, to see if I could guess the next ones early and have them ready. Here's what the routing looks like and what the numbers say.
01 What I tested and why
Loading the truck before the call
The model I used is gpt-oss-120b, an open model, run with llama.cpp. It's a "mixture of experts" model. Each of its 36 layers holds 128 small expert networks, and for every word it writes a router in each layer picks 4 of the 128. The other 124 sit idle for that word.
That makes speed a memory problem, not a math problem. All the experts together take about 61 GB. The test machine has a 24 GB consumer graphics card and a 16-core desktop CPU, so most experts live in ordinary system memory and only some fit on the card. Every word, the 144 experts it needs have to be read from wherever they are, and the slow places are slow.
So the question was simple: can I predict which experts come next and have them sitting in fast memory before they're asked for? Think of a dispatcher who knows what the next call usually needs and loads the truck before the phone rings.
I ran six prompts (a field-service question, code, a casual chat, a summary, a rollout plan, and a Spanish explainer) and logged the experts picked in every layer for every word: 3,752 words in all. Strictly these are tokens, which are words or pieces of words.
02 The node map
Every expert, every layer
Each column is a layer, 1 to 36, left to right. Each dot is one of its 128 experts, sorted so the busiest are at the top. Bigger and brighter means it fired on more words. The lines are the 300 strongest "this expert usually leads to that one" links between neighbouring layers. Tap or hover a dot to see its links. The lines always come from all six prompts; the picker recolours the dots.
Drag sideways to see all 36 layers. Arrow keys move between experts when the map has focus. Esc clears.
Pick an expert
Loading the map…What to look for: a handful of fat dots at the top of each column do a large share of the work, the switch between prompt types moves some of them around, and the lines bunch up between the busy experts. That bunching is the "it usually goes here next" pattern I was hoping to use.
03 Key findings
Skewed, sticky, and predictable
of the work is done by the busiest 10% of experts in a layer. An even spread would be 10%.
Measuredof experts used on one word get used again on the very next word. Chance would be 3%.
Measuredof the next layer's experts are inside 8 guesses made one layer early. 84% with 4 guesses.
Measuredmore speed looks reachable: about 28–32 words a second against 20.7 today.
EstimateA few experts do most of the work
Share of all expert picks, with each layer's experts sorted busiest first, averaged over the 36 layers.
- What the model did
- An even spread
The top 25% (32 experts) do 71%. Within one prompt it's tighter still: the top 10% do 43–65%, with code the most spread out and Spanish the least. Only about 6 of 128 experts per layer never fired across all six prompts, so the busy set shifts from prompt to prompt. Measured
Experts get reused
Chance an expert used on a word is used again in the same layer a few words later.
This held across prompt types: 27.5% for code up to 36.6% for Spanish on the next word. Measured
Guessing the next layer
How much of the next layer's real pick was inside the guess. The winner is simple: each layer has a small router, and if I run the next layer's router on what the current layer is already holding, it nearly always names the right experts. It costs one small extra calculation per layer.
Guess 4 experts
Guess 8 experts
A light bar is a range: the tables were built on half the prompts and tested on the other half, both ways round. The early-router trick ran from 62% to 90% per layer with 4 guesses and was weakest at layer 1. Measured
How often the expert is already on the card
Share of expert reads served from the graphics card, by how much of the card is given to experts.
- Whole layers on the card (how it's split today)
- A fixed list of the busiest experts (range)
- Keep the most recently used
- Best possible, if it knew the future
The shaded strip is what the card can really spare after everything else: about 16–18 GB. At 16 GB, keeping recently used experts hits 83% against 28% for today's whole-layer split. A fixed "hot list" was tested on prompts it hadn't seen, which is why it falls short. Simulated
Speed, today and projected
Words written per second, one answer at a time.
The striped bars are estimates. The slow one at the top matters: llama.cpp already has a cache that copies a missed expert onto the card, and here it made things slower. Copying one expert over takes about 2 ms; working it out on the CPU takes about 0.3 ms. So a miss should be computed on the CPU, and the card refilled in the background. That's the design behind the 28–32.
04 Multicore CPU
More cores, same speed
I also ran everything on the CPU with 1 to 32 threads. Writing an answer stops getting faster around 8 threads, because every word has to read about 1.9 GB of experts out of memory and the memory is already close to its limit. Reading the prompt is real math and keeps scaling.
Writing the answer
Words per second by thread count, CPU only.
- gpt-oss-120b
- A smaller 30B model (Qwen3-Coder-30B)
The 120B model wobbles between 8 and 32 threads; I didn't chase the dip at 12–16. Measured, 2 runs each
Reading the prompt (30B model)
Prompt words per second by thread count, CPU only. This part is compute, so cores help.
Memory copy speed barely moves with more workers: about 47 GB/s with 1, 55 GB/s with 16. The 120B model already pulls about 44 GB/s while writing. Measured
Several people at once
gpt-oss-120b serving several answers at the same time, 256 words each.
| At once | Each person gets | Total |
|---|---|---|
| All experts on the CPU | ||
| 1 | 13.9 /s | 13.9 /s |
| 4 | 5.2 /s | 20.7 /s |
| 8 | 3.1 /s | 24.6 /s |
| Split between the card and the CPU | ||
| 1 | 17.3 /s | 17.3 /s |
| 4 | 6.7 /s | 26.6 /s |
| 8 | 4.0 /s | 31.6 /s |
Words written per second. Total output goes up about 1.5× with 4 people and 1.8× with 8, but each person waits longer. Prompt reading in this server setup was slow and I didn't dig into it. Measured
The takeaway
- More cores help many people at once, not one answer faster. Past about 8 threads a single answer doesn't speed up.
- Memory channels matter more than core count. One core nearly fills the memory bus on its own. If I were buying for this, I'd pay for memory bandwidth before cores.
- Serving several people spreads the experts out. Each extra answer mostly wants different experts, so the bandwidth runs out fast, and a cache would hit less often than the single-answer numbers above. I didn't simulate that.
- It also limits the cache idea. Refilling the card in the background reads from the same memory the CPU is using, so the refill has to be kept from starving the CPU.
05 What's next
The honest verdict
About +40% looks reachable: roughly 28–30 words a second against 20.7 today, with a range of +15% to +75%. It won't come close to running the whole model on the card.
The routing is cacheable and it's predictable. What gets in the way is the link between system memory and the card: copying an expert over when it's missed is slower than just working it out on the CPU. So the plan is hits on the card, misses on the CPU in the same layer, and the card refilled in the background.
That has to be built inside the inference engine, llama.cpp, where each layer decides which experts run where. A separate program sitting beside it can't split one layer's work between the card and the CPU. So this becomes an engine patch, not a standalone tool.
My first idea was A*-style: predict where the model is going and get there first. The 84% and 96.6% results are what back that up. Running the next layer's router early names the experts before they're needed, which is the window to have them loaded. At today's copy speed the loads can't be fully hidden yet; with a faster link they mostly could.
What this doesn't cover
- One model, six prompts, about 3,750 words. Long chats and other subjects will move the numbers a few points.
- Cache hit rates are for one answer at a time.
- The 28–32 and the ~52.8 are estimates from a fitted model. The CPU-miss path doesn't exist in llama.cpp yet, and splitting inside a layer could cost more than I measured.
- Everything here ran on one machine with one graphics card.
See it move
The weights view runs a small model of the same design in your browser: type a sentence, watch the router pick experts for every word, open any word up to see the numbers, and try a simulator that uses the measurements from this page. The big-model recordings land there as they're made.