Back to engineering

4ROUTER / Performance

Tuning the inference path

Inside the work of balancing latency and throughput.

Engineering note

Separate the waiting time

A request can wait at admission, prompt processing, token generation or transport. Total duration alone does not identify the bottleneck. Record arrival, execution start, first token and completion, then interpret these stages alongside prompt and output lengths.

Keep the workload comparable

Keep model, hardware, request samples and arrival patterns fixed when comparing settings. Aggregate throughput can hide growing queues, while isolated latency says little about concurrency. Define acceptable waits for interactive and batch work before choosing which improvement matters.

Validate one change at a time

Batch limits, cache policy, precision and kernels change resource use in different ways. Establish a baseline and record each change against the same workload. When precision or kernels change, check task quality and numerical behavior as well as speed.

Before implementation

  • Stage-level latency records
  • Concurrency and arrival patterns
  • Performance and task-quality checks

Further reading

vLLM · Optimization and tuning

4ROUTER / SYSTEMS RESEARCH

Mechanisms and experiment design

Understand how operators, KV state and scheduling shape an inference path.

Read the systems notes in Resources
GEMM / KERNELS

From operators to serving: cuBLAS & cuDNN

Identify the limiting resource before selecting the implementation.

ATTENTION / MEMORY

FlashAttention & PagedAttention: different memory problems

One optimizes data movement; the other organizes persistent state.

SCHEDULING / SLO

From prefill to decode: designing the scheduling experiment

When throughput rises, know which requests are waiting.

Let’s talk infrastructure.

Connect to the platform, or discuss models, performance and deployment.