跳到主要內容
AI 武林
影片高階EN1 萬 次觀看

Journey of a token in vLLM and SGLang

來源 Vizuara

看影片(在新分頁開啟原站)連到 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 產生

  1. 00:00Welcome and what this lecture covers
  2. 05:22Roadmap: the parts of today's lecture
  3. 07:26Recap of Part 1: decode speed, KV cache, batching, 6x savings
  4. 11:47Running example: Llama 3.1 8B and GPU memory
  5. 14:03The four parts of an engine: API server, scheduler, KV cache manager, model runner
  6. 17:15Why SRAM is small: on-chip versus off-chip memory
  7. 18:49The engine loop: one step every 16 ms
  8. 24:24Why the CPU plans the next step while the GPU runs
  9. 26:37Our chat as user 128: prefill and decode in one step
  10. 29:41vLLM: the three processes
  11. 31:03Stop 1: POST request, chat template, tokenizer
  12. 34:16ZeroMQ, engine core and GPU worker
  13. 36:11Scheduler: chunked prefill with 127 + 1,921 tokens
  14. 43:13Q&A: which predictions are discarded during prefill
  15. 48:05KV cache manager: 16-token blocks and the block table
  16. 52:10Prefix caching: reusing shared openings
  17. 53:59Hashing, and why each hash depends on the block before it
  18. 59:17Back to our request: cached blocks and new blocks
  19. 1:03:55Forward pass, sampling, detokenizing and streaming
  20. 1:05:44How the CPU plans ahead with blanks
  21. 1:07:40The flat batch: new tokens versus saved keys and values
  22. 1:09:28SGLang: the same request, and its processes
  23. 1:11:34The radix tree: matching prompts token by token
  24. 1:14:59Q&A: tree versus block table
  25. 1:17:02When branches are removed from the tree
  26. 1:17:47Cache-aware scheduling: most cached first
  27. 1:20:27Q&A: why the name RadixAttention
  28. 1:22:00vLLM and SGLang: the main differences
  29. 1:22:29Which engine to try first: the quadrant chart
  30. 1:24:46Differences recap: memory units, scheduling, detokenizer
  31. 1:26:38The bootcamp and final questions

提到的工具與公司

適合誰看

希望深入理解大型語言模型推理引擎內部架構、排程機制與記憶體管理的工程師或開發者。

摘要依據

依據
自動字幕

為什麼排在這裡

人氣
0.63
新鮮
0.89

在主題頁與搜尋結果裡,名次由相關、人氣、新鮮三個分數決定;這一頁沒有搜尋的關鍵字,所以沒有相關分數。排序怎麼算

這個來源最近的內容

Vizuara 的所有內容

摘要由 AI 根據原文產生,可能有誤;完整內容請看原站。看影片(在新分頁開啟原站)