Skip to content
LLM Inference

Context

Where each idea lives in real engines

Once you have built a technique yourself, the fastest way to go deeper is to read someone else's version. This maps each chapter onto the engines worth reading, from datacenter fleets to a 2,944-line C program on a Raspberry Pi.

Feature matrix

A blank means the engine does not need the feature rather than that it is missing one: batching is meaningless at batch 1, and paging is meaningless when one user owns the machine. Entries marked ? are not documented publicly.

TechniquevLLMSGLangTRT-LLMllama.cpppicoLMquant.cppbaseRT
S02BPE / SentencePiece
S03GQA
S05KV cache
S06PagedAttentionradixpartial
S07Prefix cachingreusesave/loadsave/load
S08Weight quantizationFP8/AWQ/GPTQFP8/AWQFP8/INT4GGUF KQ2_K–Q8_0IQ2–Q8.base Q2–Q8
S08KV quantizationFP8FP8INT8/FP8Q8/Q4fp164-bityes
S09Continuous batchingin-flightparallel seqs
S10Preemptionrecomputerecomputeswap?
S11Chunked prefillchunked ctx?
S12FlashAttentiononline softmax
S13CUDA graphs / AOTfull AOTn/a (CPU)n/a
S14Speculative decodingngram/EAGLEEAGLElookahead?
S15Grammar constraintsXGrammarbuilt-inGBNFJSON only?
S16MoE
S17Tensor parallelismRPC
S18Disaggregated P/D
S19OpenAI-compatible APITritonbindings

What to read, and why

Choosing one, honestly