mirai gadget labahmedabad

how i started understanding llms

How I Started Understanding LLMs

An AI model can produce a polished answer in seconds. But producing even one small part of that answer involves several layers of computation—tokenization, numerical representations, learned patterns, probabilities, and a lot of matrix multiplication.

I had been using AI for a while, but I could not have explained what was actually happening between a prompt and its response. I assumed the basic idea might be simple. After all, so many companies were building AI products. But man, I was wrong.

Using vs. understanding

When we started our company, we wanted it to be AI-first—not simply because AI was trending, but because we were genuinely interested in what it could make possible. We built AI-powered products that helped solve real business problems, and the experience changed how we approached software development.

After spending seven or eight years writing software in the traditional way, the difference was hard to miss. Development and iteration became faster. We could spend more energy deciding what to build and less time wrestling with every implementation detail. AI opened doors for us as builders.

Still, being able to build with AI is not the same as understanding how it works. I could use a model, write prompts, and integrate it into a product, yet I still could not clearly explain why it produced a particular answer.

The missing steps

One day, my co-founder shared 0xkato’s article, How LLMs Actually Work. Unlike many introductions I had encountered, it went beyond broad analogies and gave me enough context to follow more technical discussions.

It also made me notice a common problem with explanations: once we understand something, we forget which parts were difficult at the beginning. We unconsciously skip steps that now feel obvious to us. Those steps, however, may be exactly what a new learner needs.

Think about explaining mathematics to someone encountering it for the first time. You would not need to explain every number, but you also could not rush past addition and multiplication. The goal is to find the useful starting point: foundational enough to build real understanding, but not so basic that the explanation goes nowhere.

One token at a time

Here is one such starting point: an LLM does not read and write text exactly as we do. It first breaks text into smaller units called tokens. A token might be a complete word, part of a word, punctuation, or a chunk that includes whitespace, depending on the model’s tokenizer.

The model converts those tokens into numerical representations and processes the relationships between them. Based on patterns learned during training, it produces a probability distribution for what token could come next. It chooses a token, adds it to the sequence, and repeats the process. What looks like a flowing answer to us is generated one token at a time.

That description leaves out an enormous amount of detail—and that is precisely where this series begins.

What comes next

I am approaching this as a builder and active learner. I often need to revisit an idea a few times before it truly clicks, which also means I remember the questions and missing steps that made it confusing.

In the coming articles, I will build a practical mental model of LLMs from the ground up. We will explore transformers, tokens, embeddings, positional information, attention, training, and text generation in plain language, using examples before equations wherever possible. The series is for developers, founders, and curious AI users; no machine-learning background is required.

The goal is not to turn every reader into an AI researcher. It is to make the technology less mysterious and give you enough understanding to read, question, and use it more thoughtfully.

We will begin with the big picture: what a transformer is and how a prompt becomes an answer. From there, we will follow the journey step by step—starting with tokens, what they are, why models use them, and why one “word” to us may not be one token to an LLM.

This series was inspired by 0xkato’s How LLMs Actually Work. It follows some of the same conceptual path, but the explanations, examples, and interpretations are my own.