This post analyzes the inference characteristics of Llama, comparing its cost and latency to GPT-3.5. It details the mathematical underpinnings of transformer inference, including FLOPs and memory bandwidth calculations for both prompt processing and token generation. Key findings indicate that Llama is significantly cheaper for prompt-dominated tasks but more expensive for completion-heavy workloads compared to GPT-3.5. The analysis also touches upon memory requirements for KV cache and model weights.
All Cursor trails