All 58 articles, sorted alphabetically
Attention Is All You Need
What aged and what didn't.
Read article →Attention Is All You Need
The 2017 paper that started everything, re-explained for 2026.
Read article →Attention Variants in 2026
MHA, MQA, GQA, MLA — what's deployed.
Read article →Causal vs Bidirectional Attention
Decoder encoder prefix-LM uses.
Read article →FlashAttention Explained
How the attention kernel was rewritten to be 5-10x faster.
Read article →HuggingFace Accelerate
How accelerate simplifies distributed training and inference across GPUs and nodes.
Read article →HuggingFace Datasets
How the datasets library provides memory-mapped, streamable access to huge datasets.
Read article →HuggingFace Evaluate
How the evaluate library provides standardized ML metrics (accuracy, BLEU, ROUGE, and hundreds more).
Read article →HuggingFace Hub
How the Hub distributes models, datasets, and Spaces, and how it centralized ML resource sharing.
Read article →HuggingFace Model Cards
What model cards are, why they matter for responsible ML, and how to write good ones.
Read article →HuggingFace PEFT
How the PEFT library implements LoRA, QLoRA, adapters, prefix tuning, and other efficient fine-tuning methods.
Read article →HuggingFace Pipelines
How pipelines provide task-focused inference APIs (classification, generation, etc.) with minimal setup.
Read article →HuggingFace Tokenizers Library
How the tokenizers library provides fast tokenization via Rust, and the algorithms it supports (BPE, WordPiece, Unigram).
Read article →HuggingFace Trainer
How the Trainer class abstracts training loops, handling optimization, evaluation, and checkpointing.
Read article →KV Cache Explained
Why generation is fast: the attention KV cache and its memory implications.
Read article →Long-Context Evaluation
Needle-in-haystack and what it misses.
Read article →Mixture of Depths
Routing tokens through different depths.
Read article →Multi-Token Prediction (MTP)
DeepSeek V3's MTP and the speed-quality trade.
Read article →Rotary Position Embeddings (RoPE)
The position encoding that replaced sinusoidal and enabled long-context extrapolation.
Read article →Relative position embeddings architecture
Deep-dive on relative position embeddings: distance, bias table, T5 buckets, Shaw edges, ALiBi, extrapolation.
Read article →The Transformer Breakdown: A Deep Dive into Self-Attention, Key-Value Pairs, and Positional Encoding
Read article →The Vanishing Gradient Problem: How Transformers Solved What Killed Earlier RNNs
Read article →Tokenization Choices Compared
BPE, SentencePiece, Tiktoken — and why it matters.
Read article →Transformer Block Anatomy
What's inside one of the N layers.
Read article →Transformer Training Loss Curves
Reading them and what each shape means.
Read article →HuggingFace Accelerate Architecture in Depth
A 2500-word walkthrough of HuggingFace Accelerate: Accelerator, config, DDP, FSDP, DeepSpeed, Megatron, TPU/MPS, mixed precision, save+resume.
Read article →HuggingFace Datasets Architecture in Depth
A 2500-word walkthrough of HuggingFace Datasets: Arrow storage, splits, cache, streaming, map/filter, Hub, data cards, interop.
Read article →Hugging Face generate() architecture
Deep-dive on the Transformers generate() method: the GenerationConfig as single source of truth, the ordered logits-processor pipeline (temperature, t…
Read article →HuggingFace Transformers Library Architecture in Depth
A 2500-word walkthrough of the HuggingFace Transformers library architecture: Hub, auto classes, tokenizer, model, Trainer, TRL/PEFT, Accelerate, and …
Read article →HuggingFace Transformers Library Overview
What the transformers library is, its role in the ML ecosystem, and the primitives it provides.
Read article →HuggingFace Transformers Pipelines Architecture in Depth
A 2500-word walkthrough of HuggingFace pipelines: task registry, model selection, preprocessor, forward, postprocessor, batching, device, streaming, O…
Read article →Tokenizers
Deep-dive on tokenizers: the normalization/pre-tokenization/subword pipeline, BPE/WordPiece/Unigram algorithms, vocabulary and token IDs, special toke…
Read article →Hugging Face Trainer architecture
Deep-dive on the HF Trainer: how TrainingArguments configures a run, the Trainer orchestrates the step over an Accelerate backend, gradient accumulati…
Read article →ALiBi attention architecture
Deep-dive on ALiBi (Attention with Linear Biases): replacing input position embeddings with a static per-head linear penalty on attention scores, the …
Read article →Attention sinks -- why the first tokens matter for streaming LLMs
Deep-dive on attention sinks: the infinite-generation KV-cache problem, sliding-window KV and its collapse, attention sinks (initial tokens absorbing …
Read article →Cross-attention architecture
Deep-dive on cross-attention, the attention variant where queries come from a target sequence and keys/values from a separate source, powering transla…
Read article →Dropout architecture
Deep-dive on dropout: standard, inverted, attention, residual, layer drop, DropPath, inference mode, modern LLM practice.
Read article →FlashAttention -- IO-aware exact attention
Deep-dive on FlashAttention: the O(N^2) attention memory problem, the IO-awareness insight (attention is memory-IO-bound), tiling Q/K/V into SRAM bloc…
Read article →Transformer gate architecture
Deep-dive on transformer gates: SwiGLU/GeGLU vs plain GeLU, MoE routing gate, attention output gating, numerics, kernel fusion.
Read article →KV cache architecture
Deep-dive on the transformer KV cache: prefill vs decode regimes, per-token memory math, paged allocation and block tables, prefix caching with copy-o…
Read article →MoE transformer architecture
Deep-dive on MoE transformers: gate MLP, top-K selection, expert MLPs, load balance loss, router z-loss, capacity factor, jitter.
Read article →Multi-head latent attention (MLA) architecture
Deep-dive on MLA: down/up-projecting keys and values into a cached low-rank latent, decoupled RoPE for position, weight absorption so inference attend…
Read article →Positional encoding architecture
Deep-dive on positional encoding: sinusoidal, learned, relative, RoPE, ALiBi, long-context extension (PI, NTK, YaRN), kernels.
Read article →Pre-norm vs post-norm architecture
Deep-dive on pre-norm vs post-norm placement: gradient flow, stability, LR warmup, DeepNet init, sandwich norm, final LN.
Read article →QK-Norm architecture
Deep-dive on query-key normalization: why QK^T/sqrt(d) logits grow without bound, how softmax saturation kills gradients, per-head RMSNorm placement b…
Read article →Ring Attention: Architecture Deep-Dive
How ring attention shards sequences across devices and rotates KV blocks to compute exact attention beyond single-device memory limits — architecture,…
Read article →RMSNorm
Deep-dive on RMSNorm: normalizing activations by their root-mean-square with a learned gain and no bias, why dropping LayerNorm&#x…
Read article →RoPE architecture
Deep-dive on RoPE and long-context extensions: rotation math, Position Interpolation, NTK-aware scaling, YaRN, kernel fusion, and eval.
Read article →Sparse attention architecture
Deep-dive on sparse attention patterns: local, strided, global, block, Longformer, BigBird, kernel support, training/serving.
Read article →Speculative decoding architecture
Deep-dive on speculative decoding: why decoding is memory-bandwidth bound, a draft model proposing K tokens, single-pass parallel verification, the re…
Read article →SwiGLU architecture
Deep-dive on the SwiGLU FFN: the SiLU/Swish activation, the two up-projection gate multiplied elementwise and projected down, the two-thirds d_ff resc…
Read article →