Inference Speedup

Inference Speedup refers to techniques and architectural optimizations designed to reduce the latency and increase the throughput of Large Language Model (LLM) generation. The primary bottleneck in LLM inference is the autoregressive nature of token generation, where each token depends on the previous ones, leading to sequential computation constraints.

Core Mechanisms

Speculative Decoding

A primary method for achieving inference speedup is speculative-decoding. This technique utilizes a smaller, faster “draft” model to propose multiple tokens, which are then verified in parallel by the larger “target” model. If the draft tokens are accepted, the target model skips sequential steps, significantly reducing latency.

Other Optimization Strategies

Key Metrics

  • Time to First Token (TTFT): Latency before the first token is generated.
  • Tokens per Second (TPS): Throughput measure of generation speed.
  • Acceptance Rate: In speculative decoding, the percentage of draft tokens accepted by the target model.