Macalinao StudioLearnAll enriched lessons ↗

66 TOPICS + 1 CASE STUDY + 1 CAPSTONE / TWO LEVELS / FULL NARRATION

Give the difficult
ideas room.

Start with a concrete example. Follow the calculation. Change one assumption. Explain the result. Choose a level, then move freely between Signal Room, Workbench and Field Notes.

High school begins with intuition and arithmetic. College adds derivations, shape reasoning and implementation assumptions. Each path keeps its own notes and progress.

NEW / INTEGRATED CAPSTONE

Integrated evidence briefing capstone

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER AGENT LESSON

Retrieval-augmented generation

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER AGENT LESSON

Tool use

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER AGENT LESSON

Agent workflows

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER SEARCH LESSON

Self-consistency

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER SEARCH LESSON

Tree-of-thought search

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER SEARCH LESSON

Process reward models

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER REASONING LESSON

Chain-of-thought reasoning

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER REASONING LESSON

Test-time compute

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER REASONING LESSON

GRPO

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER POST-TRAINING LESSON

Instruction tuning

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER POST-TRAINING LESSON

RLHF

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER POST-TRAINING LESSON

DPO

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER ADAPTATION LESSON

LoRA

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER ADAPTATION LESSON

QLoRA

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER ADAPTATION LESSON

Knowledge distillation

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER TRANSFORMER SYSTEMS LESSON

Rotary position embeddings

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER TRANSFORMER SYSTEMS LESSON

FlashAttention

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER TRANSFORMER SYSTEMS LESSON

Quantization

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER ATTENTION LESSON

Grouped-query attention

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER ATTENTION LESSON

Latent attention

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER ATTENTION LESSON

Sparse attention

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER INFERENCE LESSON

KV caching

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER INFERENCE LESSON

Mixture of experts

Seven sections, worked examples, connected experiments and complete local narration.

NEW / LONGER INFERENCE LESSON

Speculative decoding

Seven sections, worked examples, connected experiments and complete local narration.

NEW / MODERN MODEL CASE STUDY

DeepSeek V4.1 Flash

How a modern Transformer reduces the cost of context: causal encoder–decoder, CSA2, cache quantization and bounded replay. Study the benefits and the evidence limits.

7 sections · full local narration · connected experiments

EXTENSION 21

Tokens: from letters to a reusable code

Train merges, encode new text, and compare tokenizers fairly.

7 sections per path · full local narration · connected experiments

EXTENSION 05

Embeddings: learn a geometry, question its meaning

Trace a lookup, compare directions, and test what a similarity score can support.

7 sections per path · full local narration · connected experiments

EXTENSION 06

Word prediction: CBOW and Skip-gram

Build training pairs and distinguish a prediction objective from a semantic guarantee.

7 sections per path · full local narration · connected experiments

EXTENSION 10

Probability and gradients: make loss visible

Compute stable softmax, derive cross-entropy gradients, and test confidence.

7 sections per path · full local narration · connected experiments

EXTENSION 11

Next-token prediction: probability without prophecy

Calculate sequence likelihood and separate prediction quality from reasoning claims.

7 sections per path · full local narration · connected experiments

EXTENSION 07

Transformer families: follow the visibility rules

Draw encoder, decoder and cross-attention connections before choosing an architecture.

7 sections per path · full local narration · connected experiments

EXTENSION 12

Attention: follow every shape

Compute a mixture, apply a causal mask, trace gradients and combine heads.

7 sections per path · full local narration · connected experiments

EXTENSION 22

Q, K and V: projections you can differentiate

Separate routing and content; calculate projection and shared-input gradients.

7 sections per path · full local narration · connected experiments

EXTENSION 12a

Additive attention: score, normalize, combine

Compute a small additive attention layer and follow its gradients.

7 sections per path · full local narration · connected experiments

EXTENSION 13

Transformer blocks: preserve, normalize, transform

Trace residual paths, calculate LayerNorm, and compare pre-norm with post-norm.

7 sections per path · full local narration · connected experiments

EXTENSION 19

Encoder-decoder: read a source, write a target

Track source and target lengths through self-attention, cross-attention and training.

7 sections per path · full local narration · connected experiments

EXTENSION 02

Pretraining: data, loss and a finite compute budget

Design a reproducible training experiment and identify leakage before trusting its score.

7 sections per path · full local narration · connected experiments

EXTENSION 15

Training numerics: updates that mean what you intend

Trace optimizer state, precision and accumulation before scaling a training run.

7 sections per path · full local narration · connected experiments

EXTENSION 03

RLHF: preferences, incentives and their limits

Trace a preference model and a clipped policy objective without confusing reward with truth.

7 sections per path · full local narration · connected experiments

EXTENSION 09

GRPO: compare completions, not teams

Compute group advantages, handle zero variance, and distinguish clipping from KL control.

7 sections per path · full local narration · connected experiments

EXTENSION 16

