Module 7 · Running it: memory, speed and money

Splitting a model across GPUs

In this lesson

  • 8 min read
  • 9 reading sections
  • Knowledge check
  • Lesson 6 of 10 in this chapter

This chapter’s goalPredict the tokens-per-second a given model will produce on a given machine from memory bandwidth alone, say whether a model and context will fit in a stated amount of memory, choose a quantisation level and defend it with a measurement, estimate the cost of a token from a GPU’s hourly price, and explain the trade an alternative architecture is making.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 10Free · no account needed
Lesson steps

When one card is not enough

A 70-billion-parameter model in bf16 is 140 gigabytes. A 405-billion model is 810. The large sparse models exceed a single card even at four bits. At some size the question stops being “which card” and becomes “how do I cut the model up”, and there are three answers, distinguished by what has to travel between the cards.

Pipeline parallelism: split by layer

Put layers one to forty on the first GPU and forty-one to eighty on the second. For each token, the first card runs its half and passes the residual-stream vector (a few kilobytes) to the second, which finishes. Almost nothing crosses the wire, so this works over any connection, including the slow PCIe bus between consumer cards, and it is what llama.cpp does by default when it sees more than one GPU.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the AI, Actually Explained exam.

Stuck on something?Ask Anjali, your AI tutor

How to cite: Addaly (2026) ‘Splitting a model across GPUs’, in How a Language Model Actually Works. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/how-llms-work/splitting-a-model-across-gpus (Accessed: 29 November 2026).