Tinker Many chips, one model

by Samy (Kondasamy Jayaraman)

ZeRO none: 1.21 TB on each 80 GB chip.

Chapter 3 of 7

Split the copies’ memory

Eight copies each hold the whole training state. Most of it is the same on every chip.

This chapter: Can copies share out their memory instead of repeating it?

About this chapter

You will learn

  • What each ZeRO stage shares out
  • What that saves on each chip
  • What it costs in sending

Words you’ll meet

Sharding
Cutting something into pieces so each chip keeps one piece, not the whole.
ZeRO
A way to shard training state over data-parallel copies, in three stages.
Activations
What each layer works out on the way forward, kept for the way back.

Step 1 of 4

8 copies each keep everything: 1.21 TB a chip. stops the repeats by them across the copies.

Predict first.

Stage 1 shards only the optimiser state over the 8 copies. How much does each chip save?