Preference learning: what a comparison can teach

Work a DPO margin, distinguish KTO and ORPO, and audit preference data.

7 sections per path · full local narration · connected experiments

EXTENSION 18

LoRA and QLoRA: small updates, complete accounting

Count adapter parameters, trace their gradients and distinguish storage from training memory.

7 sections per path · full local narration · connected experiments

EXTENSION 08

Inference: where memory and time go

Separate prefill/decode, calculate KV memory, and evaluate cache trade-offs.

7 sections per path · full local narration · connected experiments

EXTENSION 17

Speculative decoding: fast drafts, exact correction

Calculate acceptance, construct the rejection distribution, and separate exactness from speed.

7 sections per path · full local narration · connected experiments

EXTENSION 28

Local inference: quantize, budget, measure

Estimate storage and test the limits of a local inference configuration.

7 sections per path · full local narration · connected experiments

EXTENSION 25

Model artifacts: pointers, revisions and reproducible downloads

Recover the right artifact and verify its identity before treating it as a model.

7 sections per path · full local narration · connected experiments

EXTENSION 20

RAG: retrieve evidence, then test the answer

Measure retrieval and grounding separately, including missing evidence and hostile passages.

7 sections per path · full local narration · connected experiments

EXTENSION 27

Chat interfaces: make context and actions understandable

Design a conversation that exposes its limits and preserves user control.

7 sections per path · full local narration · connected experiments

EXTENSION 04

Vision transformers: pixels become a sequence

Count patch tokens and follow their projection into attention.

7 sections per path · full local narration · connected experiments

EXTENSION 23

Multimodal learning: alignment is not cross-attention

Distinguish CLIP-style matching from a model that routes information across modalities.

7 sections per path · full local narration · connected experiments

EXTENSION 14

VAE and diffusion: two different learning problems

Work a Gaussian KL, reparameterize a latent, and distinguish corruption from denoising.

7 sections per path · full local narration · connected experiments

EXTENSION 24

Latent paths and control: what a coordinate promises

Interpolate latent points, calculate prior mismatch, and evaluate conditional control.

7 sections per path · full local narration · connected experiments

EXTENSION 26v

AI film planning: continuity before a beautiful frame

Turn a sequence idea into measurable shots and evaluate motion rather than isolated images.

7 sections per path · full local narration · connected experiments

EXTENSION 26s

Speech synthesis: from text to a waveform

Trace pronunciation, acoustic representation and waveform generation as separate stages.

7 sections per path · full local narration · connected experiments

EXTENSION f-diff-math

Diffusion math: from one transition to a sampler

Distinguish transition and marginal noise, derive a reconstruction, and inspect reverse uncertainty.

7 sections per path · full local narration · connected experiments

EXTENSION f-modern

Modern image models: compare the actual components

Read an architecture diagram without assuming every new model removes the same components.

7 sections per path · full local narration · connected experiments

EXTENSION f-ipadapter

Image prompting: condition without promising a copy

Explain decoupled image conditioning and evaluate the trade-off with text instructions.

7 sections per path · full local narration · connected experiments

EXTENSION f-comfyui

Node workflows: data types, dependencies and repeatability

Trace a workflow as a computation graph and diagnose failures at their source.

7 sections per path · full local narration · connected experiments

EXTENSION f-stylelora

Style adapters: learn a pattern without memorizing the set

Curate a style dataset, count update capacity and test transfer to new subjects.

7 sections per path · full local narration · connected experiments

EXTENSION f-video-diff

Video generation: consistency without freezing motion

Explain temporal modeling and detect when a smoothness score rewards the wrong behavior.

7 sections per path · full local narration · connected experiments

EXTENSION f-ltx

LTX video workflows: compression, timing and shot control

Read a versioned video pipeline and estimate its sequence costs without inventing hardware guarantees.

7 sections per path · full local narration · connected experiments

EXTENSION f-persona

Persistent characters: references, variation and human review

Keep a character recognizable across changed poses, lighting and scenes.

7 sections per path · full local narration · connected experiments

EXTENSION f-audio-sync

Audio and video timing: offsets, drift and deliberate cuts

Align speech and edits while distinguishing a fixed offset from changing drift.

7 sections per path · full local narration · connected experiments

EXTENSION f-stt

Speech recognition: words, alignment and uncertainty

Evaluate transcripts and timestamps without treating either as unquestionable ground truth.

7 sections per path · full local narration · connected experiments

EXTENSION f-tts

Narration delivery: first sound, full duration and useful pacing

Design a local narration pipeline whose timing and quality can be tested.

7 sections per path · full local narration · connected experiments

EXTENSION f-voice-clone

Voice cloning: references, consent and evaluation

Distinguish speaker similarity from intelligibility and trustworthy production practice.

7 sections per path · full local narration · connected experiments

EXTENSION f-attendant

Voice attendants: listen, respond and stop reliably

Design turn-taking, interruptions and tool permissions as one observable interaction.

7 sections per path · full local narration · connected experiments