What is a Large Language Model (LLM)?
Inside an LLM — tokenization, embeddings, transformer.

A Large Language Model (LLM) is an AI model trained on trillions of words to understand and generate human-like language. Inside, your prompt is turned into tokens, then numbers (embeddings), processed by a transformer, and turned back into a coherent answer.
In simple terms
You give a prompt; the model tokenizes it, processes it through a transformer, and predicts the next tokens.
How it works
- 1Input: you give the model a prompt or question.
- 2Tokenization: the text is broken into smaller pieces called tokens.
- 3Embedding: tokens are converted into numbers the model can understand.
- 4Transformer: the model analyses patterns and relationships across all tokens.
- 5Output generation: it predicts the next tokens, one by one.
- 6Response: you get a coherent, context-aware answer.
Key points
- Understand: it grasps meaning, context, instructions and intent.
- Generate: it writes, answers, summarises and explains.
- Reason: it can solve problems and reason step by step.
- Generalise: it applies knowledge to new topics it hasn't seen before.
Why it matters
LLMs are the foundation of modern AI applications — chatbots, copilots, search, coding assistants and research tools. Knowing the internal pipeline helps you prompt them better and understand their limits.
Frequently asked questions
- What is a token?
- A subword unit of text. Models read and generate tokens, and both cost and context limits are measured in tokens.
- What are examples of LLMs?
- GPT-4o, Claude, Gemini and Llama are all large language models.
More in Language Models
Large Language Model (LLM) — The Basics
Massive data → training → understanding → generation.
GPT (Generative Pre-trained Transformer)
How GPT predicts text, one token at a time.
GPT-4
OpenAI's multimodal model — text and images.
ChatGPT
From your question to the answer, step by step.
Claude
Anthropic's helpful, harmless and honest AI assistant.
PaLM / Bard
Google's conversational AI powered by PaLM.