LLM Inference Lab
A traceable learning record for LLM inference, KV cache, and evaluation methods.
A traceable learning record for LLM inference, KV cache, and evaluation methods.
A traceable learning record for LLM inference, KV cache, and evaluation methods.
Framing study questions, understanding inference mechanisms, and planning reproducible experiments.
Implementation and boundaries are detailed in the articles below.
START HERE
A traceable learning record for LLM inference, KV cache, and evaluation methods.
从长短请求混跑出发,区分迭代调度与 KV 空间管理,用一个小批次和块分配例子解释吞吐、等待与容量的取舍。
从热缓存节点排队更长的情况出发,比较本地命中、远端搬运与重新计算,解释命中率为何不能单独决定路由。
以测试工程的测量边界为起点,区分 TTFT、TPOT、ITL、开闭环负载与 goodput,避免把压力机限制和失败请求隐藏在漂亮报表里。
用一次请求的完整旅程串起 LLM 推理的核心概念:Prefill/Decode、KV Cache 容量估算、GQA、Prefix Cache、延迟指标,以及为什么开了缓存 P99 反而可能变差。
解释 Prefill 和 Decode 如何使用 KV Cache、各自如何批处理,以及应该观察哪些延迟指标。
梳理 KV Cache 的数据结构、显存估算方式,以及长上下文为什么会放大问题。
从命中率提高但首字仍慢的问题出发,区分复用长度、缓存准备、排队与 TTFT,并设计对照实验。