Resources / Tutorials / page 6

Tutorials

116 articles

Articles, page 6

101-116 of 116
  1. Self-Consistency Decoding: How Sampling Diverse Reasoning Paths Eliminates Single-Trajectory Fragility in LLMs

    Self-Consistency Decoding: How Sampling Diverse Reasoning Paths Eliminates Single-Trajectory Fragility in LLMs Standard inference pipelines in large language models rely on greedy decoding or low-temperature sampling to generate answers. For tasks requiring direct factual recall or basic classification, greedy token selection generates fluent and accurate outputs. However, when large models are tasked with complex multi-step reasoning, greedy generation exhibits severe structural fragility. In

    AI
    6 min read
  2. Rejection Sampling Fine-Tuning: How Filtering Model Outputs by Reward Replaced RLHF Complexity

    Rejection Sampling Fine-Tuning: How Filtering Model Outputs by Reward Replaced RLHF Complexity Rejection sampling fine-tuning (RAFT) has emerged as the practical workhorse of LLM alignment. While PPO-based RLHF dominated early literature, production systems from Llama 2 to DeepSeek-R1 rely on a simpler loop: generate multiple completions per prompt, score them with a reward model, keep the best, and fine-tune on the filtered data. The technique converts the reinforcement learning problem into s

    Education
    4 min read
  3. Data Filtering and Deduplication in Large Language Models: How Heuristics, MinHash LSH, SemDeDup, and Quality Classifiers Curate Pre-Training Corpora

    Data Filtering and Deduplication in Large Language Models: How Heuristics, MinHash LSH, SemDeDup, and Quality Classifiers Curate Pre-Training Corpora Pre-training data quality governs the downstream reasoning, factual accuracy, and sample efficiency of foundation large language models (LLMs). While early pre-training efforts relied on uncurated or lightly processed dumps from web repositories like Common Crawl, modern state-of-the-art models depend on multi-stage data curation pipelines that fi

    AI
    10 min read
  4. SwiGLU and Gated Linear Units: How Bilinear Gating Replaced Standard FFNs in Modern LLMs

    Every modern open-weight and frontier large language model, from Meta's LLaMA 3 and Mistral to Alibaba's Qwen 2.5 and DeepSeek-V3, has abandoned the standard two-layer Feed-Forward Network (FFN) originally introduced in the 2017 Transformer architecture. In its place, model architectures have converged almost universally on Gated Linear Units (GLU), specifically the Swish-Gated Linear Unit (SwiGLU). While the original Transformer relied on standard non-linear activations like ReLU or Gaussian E

    AI
    6 min read
  5. Chinchilla Scaling Laws: How Compute-Optimal Pre-Training and Inference Economics Reshaped LLM Architecture

    Before 2022, frontier artificial intelligence labs scaled large language models primarily by increasing parameter counts while keeping training dataset sizes relatively static. OpenAI's 2020 GPT-3 model trained 175 billion parameters on 300 billion tokens. DeepMind's 2021 Gopher trained 280 billion parameters on 300 billion tokens, and Megatron-Turing NLG scaled to 530 billion parameters on 270 billion tokens. These allocation decisions followed early empirical scaling laws that suggested parame

    Education
    6 min read
  6. Linear Attention and Retentive Networks: How Recurrent Duals and Chunkwise Tiling Eliminate the Quadratic Bottleneck

    Linear Attention and Retentive Networks: How Recurrent Duals and Chunkwise Tiling Eliminate the Quadratic Bottleneck Autoregressive large language models built on standard multi-head self-attention face two fundamental scaling ceilings: quadratic compute and memory complexity during pre-training, and linearly expanding key-value (KV) cache memory footprints during autoregressive generation. While optimizations such as FlashAttention reduce memory access overheads and Grouped-Query Attention (GQ

    Architecture
    8 min read
  7. Process Reward Models: How Step-by-Step Supervision and Search Drive LLM Reasoning

    When large language models tackle complex multi-step reasoning (such as formal mathematics, algorithm synthesis, or multi-hop logic), evaluating only the final answer creates a severe credit assignment bottleneck. An outcome-based verifier can confirm whether a final numerical result is correct, but it cannot determine whether the underlying derivation was logically sound or reached the right answer through compounding hallucinations and lucky cancellations. Process Reward Models (PRMs) resolve

    AI
    7 min read
  8. Context Window Extension in Large Language Models: How Position Interpolation, YaRN, and LongRoPE Scale Sequence Lengths

    Large language models are bounded during pretraining by a fixed sequence length, typically between 2,048 and 8,192 tokens. When standard autoregressive transformers attempt to process sequences beyond this pretraining context window, performance degrades immediately. Perplexity rises sharply and the model loses coherence within a few dozen tokens past the training boundary. Extending this context window by training from scratch on long sequences is computationally prohibitive due to the quadrat

    AI
    6 min read
  9. Attention Sinks in Large Language Models: How StreamingLLM Prevents Perplexity Explosion in Infinite Sequences

    Autoregressive large language models are trained on fixed context windows, yet real-world applications (such as continuous coding agents, live conversation servers, and document streaming pipelines) require models to process unbounded token sequences. When standard LLMs operate on sequences longer than their pre-training context length, computational complexity and key-value (KV) cache memory scale quadratically and linearly, respectively. A seemingly natural workaround is sliding window attent

    AI
    5 min read
  10. OpenAI Launches Dedicated ChatGPT for Teens with Study Modes and Model Spec Guardrails

    OpenAI has introduced ChatGPT for Teens, a dedicated environment for users aged 13 through 17 that combines educational scaffolding tools with reinforced safety constraints and parental controls. The rollout automatically routes users into the teen environment if they register as 13 to 17 years old or if OpenAI's automated age-prediction classifier estimates they fall into that demographic. Children under the age of 13 remain prohibited from the platform under OpenAI's standard terms of service

    OpenAI
    2 min read
  11. In-Context Learning in Large Language Models: How Induction Heads and Attention Circuits Learn Without Weight Updates

    Autoregressive large language models demonstrate the ability to adapt to new tasks, follow few-shot demonstrations, and execute algorithmic patterns entirely within their context windows. Unlike traditional fine-tuning, in-context learning occurs at inference time with frozen model parameters, leaving weights completely unchanged ($\Delta \theta = 0$). For several years following the scaling demonstrations in GPT-3, the internal mechanism governing in-context learning remained an empirical blac

    AI
    6 min read
  12. State Space Models in Large Language Models: How Mamba, S4, and Selective Recurrence Challenge Transformer Attention

    Modern large language models rely almost universally on the Transformer architecture. However, the core mechanism powering Transformers, softmax multi-head self-attention, exhibits fundamental scaling limitations. Specifically, standard self-attention requires quadratic time and memory complexity relative to sequence length during prefilling, alongside a linear memory expansion for the key-value (KV) cache during autoregressive token generation. To circumvent these computational bottlenecks, re

    AI
    6 min read
  13. Rotary Position Embeddings: How Geometry Solved Long Context in Modern LLMs

    Rotary Position Embedding (RoPE) has become the standard positional encoding mechanism across modern large language models, including Meta's Llama series, Mistral, Qwen, and DeepSeek. Unlike earlier techniques that added positional vectors directly to token representations or modified attention matrices with relative distance penalties, RoPE encodes position through geometric rotations in the complex plane. This design enables models to compute relative token distances while processing individu

    AI
    6 min read
  14. What Is a KV Cache? The Memory Bottleneck Behind LLM Serving

    What Is a KV Cache? The Memory Bottleneck Behind LLM Serving Every token a large language model generates costs more than compute. It costs memory. The mechanism that stores the model's working state across a generation is called the KV cache, and managing it well is what separates a serving system that feels fast from one that stalls. This explainer covers what the KV cache is, why it wastes memory, and how the PagedAttention algorithm from Berkeley's vLLM project reshaped how it is handled.

    AI
    4 min read
  15. Scammers are enrolling fake students at US community colleges and using AI to collect financial aid

    Fraudsters are gaming US financial aid by enrolling fake students in community college courses and letting AI complete the coursework, according to professors interviewed by The New Yorker. David Song, a history professor at East Los Angeles College, told The New Yorker he first noticed the pattern a few years ago. Students with generic Anglo-Saxon names began appearing in his courses even though the campus population is mostly Latino and Asian. Their explanations did not add up, including clai

    AI
    1 min read