看影片(在新分頁開啟原站)連到 YouTube・Hamel Husain
摘要
Abby 透過 PyTorch 實作 TinyLlama,拆解 LLM 推論的「預填充」與「解碼」兩階段,揭示寫入 token 耗時約為讀取的 300 倍。影片分析短提示與多步驟代理(Agent)的效能差異,並探討 KV Cache 成長、GPU 閒置問題及生產環境常見錯誤。
Abby demonstrates LLM inference mechanics using TinyLlama, revealing that decoding is 300x slower than prefilling and explaining how agent loops drastically increase costs and latency.
摘要、重點與章節標題由語言模型整理,細節(誰說的、數字、先後)可能有誤;要引用請以原始內容為準。
重點
- 寫入一個 token 的耗時約為讀取 token 的 300 倍,解碼階段是延遲主因。
- 多步驟代理因重複讀取歷史,成本與延遲可能比單次請求高出 12 倍。
- 小型請求會導致 GPU 閒置,需透過批次處理(Batching)來提升吞吐量。
章節
依話題轉折切分,標題由 AI 產生
- 00:00Same model, same GPU: 3.3 seconds vs 38.8 seconds
- 01:35The four numbers that shape every request
- 02:24Chat, RAG, creative writing and agents
- 04:00Prefill: reading your prompt all at once
- 05:34Decode: writing one token at a time
- 07:12Measuring prefill and decode in a notebook
- 12:06Short prompts, long prompts and long outputs
- 16:57Writing a token costs 300x more than reading one
- 18:32Small requests starve the GPU
- 20:58Simulating an agent loop
- 24:11Why a five step agent costs 12x a single request
- 25:50Why the KV cache grows slower than you'd expect
- 29:03The takeaways
- 33:05Q&A: the most common production mistakes
- 35:31When to host your own models
- 37:07Speculative decoding and bigger models
提到的工具與公司
適合誰看
適合希望最佳化 LLM 推論效能、理解延遲來源或設計 AI 系統的工程師與技術決策者。
摘要依據
- 講者
- Hamel Husain
- 依據
- 自動字幕
為什麼排在這裡
- 人氣
- 0.14
- 新鮮
- 0.58
在主題頁與搜尋結果裡,名次由相關、人氣、新鮮三個分數決定;這一頁沒有搜尋的關鍵字,所以沒有相關分數。排序怎麼算
相關內容
- 理解 KV Cache 与 Prompt Caching:LLM 推理加速的核心机制文章 ・ chaofa用代码打点酱油(袁朝发) ・
- What Is LLM Inference? How AI Models Generate Responses影片 ・ IBM Technology ・ 8 分鐘 ・
- [LLM Architect] 09 深入理解和对比 prefill与decode | kv-cache | 并行-串行 | GEMM-GEMV | 算力-带宽影片 ・ 五道口纳什 ・ 34 分鐘 ・
- Journey of a token in vLLM and SGLang影片 ・ Vizuara ・ 1 小時 32 分 ・
- Improve TTFT for Multi-Turn Agentic Workloads with Bi-Directional KV Transfer in vLLM文章 ・ vLLM Blog ・
- How LLM Serving Actually Works影片 ・ Jia-Bin Huang ・ 42 分鐘 ・
這個來源最近的內容
摘要由 AI 根據原文產生,可能有誤;完整內容請看原站。看影片(在新分頁開啟原站)
