Bitpath

Boss lesson · Unit 01

Will it fit?

Size a model, its caches and its users against a memory budget

13 exercisesabout 3 min

What you practise

  • Weights as parameters × bytes, plus the KV cache for a context length and a batch
  • Size a model against a memory budget and say what to cut first

Try a question from this lesson

Pick one

A 14 GB model runs fine for one short chat on a 24 GB device, then dies with "out of memory" when 30 users hold long chats. What filled the memory?

The idea

Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.

Concept

The memory bill

Three things share the memory of the device.

Weights are a fixed cost, paid once and shared by every request. The KV cache grows with every token of every conversation in flight. Working memory for the pass itself is small by comparison but never zero: leave a margin.

weights   params x bytes      fixed
KV cache  per token in flight grows
working   one pass at a time  small

11 more exercises in the app

  • 5× type the answer
  • 1× fill the blanks
  • 2× multiple choice
  • 1× true or false
  • 1× order the lines
  • 1× match the pairs

Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.

One email when Bitpath is ready to try. Nothing else. Privacy