1 of 8

The field

Forget the chat window for a minute. After training, a language model is a function that takes the text so far and returns odds for what comes next. Everything else on this site is about how expensive it is to evaluate that function once.

A function, and a file of numbers

The text is cut into tokens, pieces a bit shorter than a word. Given tokens 1 to tt, the model returns a probability for every token that could come next:

p(xt+1∣x1,…,xt)p(x_{t+1} \mid x_1, \dots, x_t)

How you train such a function is a different story, with enormous text collections and weeks on thousands of cards. I am only interested in what is left afterwards, because that is the part you can run at home.

What is left is a file of numbers. The numbers are arranged into matrices, and the matrices into a fixed graph of operations: layer after layer, always in the same order. The file does not change while the model works. It does not learn from your chats and it does not rearrange itself for a task. All the variety comes from the input.

A position in a space

Inside the model a token is not a word. It is a vector, a list of a few thousand numbers. In Kimi K3.1 Pro the list is 7,168 numbers long. You can read that list as coordinates: one point in a space with 7,168 dimensions.

ht∈Rd,d=7168 in Kimih_t \in \mathbb{R}^{d}, \qquad d = 7168 \text{ in Kimi}

That point is called the hidden state, and the space it lives in is the latent space. The point reached after reading token tt stands for everything the model has taken from the text so far. It is not a summary of the last word. It is where the whole trail has led.

ht=f(x1,x2,…,xt)h_t = f(x_1, x_2, \dots, x_t)

Odds at every position

Now the part that makes it a field. Pick any point in that space and the model has an answer ready: a probability for every token in its vocabulary. So every position carries a full set of odds, the way every spot on a weather map carries a wind arrow.

p( ⋅∣ht)=softmax⁡(Wout ht)p(\,\cdot \mid h_t) = \operatorname{softmax}(W_{\text{out}}\, h_t)

WoutW_{\text{out}} is the output matrix: one row per token in the vocabulary. Softmax turns the scores into probabilities that add up to one.

The field: a position, and odds for the next step
dog 18%same 7%21%is 22%was 11%34%down 15%in 5%72%a 17%my 6%61%floor 14%sofa 9%52%and 21%, 12%47%Thecatsatonthemat.faint arrows: where the likeliest next step points from each spot
Two dimensions drawn, 7,168 real ones. The trail is the text so far. At the ball, the model holds odds for each candidate step: thick arrows are likely, thin ones unlikely. One is taken, the ball moves, and the odds are read again at the new spot.

A token, seen this way, is what you read off the field at the point where you stand: the characteristic of the best next step from here, given the whole trail behind you. Writing an answer is a walk. Each step t→t+1t \to t+1 picks a token from the odds and moves the point.

xt+1∼p( ⋅∣ht),ht+1=f(x1,…,xt,xt+1)x_{t+1} \sim p(\,\cdot \mid h_t), \qquad h_{t+1} = f(x_1, \dots, x_t, x_{t+1})

Turning the dial: temperature

In the drawing above the ball always took the thick arrow. A real model draws its step from the odds, and one number decides how adventurous the draw is. It is called temperature.

pi=e zi/T∑je zj/Tp_i = \frac{e^{\,z_i / T}}{\sum_j e^{\,z_j / T}}

ziz_i is the score the model gives candidate ii, and TT is the temperature. At T=1T = 1 these are the model's own odds. As TT falls towards 0 everything piles onto the best candidate. Above 1 the odds flatten out.

Turning the dial: the same start, twelve walks
height = how unlikely; the pale line is the best path2 of 12 walks strayed from the best pathtemperature 0.70five candidates, same scores,odds reshaped by the dialmat78%floor12%sofa6%bed3%moon0%about 2.1 real choices1.0 means no choice at all,5.0 means a coin with five sides
One start, twelve walks. The landscape is invented: a main valley for the likeliest continuation and two side valleys for others, with height standing for how unlikely a spot is. Every walk draws each of its steps from five candidates with the formula above. Move the dial. At 0 all twelve run down the same valley. Around 1 most have wobbled and a few have turned off for good. Near 2 they wander.
  • Temperature does not change what the model knows. The scores stay the same. Only the draw changes.
  • A small difference early becomes a different text. Once a walk has turned into a side valley, every later step is read from there.
  • The climb has no dice in it. The trip up the layers is the same at every setting. Only the last draw differs.
  • From 0 to 1 the dial matters less than you would think. On exam-style questions nine models scored the same anywhere in that range. Past 1 some fall apart: in a 2026 test six of thirteen open models lost 17 to 38 points between 0.7 and 1.3.
  • On a real server 0 is not quite zero. One team sent the same prompt 1,000 times at temperature 0 and got 80 different texts. The dial was not the cause. The server groups requests differently as its load changes, and that shifts the arithmetic by a hair.
  • The name comes from physics. Read the score as minus an energy and this is the rule for where a particle sits at temperature TT. Cold systems settle in the lowest valley. Hot ones roam.

