~/talk

Build Your Own Transformer

Talkat PyData Global 2024 · 2024-12-03..12-05· [machine-learning]
name:Borar
links:none on file
name:Liu
links:none on file
links:none on file
slides:none on file

90 minute hands-on workshop that implements self-attention from scratch in a shared Colab notebook using only NumPy. It walks a 3‑token example ("you are amazing"), uses 8‑dim random embeddings, initializes 8×8 Q/K/V weights, computes scaled dot‑product attention with masking and softmax, and outputs a 3×8 attention matrix. No large‑model training — weights stay random — but the Colab demo runs end‑to‑end and shows the exact math and code for each step.

AI-written summary · about

  1. 0:00Workshop introduction
  2. 3:22Transformer architecture basics
  3. 13:39Setting up Colab
  4. 14:00Word embeddings from scratch
  5. 20:58Positional encoding
  6. 25:11Input matrix stacking
  7. 28:03Query key value matrices
  8. 39:20Attention head weights
  9. 42:24Q K V matrices
  10. 45:56Attention scores
  11. 50:12Softmax scaling
  12. 58:28Attention masks
  13. 1:04:27Softmax probabilities
  14. 1:08:53Attention output
  15. 1:13:29Multi-headed attention
  16. 1:19:29Encoder decoder layers
  17. 1:21:15Summary
  18. 1:22:43Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.