Educational Cards

Learn from video content, text, and interactive tasks

Filters
Clear
Encoder vs decoder masking

Not every transformer attends the same way. Encoder blocks (BERT-style) use bidirectional...

Intermediate Machine learning
Transformer block: attention + MLP + residuals + norm

A transformer block stacks two sublayers around a residual highway. First, multi-head...

Intermediate Machine learning
Positional encodings and length generalization

Attention scores depend on content vectors alone unless you tell the model where each token sits in...

Intermediate Machine learning
Self-attention mixes tokens via learned compatibilities

Chapter 5 framed language as next-token prediction; this chapter asks how a model can mix...

Intermediate Machine learning
Bridge to transformer mechanisms

Language models before transformers often used RNNs : a hidden state updated serially along time,...

Intermediate Machine learning
Memorization, privacy, and copyright pressure points

Large models can memorize rare training sequences, including private or licensed text....

Intermediate Machine learning
Profiling before rewriting

cProfile , py-spy , and IDE profilers show where time goes—function call counts and cumulative...

Beginner Accelerating numerics & developer hygiene
Linters versus formatters

Formatters (Black, isort) rewrite layout—whitespace, line breaks, import order—without changing...

Beginner Accelerating numerics & developer hygiene
Docker reproducibility anecdotes

Containers pin OS-level dependencies and, with lock files, Python package versions so collaborators...

Beginner Accelerating numerics & developer hygiene
Testing discipline vs folklore speedups

Unit tests lock behaviour while you refactor: changing a feature encoder should not silently shift...

Beginner Accelerating numerics & developer hygiene
A simple timing decorator (wraps-preserving ergonomics)

Decorators that add timing/logging should use functools.wraps so __name__ , __doc__ , and...

Intermediate Accelerating numerics & developer hygiene
Why vectorised kernels beat naive Python loops numerically hot

NumPy (and pandas underneath) stores numeric data in contiguous, typed buffers and dispatches work...

Beginner Accelerating numerics & developer hygiene