What shape is the field?

Nobody has drawn a map of the whole field. What exists is a handful of measurements, each of one property, most of them made on open models with a few billion weights. Here are six.

Six things that have been measured about the space
Nearly emptydirections in use, layer by layerA thin flat sheetall the odds it can give lie on itOne narrow bundlepaths of many prompts up the layersNeighbourhoodsclose in direction, close in meaningRings and springsweekdays on a ring, numbers on a springSeen is not always usedthe ring is there; the sum is done in tens4,096 on offer, far above this framesome tensfirst layerlastthe box: any table of scoreslayer 1last layerGolden Gate BridgeAlcatrazthe PresidioMoTuWeThFrSaSu+3 days099“six months after August?”AugFebthe ring: there, not used8 + 6= 14February
Sketches, not plots. Each panel shows the kind of thing that was found. The numbers are in the list below.
  1. It is nearly empty. Five open models whose states have 4,096 coordinates keep ordinary text within some tens of directions. The count climbs to a peak in the early-middle layers and falls again.
  2. Everything a model can answer lies on a thin flat sheet. The scores for the whole vocabulary can vary in only as many ways as the state has coordinates. Outsiders used this to measure the state of gpt-3.5-turbo from its replies alone: about 4,096 coordinates.
  3. The paths stay in one narrow bundle. Follow the states of many different prompts up the layers and they run together, like a rope that frays a little towards the top. In GPT-2 medium a quarter of the directions is enough to keep the prediction.
  4. There are neighbourhoods. In Claude 3 Sonnet the nearest neighbours of the direction that stands for the Golden Gate Bridge are Alcatraz and the Presidio. Close in direction means close in meaning.
  5. Some things sit on rings and springs. Weekdays and months lie on circles. Numbers lie along a spring whose turns have periods 2, 5, 10 and 100.
  6. A shape you can see is not always the shape in use. Looked at closely, the weekday ring behaves like seven separate spots. And Llama-3.1-8B answers “six months after August” by adding 8 and 6 to get 14 and then looking up February. The month ring is there, and the sum goes round it.

measured On released models, 2024 to 2026, among them GPT-2, Llama, Mistral, gpt-3.5-turbo and Claude 3 Sonnet. Nothing of this kind is published for Kimi. Sources in the notes.

Groups, and waves

Are there groups in there? In the everyday sense, yes: the neighbourhoods and the rings above. In the mathematician's sense, a set with a rule for combining its members, the complete story exists only for small networks trained on one task. A small transformer taught to add on a clock does it by turning the numbers into waves and adding the angles. In large models there are the rings and the spring, and as the last item says, the model does not always use them.

The waves are the part I like, because this is harmonic analysis in the plain sense of the word. A ring is one sine and one cosine of the same period. The spring for numbers is four such pairs, with periods 2, 5, 10 and 100, and a straight axis. One 2026 paper traces the month ring to a symmetry in the text itself: how often two months turn up together depends only on the gap between them. Nobody has yet split the whole field into waves. Every result so far is for one quantity at a time.

Waves also give an exact meaning to “the next best approximation”. Start with the strongest pair and you have a ring. Add the next pair and the ring gains two ripples. Each further pair corrects what the earlier ones left out, and no other choice of the same number of waves would come closer.

A loop built from waves, one pair at a time
The looppale: the full shape; dark: the best copy with the waves in use1234567891011122 of 4 pairs in useThe waveseach pair is a sine and a cosinepair 1: one wave per turn, strength 1pair 2: two waves per turn, strength 0.36pair 3: three waves per turn, strength 0.2pair 4: four waves per turn, strength 0.12
One pair is a ring. Each further pair adds finer ripples. The pale loop is the full shape, built from four pairs. The dark one is the best copy that fewer pairs can make. The strengths are invented, and everything beyond the ring is squeezed onto one extra axis so that it can be drawn. Anthropic found a rippled curve of this kind in Claude 3.5 Haiku, which uses it to keep count of the characters on a line.

Where the picture bends the truth

  • The odds map is exact. From the final state to probabilities is one matrix and a softmax, just as written.
  • The motion rule is simplified. The next position is not computed from the last point alone. The model looks back over every earlier token on the trail, through attention. That is what the cache in play 3 is for.
  • The landscape is a toy. Real odds live over thousands of dimensions and tens of thousands of candidates. The temperature formula, though, is the real one.
  • Nobody drew the field. Training shaped it. The arrows in the drawing are invented to show the idea.

One full step

Getting from one position to the next is the expensive part. The state has to climb through every layer of the model, and every layer has to fetch its weights from memory. That climb is the subject of the next two plays.

One step of a language model
the text so far, cut into tokensThecatsatonthelayer 1layer 2…layer 93every layer nudgesthe state a littleodds for the next tokenmat52%floor14%rug9%sofa6%and 164,000 other tokenspick one, append it, go againmat
Each trip up the stack produces exactly one token. A 500-token answer is 500 trips.