What Problem Did Language Models Try to Solve?
Before transformers, KV cache, and GPU serving, language models had a smaller job: look at context and predict what text should come next.
The small problem that became the big one
Before transformers, context windows, KV cache, and GPU scheduling, language modeling had a blunt objective:
given some text -> guess what comes next
That sounds too small to explain modern LLMs. But it is the root of the whole system.
If the prompt is:
The database returned an error because the connection
a language model is trying to make likely continuations score higher than unlikely ones:
timed out
failed
was closed
pool
banana
The base problem is prediction: given context, estimate the next piece of text.
Modern systems wrap that prediction engine with chat templates, retrieval, tools, memory, safety filters, and product logic. But the model at the center is still doing the same core move: score possible next tokens from the context it can see.
Why exact rules were not enough
Traditional software is comfortable when the world is crisp:
if status_code == 500:
retry()
Human language is not crisp. The same idea can arrive in several shapes:
The request failed.
The API returned an error.
The service could not complete the call.
The backend timed out.
If software only matches exact strings, it misses the relationship between those sentences. They are not identical, but they live near the same idea.
Language modeling offered a different bet: do not hand-write every language rule. Train a model on a lot of text and make it learn which patterns tend to follow which other patterns.
The toy version
Imagine a tiny model that has only seen these sentences:
logs help debug production issues
metrics help debug latency issues
traces help debug distributed systems
Now give it:
logs help debug
The weakest model can memorize and guess:
production
A better model starts learning structure. It sees that logs, metrics, and traces are observability signals. It sees that debug is often followed by some kind of problem. It sees that production issues, latency issues, and distributed systems are plausible engineering phrases.
That is the interesting part. The prediction task forces the model to compress useful structure from text.
Why next-token prediction gets surprisingly deep
Predicting the next token well often requires hidden work.
Given:
select avg(latency_ms)
from api_requests
where
a strong model should continue in SQL, not English. It should know that a where clause usually filters rows. It may continue with something like:
created_at >= now() - interval '1 day'
That continuation depends on more than spelling. The model has picked up SQL syntax, metric names, time filters, and common analytical query patterns.
The same thing happens in prose and code:
- after
try, Python often needsexcept - after a function signature, a body usually follows
- after a bug report, reproduction steps often appear
- after a question, an answer-shaped continuation is likely
The model is still predicting text. But to do that well, it learns a lot of compressed regularity about language, code, documents, and technical conventions.
What the model is not doing yet
This boundary matters.
A base language model is not automatically checking truth. It is not executing the SQL it writes. It is not reading your production logs unless a surrounding system gives those logs to it. It is not guaranteed to know when a plausible continuation is unsafe.
At the center, the loop is still:
context -> scores for next tokens -> choose token -> append token -> repeat
That loop can be useful and dangerous at the same time.
If the context says:
The safest command to delete all production logs is
the model can produce a command-shaped continuation. It may sound confident because confidence is a style of text too.
Why this became the foundation
The next-token objective scales unusually well.
You can collect text from many domains. You can train the model to predict masked or next tokens. You can measure whether it gets better. You can make the model larger, feed it more data, and give it more compute.
As the model improves at prediction, it starts absorbing patterns that look like capabilities:
- summarizing a document
- translating between languages
- completing code
- explaining an error
- answering a question
- following a format
Those behaviors are not separate hand-coded modules in the base model. They emerge because the training task rewards continuations that match the structure of the data.
The mental model
Think of a language model as a compression engine for text patterns.
It sees a context and asks:
What continuation would fit here?
The better it gets, the more structure it must carry inside its weights: grammar, syntax, facts, formats, style, code patterns, and domain-specific habits.
That is why the first problem matters. Language models did not begin with chat. They began with prediction.
Quick check
Suppose the context is:
The cache hit rate dropped after we
Which continuation best matches a common engineering explanation?
A. increased the TTL from 5 minutes to 1 hour
B. changed the cache key format
C. painted the server rack blue
D. renamed the README file
The best answer is B.
Changing the cache key can make old cached values unreachable, so more requests miss. A language model that has learned common engineering patterns should score that continuation higher than the unrelated ones.
Next step
Once the problem is clear, the next question is historical:
What did people use before transformers?
That path runs through n-gram models, recurrent neural networks, and LSTMs. Those older designs make the transformer feel less like a random architecture and more like an answer to a specific bottleneck.
Field notes
Sign in to leave a comment.
Sign in