Research / page 23

Research

470 articles

Articles, page 23

441-460 of 470
  1. 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
  2. Continuous Batching in Production LLM Serving: Iteration-Level Scheduling, Chunked Prefills, and Throughput Trade-Offs

    Static batching served as the standard execution paradigm for deep learning inference across computer vision and traditional natural language processing for years. In those domains, incoming requests typically feature fixed input dimensions and deterministic execution graphs. Autoregressive large language model serving breaks every assumption underlying static batching. Input prompts vary widely in token length, output generations terminate nondeterministically upon emitting an end-of-sequence t

    LLM
    6 min read
  3. Token Sampling in Large Language Models: How Temperature, Top-k, Top-p, and Min-p Govern Generative Decoding

    Large language models are autoregressive next-token predictors. During inference, the neural network processes an input context and outputs a vector of unnormalized scores, known as logits, across every token in its vocabulary. The mathematical pipeline that converts those raw logits into a single chosen token is the sampling and decoding stage. While model architecture and pre-training weights determine what a model knows, sampling algorithms govern how that knowledge is extracted. Small chang

    AI
    7 min read
  4. Reinforcement Learning from Human Feedback (RLHF): How Reward Models, PPO, and KL Penalties Align LLMs

    Pre-training large language models on internet-scale text corpora equips them with general linguistic patterns, world knowledge, and broad reasoning heuristics. However, pre-training optimizes next-token prediction: $\mathbb{E}_{x \sim \mathcal{D}} [\log P_\theta(x_t \mid x_{<t})]$. A base model trained purely on next-token prediction reflects the entirety of its web corpus, reproducing hallucinations, toxic phrasing, incorrect code, and unhelpful conversational patterns. To transform an uncons

    AI
    8 min read
  5. Mind Viruses: Researchers Demonstrate Self-Propagating Prompts in Multi-Agent LLM Networks

    Researchers affiliated with Anthropic, EPFL, and Carnegie Mellon University have published empirical findings demonstrating how natural-language instructions can act as self-replicating payloads across multi-agent Large Language Model (LLM) networks. The paper, titled Mind Viruses: Self-Propagating Ideas in Multi-Agent LLM Systems, examines how autonomous agents can be persuaded to adopt and transmit goals to other agents through standard conversational interfaces rather than binary exploit code

    AI
    2 min read
  6. Byte-Pair Encoding in Large Language Models: How Tokenizers Compress Text, Shape Context, and Fail

    Large language models do not process strings directly. Before a single attention weight or linear projection executes, incoming text is converted into a sequence of discrete integers known as tokens. The choice and implementation of the tokenization algorithm establish the model's fundamental vocabulary, define the boundaries of its context window, dictate inference speed, and introduce unique behavioral quirks. Across modern transformer architectures, subword tokenization via Byte-Pair Encodin

    AI
    8 min read
  7. LLM-as-a-Judge in Production: Biases, Calibration, and Architectural Trade-Offs

    Automating model evaluation with another language model (the LLM-as-a-judge paradigm) has become the standard mechanism for continuous integration, regression testing, and RLHF alignment across production AI pipelines. Traditional n-gram metrics such as BLEU and ROUGE fail to capture semantic accuracy, stylistic nuance, or complex reasoning, while human evaluation remains too slow and expensive for high-frequency deployment cycles. However, treating an LLM as an impartial arbiter introduces sig

    AI
    5 min read
  8. Weight Quantization in Large Language Models: How GPTQ, AWQ, and SmoothQuant Compress Neural Networks

    Weight Quantization in Large Language Models: How GPTQ, AWQ, and SmoothQuant Compress Neural Networks Serving large language models in production requires balancing GPU memory footprint, memory bandwidth limits, and computational throughput. A standard 70-billion parameter transformer stored in 16-bit floating-point (FP16 or BF16) requires roughly 140 gigabytes of high-bandwidth memory (HBM) merely to hold its parameters. This memory footprint exceeds the capacity of a single 80GB GPU before ac

    AI
    9 min read
  9. Grouped-Query Attention: How Head Sharing Slashed KV Cache Memory and Scaled LLM Serving

    Serving large language models at scale presents a fundamental hardware bottleneck: autoregressive decoding is bound by memory bandwidth rather than compute. While the initial prompt processing phase (prefill) operates as compute-bound matrix multiplications, token-by-token generation requires loading billions of cached attention states from GPU High-Bandwidth Memory (HBM) to on-chip SRAM for every single generated token. Multi-Head Attention (MHA), introduced in the foundational Vaswani et al.

    AI
    6 min read
  10. Model Context Protocol (MCP) in Production: Architecture, Security Boundaries, and Latency Overheads

    As autonomous language model agents transition from experimental chat interfaces into enterprise production infrastructure, the architectural bottleneck has shifted from raw model reasoning to external environment integration. In early agent implementations, connecting an LLM to external systems required bespoke tool definitions, vendor-specific function schemas, and custom API wrappers. Every framework maintained its own incompatible tool-calling abstraction, fragmenting integrations across age

    AI
    6 min read
  11. FlashAttention: How IO-Aware Tiling and Online Softmax Solved Transformer Memory Bottlenecks

    Standard multi-head attention is the fundamental computational primitive of modern autoregressive language models. While mathematically straightforward, the operation introduces a severe operational bottleneck as context windows scale. Naive implementations of scaled dot-product attention exhibit quadratic memory complexity $O(N^2)$ and quadratic memory access costs, bounding sequence lengths and leaving modern GPU tensor cores severely underutilized. FlashAttention, introduced by Tri Dao, Dani

    AI
    7 min read
  12. LLM Model Routing and Cascades: Architecture, Economics, and Quality Trade-Offs

    In modern enterprise AI systems, uniform model dispatch, sending all incoming user traffic to a single frontier large language model, is one of the most common architectural inefficiencies. Frontier models like GPT-4o and Claude 3.5 Sonnet provide industry-leading reasoning and code generation capabilities, but their inference costs range between $2.50 and $15.00 per million tokens. Conversely, smaller open-weights or distilled models, such as Llama 3.1 8B or GPT-4o-mini, execute at a fraction o

    AI
    6 min read
  13. Low-Rank Adaptation (LoRA): How Matrix Decomposition Made LLM Fine-Tuning Accessible

    Full-parameter fine-tuning of modern foundation models requires substantial compute and memory infrastructure. Adapting an open-weight 70-billion-parameter model using standard 16-bit precision and first-order adaptive optimizers like AdamW demands well over 1 terabyte of GPU memory. Low-Rank Adaptation (LoRA) bypassed this hardware bottleneck by framing task-specific weight updates as low-rank matrix decompositions. By freezing pre-trained weights and training small auxiliary rank decompositio

    AI
    6 min read
  14. Direct Preference Optimization: How Implicit Reward Modeling Simplified LLM Alignment

    Direct Preference Optimization (DPO) has emerged as a cornerstone of post-training alignment across modern open and proprietary language models, including Meta's Llama series, Mistral, and Qwen. While early alignment pipelines relied on complex reinforcement learning loops with separate reward models, DPO reformulates the preference optimization problem into a single, closed-form classification objective. By demonstrating that a language model implicitly defines its own reward function, DPO eli

    AI
    7 min read
  15. Speculative Decoding in Production: Architecture, Economics, and Serving Trade-Offs

    Standard autoregressive large language model (LLM) generation produces one token per forward pass. Because modern inference architectures must read tens of gigabytes of model weights from high-bandwidth memory (HBM) into SRAM to process each solitary token at low batch sizes, generation is strictly memory-bandwidth bound rather than compute bound. Speculative decoding alters this hardware equation. By pairing a fast draft mechanism with parallel verification by the primary target model, inferen

    LLM
    6 min read
  16. 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
  17. How Mixture of Experts Works: Sparse Gating, Token Routing, and Load Balancing

    Large language models face a fundamental scaling trade-off: as parameter counts grow to absorb more world knowledge, the floating-point operations (FLOPs) required per token increase proportionally. In a standard dense Transformer, every single parameter participates in processing every incoming token. Mixture of Experts (MoE) decouples total model capacity from per-token compute cost. By replacing dense feed-forward layers with a dynamic pool of specialized sub-networks ("experts") and routing

    AI
    6 min read
  18. Researchers find that changing text color can hijack a vision-language model's reasoning

    A new research collaboration has found that the color, contrast, and brightness of text can quietly steer the outputs of vision-language models (VLMs), causing them to misread meaning and reach different conclusions without any change to the words themselves. The authors say their experiments provide a systematic analysis of how low-level visual styling of text distorts the semantic representations inside a VLM's vision encoder, and how those shifts show up as behavioral changes across both sub

    AI
    1 min read
  19. Study finds RL for reasoning changes only a few tokens, and you can copy the effect

    A new analysis of reinforcement learning for LLM reasoning suggests the field's biggest gains come from a surprisingly small change. RL is not rewriting how models think. It is nudging a tiny slice of the output. What the researchers measured Across several model families and common methods like GRPO and PPO, reinforcement learning reranks only 1.0 to 4.1 percent of tokens. The token it promotes is almost always already one of the base model's top five choices. Training, in other words, pushe

    AI
    1 min read
  20. DeepSeek V4 Flash tops charts but fails half its real agent tasks

    DeepSeek's V4 Flash has become the most-used AI model on OpenRouter and one of the highest-rated open-weight models available. In real agent tests, though, it finished barely more than half of the jobs it was given. The gap between leaderboard and workplace is the story. What Composio found The integration company Composio ran V4 Flash through eight agent harnesses, including Claude Code, Codex, and OpenCode, on 30 deliberately hard multi-step tasks. The tasks used live tools: Gmail, GitHub,

    AI
    2 min read