影片進階EN14.9 萬 次觀看
Coding a Multimodal (Vision) Language Model from scratch in PyTorch with full explanation
來源 Umar Jamil
看影片(在新分頁開啟原站)連到 YouTube・Umar Jamil
摘要
由 Umar Jamil 帶領觀眾從零開始,使用 Python 和 PyTorch 完整編碼 Google 的 PaliGemma 多模態視覺語言模型。內容涵蓋對照學習(CLIP、SigLip)、視覺 Transformer、KV-Cache、Rotary Positional Embedding 及 Grouped Query Attention 等核心概念與實作細節,並包含完整的推論程式碼。
A comprehensive tutorial on coding the PaliGemma multimodal vision language model from scratch using PyTorch, covering contrastive learning, KV-cache, and attention mechanisms with full implementation details.
摘要、重點與章節標題由語言模型整理,細節(誰說的、數字、先後)可能有誤;要引用請以原始內容為準。
重點
- 從零開始編碼 PaliGemma 視覺語言模型,涵蓋視覺編碼器與語言模型。
- 深入解析對照學習、KV-Cache 與 Rotary Positional Embedding 原理。
- 提供完整的 PyTorch 實作程式碼與推論指令碼,可直接執行測試。
章節
依話題轉折切分,標題由 AI 產生
- 00:00Introduction
- 05:52Contrastive Learning and CLIP
- 16:50Numerical stability of the Softmax
- 23:00SigLip
- 26:30Why a Contrastive Vision Encoder?
- 29:13Vision Transformer
- 35:38Coding SigLip
- 54:25Batch Normalization, Layer Normalization
- 1:05:28Coding SigLip (Encoder)
- 1:16:12Coding SigLip (FFN)
- 1:20:45Multi-Head Attention (Coding + Explanation)
- 2:15:40Coding SigLip
- 2:18:30PaliGemma Architecture review
- 2:21:19PaliGemma input processor
- 2:40:56Coding Gemma
- 2:43:44Weight tying
- 2:46:20Coding Gemma
- 3:08:54KV-Cache (Explanation)
- 3:33:35Coding Gemma
- 3:52:05Image features projection
- 3:53:17Coding Gemma
- 4:02:45RMS Normalization
- 4:09:50Gemma Decoder Layer
- 4:12:44Gemma FFN (MLP)
- 4:16:02Multi-Head Attention (Coding)
- 4:18:30Grouped Query Attention
- 4:38:35Multi-Head Attention (Coding)
- 4:43:26KV-Cache (Coding)
- 4:47:44Multi-Head Attention (Coding)
- 4:56:00Rotary Positional Embedding
- 5:23:40Inference code
- 5:32:50Top-P Sampling
- 5:40:40Inference code
- 5:43:40Conclusion
提到的工具與公司
- PyTorch
- PaliGemma
- SigLip
- CLIP
- Gemma
- Hugging Face
適合誰看
適合希望深入理解多模態模型架構、Transformer 原理並具備 PyTorch 實作經驗的開發者與研究者。
摘要依據
- 依據
- 自動字幕
為什麼排在這裡
- 人氣
- 0.48
- 新鮮
- 0.04
在主題頁與搜尋結果裡,名次由相關、人氣、新鮮三個分數決定;這一頁沒有搜尋的關鍵字,所以沒有相關分數。排序怎麼算
相關內容
- Coding LLaMA 2 from scratch in PyTorch - KV Cache, Grouped Query Attention, Rotary PE, RMSNorm影片 ・ Umar Jamil ・ 3 小時 4 分 ・
- Stanford CS336 Language Modeling from Scratch | Spring 2026 | Lecture 17: Alignment - Multimodality影片 ・ Stanford Online ・ 1 小時 18 分 ・
- Coding a Transformer from scratch on PyTorch, with full explanation, training and inference.影片 ・ Umar Jamil ・ 2 小時 59 分 ・
- Build & Train a GLM-5.3-Flash Model From Scratch with Python影片 ・ freeCodeCamp.org ・ 44 分鐘 ・
- What I Learned From Implementing LLM Architectures From Scratch (And How to Get Started)影片 ・ Sebastian Raschka ・ 53 分鐘 ・
- Build an LLM from Scratch 3: Coding attention mechanisms影片 ・ Sebastian Raschka ・ 2 小時 16 分 ・
這個來源最近的內容
摘要由 AI 根據原文產生,可能有誤;完整內容請看原站。看影片(在新分頁開啟原站)
