AI & ML

How LLMs Work

A clear map of how large language models turn a prompt into an answer — and the models and hardware behind them.

Free to start · Fully editable · Export GIF, MP4, PNG & SVG

What's in this template

7 connected components you can rename, recolor, and extend with AI.

OpenAI GPTAnthropic ClaudeGoogle GeminiMeta LlamaHugging FaceNVIDIA GPUsPyTorch

This diagram explains how a large language model (LLM) actually works. A prompt is broken into tokens, turned into embeddings, and passed through a stack of transformer layers whose attention mechanism weighs every token against every other one. The model then samples the next token, again and again, to generate a response. Around that core sit the real players that make it possible: foundation models from OpenAI, Anthropic and Google, open models from Meta and Hugging Face, and the NVIDIA GPUs and PyTorch frameworks used to train and serve them.

Use it to teach how generative AI works, to brief a non-technical team before an AI project, or as the opening slide of an LLM talk. Every node is editable, so you can swap in the exact models and tooling your stack uses.

Great for

  • Explaining generative AI to a non-technical team
  • Opening slide for an LLM or AI talk
  • Onboarding docs for an AI product team
  • Course or tutorial on how LLMs work
  • Internal AI strategy briefings

Make your own version with AI

Prefer to start from your own content? Describe it in one sentence and Infogiph generates a how llms work you can edit and animate. For example:

“How LLMs Work showing OpenAI GPT, Anthropic Claude, Google Gemini, Meta Llama, Hugging Face and NVIDIA GPUs”

Try it in the AI diagram generator, or read How to turn text into an infographic.

How to customize this template

  1. Open it in the canvas with Use this template.
  2. Split RAG into two paths: ingestion (chunk, embed, index) runs ahead of time, while retrieval runs on every query. Label which is which.
  3. Name the real components, such as the chat model, embedding model and vector database, and swap icons for their logos so the diagram matches your stack.
  4. Add the nodes that show control: evaluation, guardrails, human review and logging. That is where reviewers look for risk.
  5. For agent loops, try the Cycle style so plan, act and observe read as a loop rather than a list.
  6. Export a PNG or SVG for docs and slides, or a GIF or MP4 to keep the animation.

Frequently asked questions

How does a large language model work?+

An LLM splits your prompt into tokens, converts them to embeddings, and runs them through many transformer layers that use attention to relate every token to every other. It then predicts the next token over and over to produce an answer.

What is the transformer in an LLM?+

The transformer is the neural-network architecture behind modern LLMs. Its self-attention mechanism lets the model weigh the relevance of all tokens at once, which is what makes long-range understanding and fluent generation possible.

Which companies build the major LLMs?+

OpenAI (GPT), Anthropic (Claude) and Google (Gemini) build leading closed models, while Meta (Llama) and the Hugging Face community lead open models. They are trained and served largely on NVIDIA GPUs using frameworks like PyTorch.

Can I customise this LLM diagram?+

Yes. Rename any node, swap in the exact models or hardware your team uses, change the animation style, and export to PNG, SVG, GIF or MP4.

Related templates

View all AI & ML →

Make it yours in seconds

Open the how llms work in the Infogiph canvas, then edit, animate, and export.

Use this template