Efficiency Pentathlon: A Standardized Benchmark for Efficiency Evaluation

Hao Peng, Qingqing Cao, Jesse Dodge, Matthew E Peters, Jared Fernandez, Tom Sherborne, Kyle Lo, Sam Skjonsberg, Emma Strubell, Darrell Plessas, Iz Beltagy, Evan Pete Walsh, Noah A. Smith, Hannaneh Hajishirzi · Submission to ICLR 2024 · Rejected

TL;DR

The Efficiency Pentathlon is a standardized, open benchmark and software suite designed to measure the real-world inference efficiency of AI models. By running submissions on a strictly controlled, dedicated hardware server equipped with physical power monitors, it evaluates models across five core metrics—throughput, latency, memory overhead, model size, and energy/carbon footprint—under four practical deployment scenarios.

What Problem Does This Paper Address?

While the AI community increasingly emphasizes efficiency, comparing models fairly remains notoriously difficult:

  • Hardware disparities: Differences in hardware across institutions act as a confounding variable. A model tested on an A100 cannot be reliably compared to one evaluated on a V100 or RTX GPU.
  • Misleading metrics: Theoretical metrics like FLOPs and parameter counts often fail to correlate with actual runtime, memory footprint, or power draw.
  • Unrealistic evaluation settings: Most academic benchmarks measure inference with fixed batch sizes. In real production deployments, workloads vary drastically—ranging from streaming single queries on edge devices to processing unpredictable traffic spikes or large offline batch jobs.
  • Flawed energy accounting: Existing studies often estimate inference energy using GPU-only tools or GPU-hours, ignoring the host machine’s CPU, DRAM, and storage subsystem overheads.

Methods

To overcome these obstacles, the authors built a centralized benchmarking platform:

  • Controlled Hardware Platform: Hosted on a dedicated server (two NVIDIA RTX 8000 GPUs, two Intel Xeon Ice Lake Gold 6348 CPUs, and 1TB DDR4 RAM). A job scheduler guarantees that exactly one inference workload runs at a time to prevent resource contention.
  • Direct Physical Power Measurement: An external power monitor (emonTx V4, $\pm 1.2\%$ error) directly measures the whole-machine wall power. Idle power is subtracted, and real-time regional carbon intensity data calculates total carbon emissions.
  • Four Realistic Serving Scenarios:
  • Fixed Batching: Standard evaluation with user-tuned batch sizes.
  • Poisson Batching: Batch sizes dynamically sampled from a Poisson distribution ($\text{BSZ} \sim \text{Pois}(\lambda)$) to simulate unpredictable online query traffic.
  • Single Stream: Sequential processing with a batch size of 1 via standard I/O (stdin/stdout), modeling real-time interactive assistants.
  • Offline: Full access to the test set upfront via file I/O, permitting optimizations like sorting sequences by length.
  • Framework-Agnostic Library: Pentathlon requires submissions via a GitHub repository that reads stdin and writes stdout. It supports standard frameworks (PyTorch, TensorFlow) and compiled inference engines (ONNX Runtime, TensorRT, TVM).
   Evaluation Scenarios          Pentathlon Metrics
┌──────────────────────────┐    ┌──────────────────────────┐
│ • Fixed Batching         │    │ 1. Throughput (inst/sec) │
│ • Poisson Batching       │ ──>│ 2. Latency (ms)          │
│ • Single Stream (BSZ=1)  │    │ 3. Memory Overhead (GiB) │
│ • Offline (Sorted/Packed)│    │ 4. Parameters (#Params)  │
└──────────────────────────┘    │ 5. Energy & Carbon (W·h) │
                                └──────────────────────────┘

Datasets

The authors evaluated models across three NLP tasks:

  • Machine Translation: WMT14 German $\leftrightarrow$ English (DE-EN and EN-DE).
  • Mathematical Reasoning: GSM8K evaluated using zero-shot, direct few-shot, and 8-shot Chain-of-Thought (CoT) prompting.
  • Few-Shot Text Classification: ADE Corpus V2 from the RAFT benchmark (adverse drug effect detection).

Key Insights and Ideas

  • The GPU is not the main energy sink during inference: In training, GPUs consume roughly 70% of total system energy. During single-GPU inference, the authors discovered the GPU accounted for only 15% to 34% of total machine power draw. CPUs, DRAM, and disk I/O dominate power consumption due to smaller compute kernels and data-transfer overheads.
  • Quantization yields asymmetric gains: Down-casting from FP32 to FP16 provided minimal latency or energy gains for smaller models (e.g., OPUS 74M). However, for larger models like WMT21-Meta (4.7B), FP16 nearly doubled throughput and halved latency, memory, and energy.
  • Generation length trumps parameter count: When comparing models of similar parameter sizes on GSM8K (FLAN-T5 XXL at 11B vs. LLaMA at 13B), FLAN-T5 was significantly faster, less memory-intensive, and consumed far less energy. The reason: LLaMA generated considerably longer chain-of-thought responses.
  • Runtime compilers present trade-offs: Using ONNX Runtime instead of PyTorch improved single-stream latency and throughput by $>20\%$, but increased GPU memory usage due to caching pre-compiled static computational graphs.

Key Results

  • Machine Translation (WMT14 DE-EN):
  • OPUS (74M) proved to be the most efficient model overall, outperforming the much larger MBART M2M (610M) and M2M100 (418M/1.2B) in both BLEU score and efficiency across all metrics.
  • WMT19-Meta (314M) delivered an optimal middle ground: it achieved comparable latency, memory, and energy to OPUS while scoring significantly higher BLEU, though OPUS retained higher throughput.
  • Reasoning (GSM8K):
  • Instruction-tuned FLAN-T5 XXL outperformed similarly sized foundation models (LLaMA-7B and LLaMA-13B) in both reasoning accuracy and all efficiency dimensions.
  • Text Classification (RAFT / ADE):
  • Non-neural AdaBoost provided competitive accuracy-efficiency trade-offs. GPT-2 achieved the highest F1 score but suffered severe latency and throughput penalties due to long prompt contexts.

Limitations and Future Work

  • Initial Scope: The current benchmark suite focuses exclusively on NLP; extending the platform to computer vision and multimodal models is left for future work.
  • Submission Overhead: Participating requires users to adapt models to an I/O wrapper and submit checkpoints, though the authors note this process takes under an hour.
  • Extreme Quantization Challenges: The initial study evaluated FP32 and FP16. Naive 4-bit and 8-bit post-training quantization caused translation BLEU scores to collapse to near 1, highlighting the need for better standardized post-training quantization pipelines within the benchmark.

Summary updated

BibTeX
@misc{peng2023efficiency,
  author = {Hao Peng and Qingqing Cao and Jesse Dodge and Matthew E Peters and Jared Fernandez and Tom Sherborne and Kyle Lo and Sam Skjonsberg and Emma Strubell and Darrell Plessas and Iz Beltagy and Evan Pete Walsh and Noah A. Smith and Hannaneh Hajishirzi},
  title = {{Efficiency Pentathlon: A Standardized Benchmark for Efficiency Evaluation}},
  year = {2023},
  eprint = {2307.09701},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2307.09701},
}
Figure