Three Precisions, One Deadline

Deep Learning in the Real WorldMedium+20 XP+20

Three Precisions, One Deadline

A 14-billion-parameter chat model is served from a single GPU. The card has:

propertyvalue
memory bandwidth800800800 GB per second (1 GB =109= 10^9=109 bytes)
arithmetic speed200×1012200 \times 10^{12}200×1012 operations per second
memory sizeenough to hold any of the versions below

Generating each new token of a reply takes two jobs:

  1. Read every weight from memory once.
  2. Do the arithmetic: about 222 operations per parameter, whatever the precision.

The two jobs overlap, so one token takes as long as the slower of the two.

The team has three versions of the weights: 32-bit, 8-bit and 4-bit. The product requirement is that a 240-token reply finishes within 5 seconds. Every bit dropped risks a little accuracy, so they will ship the version with the most bits per weight that still meets the requirement.

How long, in seconds, does a 240-token reply take with the version they ship? Round to 2 decimal places.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.