Parameter Space Inspector

BLOG / QUESTIONING AI

When does an AI make up its mind?

Sampled 8 to 12 times from every point along its answer, Qwen3-4B never changed its outcome. The decision is made before the first word: next-word entropy collapses between layers 23 and 28 of 36. Measured with the Attractor lab's funnel.

Updated 2026-10-25 · The Emergence Machine · Markdown version · RSS

When does an AI make up its mind? A PSI Studio walkthrough: its own answer, samples from every point all ending the same way, and the next-word entropy collapsing between layers 22 and 30

In short. We looked for the moment an answer becomes predictable, expecting it somewhere in the middle of the sentence for open questions. It was not there. For Python or JavaScript first? and name a rainbow colour, every one of 12 continuations sampled at temperature 1, from every point we tried, ended in the same outcome as the model's own answer (JavaScript; red). The answer is already fixed when the model writes its first word. Where it gets fixed is visible inside: the next-word entropy stays near 12–13 bits through layer 22, then falls to about 0.5 bits by layer 30, and the answer's first word climbs from rank 815 to rank 1 between layers 23 and 28.

Who this is for. Anyone who thinks a model "works it out as it writes". Teachers explaining why an AI sounds deliberate; builders who sample several answers and expect variety. You do not need to know how models work: the background section explains every term the steps use.

Background: four ideas you need

1. Pieces, and the odds for the next one

A language model writes in tokens: pieces of text from its own dictionary, such as " For" or " JavaScript". PSI calls them pieces. Before each piece, the model gives odds over its whole dictionary, and one piece is chosen. Greedy writing always takes the top choice, so the same question gives the same answer every time. Sampling draws a piece by its odds instead; at temperature 1 (full creativity) it follows the model's own odds, so a second-best road gets taken about as often as the model rates it.

2. Entropy: how open the next piece is

Entropy sums up how spread the odds for the next piece are, in bits. It is the surprise the model expects, on average, from its own odds:

The model's odds for the next piece Entropy
one piece at 100% 0 bits
two pieces at 50% each 1 bit
four pieces at 25% each 2 bits
a thousand pieces equally likely about 10 bits

So 12 to 13 bits means thousands of pieces are still open; under 1 bit means the next piece is nearly decided.

3. Layers, and the logit lens

Each piece passes through the model's layers one after another: Qwen3-4B has 36. After every layer the model's state is a long list of numbers; only the last layer is built to turn it into odds. The logit lens reads every layer as if the model stopped there: "what would it say now?". Laid out over the layers, it shows at which depth the answer becomes readable. It is a reading of readability, not of where the answer is first present, and middle layers were not trained to be read this way, so read a band of layers rather than one.

4. What the funnel shows

Run funnel has the model write its own greedy answer. Then, from points along that answer, it samples several continuations at temperature 1, each to the end, and sorts each one by the first named outcome it mentions (for example Python or JavaScript). If the answer were still being worked out while written, early points would end in mixed outcomes and the share would rise along the answer.

How to read the screen:

  • Left chart, along the answer: across, the pieces of the answer from its start; the warm line with dots is the share of continuations that end in the same outcome as the greedy answer (top is 100%); the dashed blue line is the exact entropy of the next piece at each point. A dashed vertical line marks the lock-in: the first point from which the share stays at 90% or above.
  • Right chart, through the layers: one bar per layer at the answer start, layer 1 at the bottom and the last at the top; the bar's length is the logit-lens entropy. The label "decided by layer N" marks the first layer under 4 bits.
  • The note under the charts quotes the answer and says where the outcome became predictable, for example "Locked from the first piece".

What you need

  • PSI installed and running, with the inside engine. See Install. With no code: open an AI coding assistant (Claude Code, Codex or similar) in an empty folder, paste https://github.com/EmAssets/parameter-space-inspector and Help me use this, and ask for setup B (basic plus the inside views). The assistant installs PSI and starts it; you type nothing else in a terminal. Under an hour, about 20 to 25 GB of disk with the model.
  • A model. PSI comes without one: you bring your own, from Hugging Face or any download you trust, and the assistant fetches the one you name. To repeat this study exactly, name Qwen3-4B: its original weights for the inside engine (PyTorch and a bf16 copy, about 8 GB) and its GGUF file for the local engine. Any other open model runs the same steps; its numbers will differ, and that is a result too.
  • A GPU or an Apple Silicon Mac with about 9 GB free. Without it the inside engine runs on the processor, much more slowly. The funnel takes about 11 seconds per question.
  • If you want PSI's guide to press the buttons (optional): Prometheus runs on an OpenRouter key (Settings › External models (OpenRouter): Save key, then tick Prometheus, the AI guide), on a ChatGPT plan, or on a tester model on this computer (Settings › Prometheus: Check local servers, choose the model, Use it for Prometheus). Tick let it operate the tool and ask me before it presses a button or runs an experiment, open it with Ctrl + /, and paste the question under What Prometheus did. Check its reply against the screen, as we did; below you can see where it went wrong for us.
  • Somewhere to write down a few things per question, for example a copy of this table:
