看影片(在新分頁開啟原站)連到 YouTube・Vizuara
摘要
Dr. Sreedath Panat 深入解析 vLLM 與 SGLang 如何透過高效記憶體管理與排程,讓大型語言模型推理成本降低約六倍。影片追蹤一個「法國首都為何」的請求,從 API 伺服器分詞、CPU 排程規劃,到 GPU 執行字首填充與解碼,並比較兩者在 KV Cache 儲存(分頁注意力 vs 樹狀結構)與去分詞器設計上的差異,最後提供選擇引擎的實戰建議。
Dr. Sreedath Panat explains how vLLM and SGLang reduce LLM inference costs by six times through efficient memory management and scheduling, tracing a request's journey from API to GPU and comparing their architectural differences.
摘要、重點與章節標題由語言模型整理,細節(誰說的、數字、先後)可能有誤;要引用請以原始內容為準。
重點
- 追蹤單一請求在 vLLM 與 SGLang 引擎中的完整執行路徑。
- 比較分頁注意力與樹狀注意力在 KV Cache 管理上的核心差異。
- 提供針對不同硬體與場景選擇 vLLM 或 SGLang 的決策圖表。
章節
依話題轉折切分,標題由 AI 產生
- 00:00Welcome and what this lecture covers
- 05:22Roadmap: the parts of today's lecture
- 07:26Recap of Part 1: decode speed, KV cache, batching, 6x savings
- 11:47Running example: Llama 3.1 8B and GPU memory
- 14:03The four parts of an engine: API server, scheduler, KV cache manager, model runner
- 17:15Why SRAM is small: on-chip versus off-chip memory
- 18:49The engine loop: one step every 16 ms
- 24:24Why the CPU plans the next step while the GPU runs
- 26:37Our chat as user 128: prefill and decode in one step
- 29:41vLLM: the three processes
- 31:03Stop 1: POST request, chat template, tokenizer
- 34:16ZeroMQ, engine core and GPU worker
- 36:11Scheduler: chunked prefill with 127 + 1,921 tokens
- 43:13Q&A: which predictions are discarded during prefill
- 48:05KV cache manager: 16-token blocks and the block table
- 52:10Prefix caching: reusing shared openings
- 53:59Hashing, and why each hash depends on the block before it
- 59:17Back to our request: cached blocks and new blocks
- 1:03:55Forward pass, sampling, detokenizing and streaming
- 1:05:44How the CPU plans ahead with blanks
- 1:07:40The flat batch: new tokens versus saved keys and values
- 1:09:28SGLang: the same request, and its processes
- 1:11:34The radix tree: matching prompts token by token
- 1:14:59Q&A: tree versus block table
- 1:17:02When branches are removed from the tree
- 1:17:47Cache-aware scheduling: most cached first
- 1:20:27Q&A: why the name RadixAttention
- 1:22:00vLLM and SGLang: the main differences
- 1:22:29Which engine to try first: the quadrant chart
- 1:24:46Differences recap: memory units, scheduling, detokenizer
- 1:26:38The bootcamp and final questions
提到的工具與公司
適合誰看
希望深入理解大型語言模型推理引擎內部架構、排程機制與記憶體管理的工程師或開發者。
摘要依據
- 依據
- 自動字幕
為什麼排在這裡
- 人氣
- 0.63
- 新鮮
- 0.89
在主題頁與搜尋結果裡,名次由相關、人氣、新鮮三個分數決定;這一頁沒有搜尋的關鍵字,所以沒有相關分數。排序怎麼算
相關內容
- How inference works at scale? vLLM and SGLang inference engines影片 ・ Vizuara ・ 5 分鐘 ・
- How LLM Serving Actually Works影片 ・ Jia-Bin Huang ・ 42 分鐘 ・
- How LLM Serving Works: An Introduction to vLLM and SGLang影片 ・ Vizuara ・ 1 小時 49 分 ・
- 理解 KV Cache 与 Prompt Caching:LLM 推理加速的核心机制文章 ・ chaofa用代码打点酱油(袁朝发) ・
- Distributed LLM Inference on Kubernetes with llm-d, Wasm, & TornadoVM影片 ・ InfoQ ・ 44 分鐘 ・
- Why AI Models Run Faster on Some Chips: The KV Cache Effect影片 ・ IBM Technology ・ 10 分鐘 ・
這個來源最近的內容
摘要由 AI 根據原文產生,可能有誤;完整內容請看原站。看影片(在新分頁開啟原站)
