Let's dive into the numbers and compare the performance of NVIDIA A100 and GeForce RTX 4090 for LLM inference.
NVIDIA A100:
- Peak performance: 312 TFLOPS (FP16), 156 TFLOPS (FP32)
- Memory: 40 GB HBM2, 112 GB/s bandwidth
- Power consumption: 250W
NVIDIA GeForce RTX 4090:
- Peak performance: 82.6 TFLOPS (FP16), 16.3 TFLOPS (FP32)
- Memory: 24 GB GDDR6X, 768 GB/s bandwidth
- Power consumption: 450W
For LLM inference, we're primarily interested in the FP16 performance, as most models are trained and deployed using 16-bit floating-point numbers.
Assuming you want to achieve the same tokens/second on a cluster of RTX 4090s as on a single A100, let's estimate the required number of 4090s.
Tokens/second estimation:
A single A100 can process around 10-15 million tokens per second (depending on the model, batch size, and sequence length) for a 70B parameter model. Let's assume an average of 12.5 million tokens/second.
To match this performance with RTX 4090s, we need to calculate the required number of GPUs. Assuming each 4090 can process around 2-3 million tokens/second (depending on the model and configuration), we can estimate the required number of 4090s:
- Best-case scenario: 12.5 million tokens/second (A100) / 3 million tokens/second (4090) = 4.17x (round up to 5x)
- Worst-case scenario: 12.5 million tokens/second (A100) / 2 million tokens/second (4090) = 6.25x (round up to 7x)
So, to match the performance of a single A100, you would need around 5-7 RTX 4090s, depending on the specific model, batch size, and sequence length.
Is it possible to match A100 performance with 4090s?
While it's theoretically possible to match the performance of an A100 with a cluster of 4090s, there are some caveats:
- Communication overhead: As you add more GPUs, the communication overhead between them increases, which can negatively impact performance.
- Memory bandwidth: Although the 4090 has a higher memory bandwidth than the A100, the memory capacity is lower. This might lead to memory bottlenecks for very large models.
- Power consumption: A cluster of 4090s would consume significantly more power than a single A100, which might be a concern for large-scale deployments.
Are 4090s just trash?