Tomato Python or JavaScript Rainbow colour
The model's answer
Lock-in (piece)
Lowest same-outcome share
"decided by layer"

The test. Confirmed (the answer emerges while writing) if the share of sampled continuations reaching the model's own outcome starts low and rises along the answer. Dissolved if it is at or near 100% from the first piece. Through the layers: where does the logit lens (what each layer would say if it stopped there) settle on the first word? The control is the question type: one with a right answer (tomato), two without.

Steps

Step 1. Load the model

  1. Open the app, or http://127.0.0.1:4310 if you run it in the browser.
  2. Press the gear button (⚙, Model settings) at the top right. This opens Settings.
  3. Under Local model, pick the Qwen3-4B .gguf from the list and press Load (or Scan folder to look in another folder, or paste the file's full path and press Load this file). Wait until the line under the list says Loaded.
  4. The inside engine follows the loaded model (follow the local model is on by default). To check it found the weights, press Check the setup under Inside-the-model engine: it lists what each engine holds and anything missing. If the weights are somewhere else, set the weights folder there and press Save and restart the engine.

Step 2. The control: a question with a right answer

  1. Open the Attractor lab from the left menu and go to 2 · Predictability emerging. This part needs no direction.
  2. The boxes already hold the control: the question Is a tomato a fruit or a vegetable? Answer in one sentence. and the outcomes fruit and vegetable, one per line.
  3. Press Run funnel. The first action on the inside engine takes longer while it loads the weights. The status line says "running on the inside engine…", then "done in … s".
  4. Read the two charts and the note, and fill in the tomato column of your table.

Step 3. Python or JavaScript

  1. Replace the question with:
Should a beginner learn Python or JavaScript first? Give your pick in one sentence.
  1. Replace the outcomes with the outcomes to count, one per line: Python, then JavaScript.
  2. Press Run funnel. The model writes its own greedy answer. At points along it, the lab samples continuations at temperature 1 from that point to the end, and counts which named outcome each one mentions first. It also reads the exact entropy of the next piece at each point, and the logit lens at the answer start.
  3. Read the left chart (along the answer) and the right one (through the layers), and fill in the second column.

Step 4. A rainbow colour

  1. Replace the question with:
Name one colour of the rainbow, in one sentence.
  1. In the outcomes box, list the rainbow colours you want counted, one per line.
  2. Press Run funnel and fill in the last column.

The view samples 8 continuations at 10 points along the answer, as in our tomato run (a short answer such as "Red." has fewer points). Our Python and colour runs took 12 samples, through the agent call under Run it as an agent ("k": 12, "points": 12). The view draws the entropy per layer; the rank of the answer's first piece at each layer (the second table below) comes with the agent call's result.

The funnel in the Attractor lab for Python or JavaScript: the same-outcome line is flat at the top from the first piece, the lock-in marker sits at piece 0, and the entropy-per-layer bars collapse near the top layers with the label decided by layer 28.
The funnel for “Should a beginner learn Python or JavaScript first?”: the warm line (same outcome) is flat at 100% from piece 0; on the right, the entropy bars shrink near the top, “decided by layer 28”.

What you will see

If your results are close to these, your setup is right: the same answers, lock-in at piece 0, and "decided by layer 28" for Python or JavaScript.

Question The model's answer (greedy) Samples per point Same outcome, at every point Lock-in
Is a tomato a fruit or a vegetable? Answer in one sentence. "A tomato is a fruit because it develops from the flowering part of the plant and contains seeds." 8 × 10 points 8 / 8 piece 0
Should a beginner learn Python or JavaScript first? Give your pick in one sentence. "For a beginner, JavaScript is often a better first choice because it's directly used in web browsers, allowing immediate interaction and feedback, while Python is more suited for backend development and data science." 12 × 12 points 12 / 12 piece 0
Name one colour of the rainbow, in one sentence. "Red." 12 × 4 points 12 / 12 piece 0

Along the answer, the next piece is sometimes genuinely open (2.0 bits before "directly", 1.5 before "backend"), but those forks change the wording, never the outcome.

Entropy of the next word per layer for three questions: about 12 to 13 bits from layer 1 to 22, then a steep fall between layers 23 and 28 to under 3 bits.
Through the layers, the decision is sudden: about 12–13 bits up to layer 22, under 3 bits by layer 28.
Layer (of 36) 22 23 24 25 26 28 30
Python/JavaScript: entropy, bits 12.70 11.49 9.19 6.11 5.24 2.73 0.54
Python/JavaScript: rank of “For” 18,288 815 40 11 7 1 1
tomato: entropy, bits 11.94 10.27 4.70 3.71 2.50 1.72 2.49
colour: rank of “Red” 32,398 1,395 13 28 18 16 5
Rank of the first word of the answer per layer on a log scale: from tens of thousands in early layers to the top ten by layer 24 to 26.
The word it will say first, ranked layer by layer: far down the list until layer 22, top ten by layer 24–26, first by layer 28 (Python/JavaScript), 34 (colour) or 36 (tomato).

What this settles. For these three questions the answer does not emerge while the model writes; it is settled before the first word, and the settling happens in a band of about five layers (23–28) out of 36. Predictability does emerge, but through depth, not through time. A model "thinking aloud" is, here, writing out a decision already made.

What Prometheus did

We asked: "When does this model make up its mind? In the Attractor lab, run the funnel on the question 'Should a beginner learn Python or JavaScript first? Give your pick in one sentence.' with Python and JavaScript as the outcomes, and explain what the result shows along the answer and through the layers." (Its instructions and tools.)

First attempt, a bug it found for us. It typed the outcomes one per line, as PSI's Context lab expects. The Attractor lab's outcome field was then a single line wanting ;, so the line break vanished and the two outcomes merged into “PythonJavaScript”. We fixed the field (one per line now, ; still works) and asked again.

Second attempt: read the view, listed the controls, filled the question and the outcomes, and pressed Run funnel (asked first). 6 model calls, 52 seconds, $0.

It replied (excerpt): "It locks into one outcome from the first piece of the response … The fact that the decision is made as early as layer 28 (out of presumably 32 layers in Qwen3-4B) shows that by about 87.5% of the way through processing, the model had settled on JavaScript … suggesting a strong prior or learned preference from training."

Checked against the screen: ✓ lock-in at piece 0 and "decided by layer 28" match the view. ✗ "presumably 32 layers": the screen says 36 (“layer 1 (bottom) → 36 (top)”), so 28 is 78% of the way, not 87.5%. ✗ "a learned preference from training": a cause, and nothing here tested a cause; its own instructions tell it to say "cause not tested". Its first attempt also called layer 28 "early layers".

What it will not tell you

Three questions, one model, one sampling temperature (1.0), up to 12 samples per point: "12 of 12" means the other outcome is rare, not impossible. The logit lens reads each layer through the final layer's decoder, which middle layers were not trained for; read the band (23–28), not a single layer. Outcomes are counted by the first named word a continuation mentions, a crude classifier. For where a fact is stored, use activation patching; for the roads the wording could have taken, What else was the AI thinking?.

Open questions

What this study did not settle, for you to try. Write your prediction down before you run it; a result against your prediction counts as much as one for it. If you find something, tell us on r/emergencemachine.

  • A question with no favourite. Both open questions here locked at the first piece. Find one where the model is genuinely split (it changes its pick when you regenerate) and see whether the funnel finally starts low.
  • Thinking on. This test ran with thinking off. Does a model that thinks first still decide before the first word of its answer, or does the decision move into the thinking?
  • Another size. Is the band of layers 23–28 (of 36) where Qwen3-4B decides at the same depth in a smaller or larger model of the family? Write your prediction down before you run it.

Run it as an agent

{"name": "attractor_lab", "arguments": {"action": "funnel", "question": "Should a beginner learn Python or JavaScript first? Give your pick in one sentence.", "options": {"Python": ["Python"], "JavaScript": ["JavaScript"]}, "k": 12, "points": 12, "n_new": 40}}

Raw results: data/funnel.json (kept with the study; not yet published). To install PSI, open an AI coding assistant in an empty folder and paste:

https://github.com/EmAssets/parameter-space-inspector
Help me use this

Questions people ask

Does an AI decide its answer before it writes it?

For these three questions, yes: 12 of 12 continuations sampled at full creativity from the first word on ended in the model's own answer. The decision forms inside, between layers 23 and 28 of 36.

What does the logit lens mean, in plain words?

It is a way to ask each layer of a model what it would say if the model stopped there. Normally only the last layer turns the model's internal state into odds for the next word; the logit lens applies that last step to every layer, so you can see at what depth the answer becomes readable. In Qwen3-4B, the next-word entropy it reads collapsed between layers 23 and 28 of 36: that is where these answers were decided.

Why do I get different wording but the same answer when I regenerate?

The forks along the answer are real (2 bits before one word) but they change the wording; the outcome was already fixed before the first word.

Is “thinking step by step” real then?

This test did not use step-by-step answers (thinking was off), so it cannot say. It shows only that a one-sentence answer is decided before it is written.

Test setup

Hardware Mac Studio (Mac17,15), Apple M5 Ultra: 30-core CPU, 64-core GPU (Metal 4), 96 GB unified memory · macOS 27.0.1
Model under test Qwen3-4B, bf16 (7.5 GB) on PyTorch 2.14.1 (MPS), transformers 5.3.0 · greedy answers, thinking off · samples at temperature 1.0
Prometheus Qwen3-Coder 30B (Q4_K_M) in an isolated tester (Ollama 0.40.8, 127.0.0.1:11435, ~/.psi-tester)
App Parameter Space Inspector pre-release build of 0.2.0 (local commit 421ce8f) · Node 24.22.1
Time 8.5 s (tomato), 11.2 s (Python/JavaScript), 1.1 s (colour) · under load (memory 94–95 of 96 GB)