影片高階EN41.3 萬 次觀看
Coding a Transformer from scratch on PyTorch, with full explanation, training and inference.
來源 Umar Jamil
看影片(在新分頁開啟原站)連到 YouTube・Umar Jamil
摘要
詳細示範如何從零開始使用 PyTorch 手寫編碼一個 Transformer 模型,涵蓋輸入嵌入、位置編碼、多頭注意力機制及編解碼器等核心模組。講者逐步解說訓練迴圈、推論過程(Greedy Decoding)以及如何使用 Notebook 視覺化注意力分數,讓讀者深入理解模型運作原理與實際實作細節。
This video provides a comprehensive tutorial on coding a Transformer model from scratch using PyTorch, covering all components from embeddings to training and inference loops, including attention visualization.
摘要、重點與章節標題由語言模型整理,細節(誰說的、數字、先後)可能有誤;要引用請以原始內容為準。
重點
- 完整手寫 PyTorch Transformer 模型,包含編解碼器與訓練推論程式碼。
- 詳細解說多頭注意力、位置編碼與殘差連接等關鍵架構設計。
- 提供注意力分數視覺化範例,並示範如何調整參數訓練翻譯模型。
章節
依話題轉折切分,標題由 AI 產生
- 00:00Introduction
- 01:20Input Embeddings
- 04:56Positional Encodings
- 13:30Layer Normalization
- 18:12Feed Forward
- 21:43Multi-Head Attention
- 42:41Residual Connection
- 44:50Encoder
- 51:52Decoder
- 59:20Linear Layer
- 1:01:25Transformer
- 1:17:00Task overview
- 1:18:42Tokenizer
- 1:31:35Dataset
- 1:55:25Training loop
- 2:20:05Validation loop
- 2:41:30Attention visualization
提到的工具與公司
- PyTorch
- Hugging Face
- Altair
- TensorBoard
適合誰看
適合希望深入理解 Transformer 架構原理並具備 PyTorch 實作經驗的開發者或機器學習學習者。
摘要依據
- 依據
- 自動字幕
為什麼排在這裡
- 人氣
- 0.56
- 新鮮
- 0.01
在主題頁與搜尋結果裡,名次由相關、人氣、新鮮三個分數決定;這一頁沒有搜尋的關鍵字,所以沒有相關分數。排序怎麼算
相關內容
- Coding a ChatGPT Like Transformer From Scratch in PyTorch影片 ・ StatQuest with Josh Starmer ・ 31 分鐘 ・
- Attention is all you need (Transformer) - Model explanation (including math), Inference and Training影片 ・ Umar Jamil ・ 58 分鐘 ・
- Build an LLM from Scratch 3: Coding attention mechanisms影片 ・ Sebastian Raschka ・ 2 小時 16 分 ・
- The matrix math behind transformer neural networks, one step at a time!!!影片 ・ StatQuest with Josh Starmer ・ 24 分鐘 ・
- Attention in transformers, step-by-step | Deep Learning Chapter 6影片 ・ 3Blue1Brown ・ 26 分鐘 ・
- Coding LLaMA 2 from scratch in PyTorch - KV Cache, Grouped Query Attention, Rotary PE, RMSNorm影片 ・ Umar Jamil ・ 3 小時 4 分 ・
這個來源最近的內容
摘要由 AI 根據原文產生,可能有誤;完整內容請看原站。看影片(在新分頁開啟原站)
