Understanding LLMs: architecture and how they work

// language models

A LLM (Large Language Model) is a neural network trained on enormous textual corpora. It does not “understand” in the human sense: it predicts the next token with a learned probability.

LLM diagram

The pipeline

  1. Prompt — input text.
  2. Tokenization — split into units.
  3. Layers — attention-based transformers.
  4. Logits — scores for the next token.

The diagram illustrates this left-to-right flow, then the output loop. Open-weights models (Llama, Mistral, Qwen) enable local deployment with no cloud dependency — an asset for privacy.

Understanding this mechanism avoids illusions: the model hallucinates when probability dictates it.

Leave a Comment