Introduction
As of now (late 2026) LLM (large language model) technology providers, users, and work products flood the public commons. It therefore makes sense to have even a primitive mechanistic mental model of these technologies. You are forced to have an opinion. Without a mechanism or model one tends to fall into disempowering anthropomorphic language. Some clear thoughts on this can be found here and here.
In this note I would like to try and outline a (very) simplified mental model of LLM mechanics and mechanisms. By “mental model” I mean a cartoon to work through in your mind, not a model of the LLMs as having their own mind. I won’t be teaching the history of LLMs, how to build them, how to use them, or their moral or philosophic implications. I will only try to give a very rough outline how the current (2026) LLMs work.
The mental model I would like to bring you to is:
- LLMs are implemented as a flow of numeric signals from a limited number of “attention heads” to output text.
- LLMs are used to realize text transformation and text construction/fabrication. In particular they are approximate plausible “un-censoring” or “un-deletion” functions.
This note will try to make the above two points concrete and clear. After that I will use the model to drive some discussion/speculation.
Here is an example to explain the type of analogy I am hoping to deliver. A common useful mental model for an internal combustion engine car is: it combines air and fuel to produce motive torque, waste heat, and potentially toxic exhaust. This isn’t enough to build a car, but is enough to tell you not to idle one in an enclosed space.
Caveat
I am assuming the current private frontier LLMs are architecturally similar to GPT-4 (2023), but larger and with improvements. So this note is valid for at most such models.
LLM Implementation
Current LLMs take their form from many engineering decisions, three of the most important (in my opinion) being:
- Large scale use of artificial “neural networks” (also called deep learning architecture or connectionist architecture). I am going to take the Bender/Inie advice and try to use the non-standard, but much less loaded, term “weighted network.”
- Clever use of a “un-censor the missing word” training procedures (which led to useful tools such as embeddings).
- Use of bookmark like structures called “attention.” The primitive components of a weighted network do not actually pay “attention” to anything. Instead they imply weights and selective routing of intermediate values. To not lose this distinction, I will use the term “attention heads” instead of “attention.”
We will describe each of these in turn.
Weighted networks
LLMs are implemented in terms of weighted networks. A weighted network is a representation of nested mathematical expressions or formulae, and not a faithful representation of biology. The earliest weighted networks took a number of input signals (say numbers, or voltages) and combined them into one or more output signals. We can imaging the mechanism as in the following diagram.

