How AI frameworks run your code

Each explainer below traces one AI framework from the line of code you write to the chip that runs it. Pick a mode and a device, and the diagram shows which stages your code passes through. Every stage and every arrow quotes the official documentation or source code that supports it.

What Actually Happens When You Run JAX Code?

Trace JAX from Python to the device: op-by-op dispatch vs jax.jit, through jaxpr, StableHLO, the XLA compiler, LLVM or Triton, and the PJRT runtime, with sources.

  • Mode: Without jit, jax.jit
  • Device: CPU, NVIDIA GPU, TPU

15 stages, 19 steps, 49 quoted citations from 6 sources. Checked 2026-11-11.

How Does llama.cpp Run a Model on Your Hardware?

Follow a local LLM through llama.cpp: GGUF file, ggml compute graph, and the CPU, CUDA or Metal backend, with the language each kernel is written in and sources.

  • Backend: CPU, CUDA (NVIDIA), Metal (Apple)

13 stages, 12 steps, 40 quoted citations from 6 sources. Checked 2026-11-11.

What Actually Happens When You Run a PyTorch Model?

Trace a PyTorch model from Python to the hardware: eager mode vs torch.compile, CPU vs GPU, through ATen, TorchDynamo, TorchInductor, Triton, LLVM IR and PTX, with sources.

  • Mode: Eager, torch.compile
  • Device: CPU, NVIDIA GPU

16 stages, 19 steps, 48 quoted citations from 10 sources. Checked 2026-11-10.

Every path, side by side

The number of stages and steps on each selectable path, counted from the explainers' data files. The counts show how many documented layers a path passes through; they say nothing about speed. Each row opens that explainer on that path.

ExplainerSelectionStagesSteps
JAXWithout jit · CPU43
JAXWithout jit · NVIDIA GPU43
JAXWithout jit · TPU43
JAXjax.jit · CPU98
JAXjax.jit · NVIDIA GPU1213
JAXjax.jit · TPU98
llama.cppCPU65
llama.cppCUDA (NVIDIA)109
llama.cppMetal (Apple)98
PyTorchEager · CPU54
PyTorchEager · NVIDIA GPU54
PyTorchtorch.compile · CPU88
PyTorchtorch.compile · NVIDIA GPU1212

Tools the paths share

Stages that are also nodes in the Language Lineage atlas, so you can see what each tool is written in. CUDA appears in every explainer.

ToolJAXllama.cppPyTorch
CUDA✓✓✓
LLVM✓–✓
Python✓–✓
Triton✓–✓
C++––✓
ggml–✓–
llama.cpp–✓–
Machine Code––✓
PyTorch––✓

How these pages are built

Each explainer is one versioned JSON file (how-jax-runs.json, how-llama-cpp-runs.json, how-pytorch-runs.json) under the same CC BY 4.0 license as the dataset. They are kept apart from the language lineage graph on purpose: "lowers to" and "dispatches to" describe how code executes, not what a tool is written in. Closed systems are not guessed at; where the public documentation stops, the diagram stops too. Found a mistake? Open an issue with the better source.

Explore the full graph →