GPU acceleration can speed up generative Transformer inference, but performance depends on more than raw compute. Assess compute throughput, memory capacity, and memory bandwidth to identify the hardware constraint. section 4.3.1
The ops/byte ratio describes a device’s compute capacity relative to memory bandwidth. Compare a model’s arithmetic intensity—operations per byte accessed—with that ratio: a lower value indicates a memory-bound workload, while a higher value indicates a compute-bound one. section 4.3.1
Assessing a Tesla T4
A T4 provides 65 TFLOPS, 16 GB of memory, and 300 GB/sec of bandwidth, yielding 216.6 ops/byte. GPT-Neo in half precision requires 12.96 GB; an attention calculation gives 30.29 ops/byte. section 4.3.1
total_memory_movement = 71303168 total_compute = 2160066560 arithmetic_intensity = 30.29 ops/byte
See the attention arithmetic-intensity calculation. section 4.3.1