In this diagram each of the first three volt-meters (v1, v2, v3) represents input signal values, say the length, width, and height of a box. The three knobs (w1, w2, w3; called “weights” or “parameters”) represent how much of each input signal is passed along the arrows to the next node. The complicated vacuum tube amplifier represents a small function of the inputs: in this case 1/(1 + exp(w1 v1 + w2 v2 + w3 v3)). This weighted network converts 3 input values into one output value (itself represented by the last output meter). These nets are not usually realized using electrical components, but as software specifying calculations in GPUs, TPUs, or NPUs.
The knob settings are called the parameters or weights. The knob-settings are picked in a processed called “training” where we adjust the knobs until the weighted network’s outputs are very close to specified results for a great number of training examples. A training example is a pair of an input example (in this case 3 numbers) and the desired output (in this case one number). Even for very restricted topologies, training can be difficult. For the right choice of the weights (knob settings) this circuit may imitate enough of the example input/output pairs to approximate a useful function. However, researchers have been able to implement and train variations of these networks since the 1950s (ref). It is rumored to have cost around $100 million to train GPT-4 (ref). Current LLMs are much larger and more expensive than that.
The choice of the layout of the circuit is called the “topology” of the weighted network. Our small net’s topology has a feature typical to weighted networks: we can sort the nodes into layers and each layer only connects to later layers (never back or laterally). Our example weighted network consists of one node in one layer with 3 knobs or weights. GPT-4 (the state of the art back in 2023) was thought to have millions of input nodes, possibly billions of intermediate nodes, tens of thousands of output nodes, and about 1.8 trillion weights (knobs or parameters) arranged in possibly 120 layers (ref).
Some things to notice is: even a large weighted network is much weaker than a cheap computer.
- It has no scratch-pad or short-term memory. When we change its inputs, its output changes independent of where the inputs used to be. Patterns from the training data determine the weights (or knob-settings), but once training is over the knobs are not moved again.
- No outputs are routed back to earlier portions of the network. This means the calculation can not repeat or iterate steps.
One could implement variations that don’t have the above shortcomings (such as recurrent weighted networks, or trying online reinforcement learning ideas). However current LLMs are thought not to depend heavily on such techniques, as they make training much more expensive for little realized benefit. If a weighted network were modeling biology it would have to have features like the above (as biological neurons are not strictly in layers, and do seem to carry mutable state), but the current known engineering trade-offs are against such features so they tend not to be used.
Clever un-censor training
One hot encoding- the un-clever step
LLMs are demonstrated processing text, not values or numbers as our earlier weighted network did. Researchers adapt weighted networks to text with a very brutal idea called “one hot encoding.” Let’s approach this using an example.
Suppose we with to build a weighted network that works over 9 word utterances from a dictionary of 14 words or tokens. One such utterance is “the quick brown fox jumped over the lazy dog.” To build our adapted net we would build a 9 row (one row for each word in our utterance) by 14 column (one column for each work in our dictionary) paddle-switch array that applies +10 volts where a switch is on and 0 volts where off such as the following.
|
a |
brown |
dog |
dug |
earnest |
fox |
jumped |
lazy |
over |
quick |
red |
slow |
the |
under |
|
| the | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| quick | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| brown | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| fox | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| jumped | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| over | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| the | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| lazy | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| dog | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The voltages from these switches feeds a larger weighted network with many knobs, nodes, and layers. Most of the above cells are switches in the down position. In each row the single switch in the up position is the word the row represents. The property of having one switch on in each row is where the name “one hot encoding” comes from. Current LLMs have an input switch array representing thousands of words over a dictionary of tens of thousands of tokens.
The above representation is a minimal idea that works. It is incredibly inefficient- taking tens of thousands of input switches (or voltages) to represent a single word. It is fairly rigid as the exact positions of the switches are used to encode the words, disallowing ideas such as using different sets of switches for different regions of the input document. And it understands nothing: two rows are either identical (have the same switch up) or disagree in exactly two columns (there is at this point no notion of similarity or synonyms).
Clever un-censorship
Now we are ready for the clever bit. I first saw this in an important research paper introducing a neat text embedding (defined later) called word2vec. The clever idea is the following.
Take our switch array and turn off all of the switches in one row. In this case we have suppressed the fourth row which used to encode “fox.” We wil treat the voltages implied by the new switch array as a single training input.
|
a |
brown |
dog |
dug |
earnest |
fox |
jumped |
lazy |
over |
quick |
red |
slow |
the |
under |
|
| the | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| quick | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| brown | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| ? | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| jumped | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| over | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| the | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| lazy | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| dog | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The weighted network will produce an output of meter readings as a function of the input (given above) and the positions of the weight/parameter knots. Here is one possible output.
|
a |
brown |
dog |
dug |
earnest |
fox |
jumped |
lazy |
over |
quick |
red |
slow |
the |
under |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
Now we construct a single row switch array encoding the missing word (in this case “fox”). Treat the voltages from this switch array as the desired training output.
|
a |
brown |
dog |
dug |
earnest |
fox |
jumped |
lazy |
over |
quick |
red |
slow |
the |
under |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
Training is just jittering the weight/parameter knobs a small bit so that the result meter needles for this input are closer to zero in the wrong words (down switch positions) and 10 volts in the target word (up switch position). The more serious term for this is stochastic gradient descent. What is amazing is small improvements can accumulate, instead of canceling each other out as we move from training example to example. The training procedure embodies the lesson of the LLM methodology: harvest an unreasonable number of small improvements to yield an approximation of a seemingly impossible desired outcome.
This one sentence could in fact give us 9 training examples- as we cycle through which word-position we wish to un-censor. We use these training examples and many others to train up a weighted network that simulates un-censoring a single word out of sentences! Obviously the simulation can’t be perfect (censorship loses information), but the weighted network settings route signal to plausible replacement word positions. Training is about appropriateness (using only sensible utterances as training data, so there are word relations to learn) and scale (having a lot of training data, for commercial LLMs: most of the web, must help/discussion forums, most social media, most books and periodicals, most technical and scientific papers).
After training is finished we use the weighted network as before on inputs. However we decode these outputs by picking a highest indicating meter as the plausible answer (in this case the 6th meter, which is +10v at “fox”) and get the following one-hot style result.
|
a |
brown |
dog |
dug |
earnest |
fox |
jumped |
lazy |
over |
quick |
red |
slow |
the |
under |
|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|
Note: the word2vec paper popularized an additional concept of a semantic embedding. One of the layers of the word2vec weighted network was restricted to be only 300 nodes, much smaller than the input or output layers. This “constriction” layer tends to result in trained networks where similar meaning words yield similar voltage patters at the intermediate layer (and different meaning words induce very different voltage patterns). This is in contrast to the original one-hot encoding where different words always disagree in exactly two positions (so there is no useful notion of similar or dissimilar). Embeddings went on to be a core idea and produce additional products such as semantic databases.
The clever training method has given us a new encoding of words- where words that can be used in similar places tend to get similar numeric representations. We are now ready for the last of the big ideas: attention heads.
Attention heads
In my opinion the final component that explains current LLM performance is “attention”, a term defined in the paper “Attention is All You Need.” Attention is a bit anthropomorphic, so I will call them attention heads; think of them as signal routers, position pointers, or text bookmarks.
Current LLMs treat all of your input instructions, the input text, and currently generated output text as encoded inputs as we described above. At first there is no output, so only the system prompts and user inputs are encoded. Then highest LLM-scored word is chosen as the next output word. This process is then repeated by the LLM operator to generate the output text one word at a time in order. By our analogy we are pretending there is a pre-existing plausible output but it has been censored or hidden and the LLM operator is un-censoring an approximation of the output one word at a time. This repetition isn’t part of the LLM, it is supplied by the operator serving the LLM results.
“Attention heads” are just bookmarks that point to positions in the input (and also partially generated output) and also to earlier sections of the weighted network. The positions of the heads are a function of the inputs, so they can appear to move between re-applications of the LLM. This allows effects such as generating words or tokens to complete a sentence (by having a head point into the uncompleted sentence until an ending token is generated), starting or stopping a paragraph, using the same name, and many other seemingly meaningful long-range text interactions. It even can allow semantic effects such as making a point only once, by not pointing the attention head at a given input question if there is what appears to be a related answer already in the partial output. This is likely why LLMs appear to follow instructions- they leave attention heads in the instruction region of the text input.
It is likely the amount of training material and training time is rises very fast in the number of attention heads (probably even exponentially fast). So attention heads are likely expensive even for the rich. I believe they will be a limiting feature of LLM output for a while.
Conclusions/Speculation
I hope you now can envision LLMs as transformations on text realized as a very brutal encoding of input and partial-output text into a flow of numeric signals. The LLM server iterates a “plausible next word” process to generate a sequence of output tokens, as the LLM itself doesn’t implement repetition or iteration. The bookmarks or attention heads help prevent this process from drifting too fast to text unrelated to the original inputs.
I believe features of LLM text (good, bad, and amazing) can be explained in terms of word clustering, approximate un-censorship, and bookmarks. That is we are not forced to explain observed texts in terms of goals, desire, intent, and memory.
LLMs are largely a triumph of scale (size of net, number of knobs/parameters, size and diversity of training data). The LLM weighted networks are of previously unimaginable size. The LLM training corpus can be effectively many times larger than the sum of all written text, as the un-censor training procedure can build many examples from a given text. And LLMs can show amazing results on tasks that don’t need too many attention heads such as specializing or translating a description of a mathematical or engineering technique from the LLM training data into a specific problem application at query time. However, current LLMs have poor performance on seemingly simple tasks that burn attention heads: such as my example of failing at uniquely sorting words.
Unless you are taking the trouble to run a local model, you never directly observe LLM behavior independent of the infrastructure and staff of the service provider. It is hard to tell what is LLM behavior, and what is cached-results or additional custom tools or services. For example LLMs themselves can’t repeat or iterate, however LLM service results are usually the result of iterating “generate next plausible word.” What one is seeing is the result of the LLM plus the service stack.
I’d invite you to try to apply the above (simplified, so not fully realistic) model of LLMs to try and think on a number of scenarios. What are your opinions on the likely outcomes and results of the following thought experiments>
- We take a known mathematical fact (say the Pythagorean theorem), and ask the LLM for a proof.
- We take a pre-existing published math paper, present the first half to the LLM and ask that it complete the paper.
- We take a pre-existing published empirical chemistry paper (concentrating on lab work and results), present the first half to the LLM and ask that it complete the paper.
- We take a new non-published empirical chemistry paper (concentrating on lab work and results), present the first half to the LLM and ask that it complete the paper.
Your answer to the last should vary depending if you treat the LLM as an approximate text processor, or as having a tiny chemist and lab trapped somewhere in its clockworks.
Appendices
GPT-4
GPT-4 is partially documented here. In particular (quotes from article):
- “Transformer-based model pre-trained to predict the next token in a document.”
- “GPT models are often trained in two stages. First, they are trained, using a large dataset of text from the Internet, to predict the next word. The models are then fine-tuned with additional data, using an algorithm called reinforcement learning from human feedback (RLHF), to produce outputs that are preferred by human labelers.”
Note we don’t comment on the full complexity of transformers, just the attention head feature.
On Hallucination
From the GPT-4 Technical Report.
GPT-4 has the tendency to “hallucinate,” i.e. “produce content that is nonsensical or untruthful in relation to certain sources.”
I think of this as anthropomorphizing, but the online dictionaries don’t seem to support me:
hallucinate (third-person singular simple present hallucinates, present participle hallucinating, simple past and past participle hallucinated)
- (ambitransitive) To seem to perceive things (with one or more of one’s senses) which are not really present; to have visions; to experience a hallucination.
Synonyms: imagine, see things- (artificial intelligence, of a model) To produce information that is not supported by the model’s training data.
Joking aside: for a non-technical audience “hallucinate” evokes perception and mental state, not a mismatch from training data. The LLM output was always a construct or fabrication, even when it matches the truth.
On Recursive Self-Improvement
Investors have been hoping for recursive self-improvement where it turns out one of the things LLMs are good at is suggesting game changing improvements to LLMs (and then trigger some sort of technological singularity). Things are in fact moving very fast in the LLM space. So there are some issues in working out if unfounded confident-sounding advice from an LLM is the best steering for a long and expensive training cycle. Optimizing in the presence of delayed feedback is notoriously treacherous.
Note on Experiments
Note both the word2vec and attention papers are very good experiments in that they deliberately use overly simplified complementary tools and procedures to show the claimed positive effects are from the claimed technology. So not only are the results reproducible, one can do better by swapping in better complementary tools (such as tokenizers, embedding choices, and so on).
Things LLMs should be bad at
Under our mental model LLMs should produce bad results when there is a dominant plausible wrong answer and when there are many relations between bits of the answer to maintain. The ideas being if no answer is plausible the LLM result will likely be equivocal and unconvincing. When there are a lot of relations to maintain in the answer (such as puzzle conditions) then attention heads are used up mapping marking relations between parts of the answer text, moving them off relations to the input text and so-called instructions and question. Another attack is to have an input text that superficially looks like a common puzzle, this way the LLM output tends to be aligned to the related answer.
Some failing examples include:
- Failing to uniquely sort words. This is exploiting the presumably limited number of attention heads.
- Failing on the “surprise the doctor is your Mother, not a man!” puzzle. This is the result essentially being a copy of the answer to a similar puzzle, not the one asked. Note the claimed “reasoning” is better described as “initial tokens.” Notice the so-called reason trace does start with text close to the question and with text at the correct answer, however it is full of weird non-sequitur stops and starts. It is text that plausibly looks like reasoning, probably not reasoning. The ideas of additional state heads and state-reprocessing are in fact good, they just do not necessarily work in the way the author or even I think.
- The “should I walk to the carwash” example. Trick questions often exploit missing context or corner-cases of reasoning. This is not in fact a trick question: for a human going to the car wash almost implies it is to get the car washed. Yes it could be to buy an air-freshener or pick up an already committed car, but those are the exceptional cases. That the LLM suggesting walking is evidence against it using non-textual semantics.
The question isn’t: can we make silly examples LLMs get wrong. It is: are the equivalents of these problems lurking in our important project we delegated to the LLMs?
Image credits
https://commons.wikimedia.org/wiki/File:Mcintosh_MC275_european_version.jpg#/media/File:Mcintosh-MC275-glow.jpg ,
https://hackaday.com/wp-content/uploads/2022/09/AMSAI.png , and the author.

















