Whole Word Masking for BERT Pretraining
Explains how Whole Word Masking improves BERT pre-training by masking complete words instead of subword tokens.
409 items · Page 7 of 9
Create a free account to keep your reading organized, join thoughtful discussions, and get more from every chapter.
Free to join · Takes less than a minute
Why
I created this space so readers can learn together, ask questions, and make sense of difficult ideas.

Explains how Whole Word Masking improves BERT pre-training by masking complete words instead of subword tokens.
Explains how masked language modeling enables bidirectional context understanding. Topics include the MLM objective, 15% masking rate, 80-10-10 strategy.
Explains how memory-augmented transformers extend context beyond attention limits using external key-value stores, retrieval mechanisms.
Explains how causal language modeling trains AI to predict the next token. Topics include autoregressive factorization, cross-entropy loss, causal masking.
Explains how Transformer-XL uses segment-level recurrence to extend effective context length.
Explains how Position Interpolation extends transformer context windows by scaling position indices to stay within training distributions.
Examines the fundamental barriers limiting transformer context windows, including quadratic memory scaling, position encoding extrapolation failures.
Explains why the first tokens in transformer sequences absorb excess attention weight, how this causes streaming inference failures.
NTK-aware scaling extends transformer context windows by adjusting rotary frequencies. Covers position preservation, longer sequences, and tradeoffs.
Covers FlashAttention's tiled computation and online softmax algorithms. Topics include GPU memory hierarchy, CUDA kernel basics.
Explains how FlashAttention achieves 2-4x speedups by restructuring attention computation. Topics include GPU memory hierarchy, tiling for SRAM.
Explains how YaRN extends LLM context length through wavelength-based frequency interpolation and attention temperature correction.
Explains how linear attention achieves O(nd²) complexity by replacing softmax with kernel functions.
Explains how sliding window attention reduces transformer complexity from quadratic to linear.
Explains how Longformer combines sliding window and global attention to process documents of 4,096+ tokens with O(n) complexity instead of O(n²).
Implement sparse attention patterns including local windows, strided attention, and block-sparse methods.
BigBird combines sliding-window, global, and random attention to reach linear complexity. Covers its guarantees and use with long documents.
Global tokens create communication hubs in sparse attention, reducing path length and helping efficient transformers exchange information across long documents.
Explains why self-attention has O(n²) complexity, how memory and compute scale quadratically with sequence length.
Covers encoder-decoder transformer architecture that powers T5 and machine translation. Topics include cross-attention mechanism.
Covers decoder-only transformers powering GPT, Llama, and modern LLMs. Topics include causal masking, autoregressive generation, KV caching.
Design transformer architectures by understanding the key hyperparameters: model depth, width, attention heads, and FFN dimensions.
Covers cross-attention, the mechanism that bridges encoder and decoder in sequence-to-sequence transformers.
Explains how weight tying reduces transformer parameters by sharing the input embedding and output projection matrices.
Explains how encoder-only transformers like BERT use bidirectional self-attention for text understanding.
Explains how GLUs transform feed-forward networks through multiplicative gating. Topics include SwiGLU, GeGLU, and the parameter trade-offs that power LLaMA.
Compare activation functions in transformer feed-forward networks: ReLU's simplicity and dead neuron problem, GELU's smooth probabilistic gating for BERT.
Assemble transformer blocks by combining residual connections, normalization, attention, and feed-forward networks.
Explains how layer normalization enables stable transformer training by normalizing.
Explains how feed-forward networks provide nonlinearity in transformers, with 2-layer architecture, 4x dimension expansion, parameter analysis.
Compare pre-norm and post-norm transformer blocks. Covers layer-normalization placement, gradient flow, training stability, and model depth.
Explains how residual connections solve the vanishing gradient problem in deep networks. Topics include the math behind skip connections, gradient highways.
Covers RMSNorm, the simpler alternative to LayerNorm used in LLaMA, Mistral, and modern LLMs.
Covers sinusoidal position encoding, the deterministic method that gives transformers positional awareness.
Explains why self-attention is blind to word order and what properties positional encodings need.
Explains how RoPE encodes position through vector rotation, making attention scores depend on relative position.
Explains how QKV projections enable transformers to learn flexible attention patterns through specialized query, key, and value representations.
Compare transformer position encoding methods including sinusoidal, learned embeddings, RoPE, and ALiBi.
Explains how relative position encoding improves transformer generalization by encoding token distances rather than absolute positions.
How GPT and BERT encode position through learnable parameters. Topics include embedding tables, position similarity, interpolation techniques.
Explains how ALiBi encodes position through linear attention biases instead of embeddings. Topics include head-specific slopes, extrapolation properties.
Explains how multi-head attention runs multiple attention operations in parallel, enabling transformers to capture diverse relationships like syntax, semantics.
Self-attention has O(n²d) compute and quadratic memory growth. Covers when sparse, linear, and other efficient attention variants reduce those costs.
Covers scaled dot-product attention: how queries and keys compute similarity, why dividing by sqrt(d_k) prevents softmax saturation.
Covers attention masking techniques including padding masks, causal masks, and sparse patterns.
Self-attention relates every token to every other token in a sequence. Covers queries, keys, values, contextual embeddings, masking, and computational cost.
Explains how beam search balances quality and compute in sequence generation, covering greedy decoding limits, length normalization, diverse beam search.
Teacher forcing trains sequence-to-sequence models with ground-truth context. Covers exposure bias, scheduled sampling, and alternatives based on REINFORCE.
Create a free account to keep your reading organized, join thoughtful discussions, and get more from every chapter.
Free to join · Takes less than a minute
Why
I created this space so readers can learn together, ask questions, and make sense of difficult ideas.
