Llama 3.1 8B vs. Mistral 7B: GPU Throughput Leader

Llama 3.1 8B often surpasses Mistral 7B in GPU inference speed; for code generation on an RTX 3090 with INT4 quantization, Llama 3 8B generated completions 41% faster than Mistral 7B. Gemma 2 9B typically lags behind due to its larger parameter count and architectural overhead.

The top 3

  1. Llama 3.1 8B's 41% Faster Code Completion: On an RTX 3090 with INT4 quantization, Llama 3.1 8B achieves 55 completions per minute for code generation, outpacing Mistral 7B's 39 completions per minute, making it 41% faster.
  2. Architectural Optimizations for GPU Throughput: Both Llama 3.1 8B and Mistral 7B utilize Grouped-Query Attention (GQA) for efficient inference. Mistral 7B further incorporates Sliding Window Attention (SWA), which can offer efficiency in long-context scenarios but may negatively impact code generation accuracy in some cases.
  3. Llama 3.1 8B's Superior Function Calling Throughput: For function calling, Llama 3.1 8B achieves 89.8% accuracy compared to Mistral 7B's 78.7%. This higher accuracy results in fewer retries and a faster effective throughput for agentic workflows, despite Mistral sometimes generating more calls per minute.

Sources

Open the full topic