large language models

The design, training, and deployment of transformer-based sequence models that predict tokens (language modeling) and serve predictions (inference), involving tokenization, architectures like Transformers, pretraining/fine-tuning, decoding strategies (beam/greedy/sampling), and production techniques such as quantization, batching, and accelerator-optimized runtimes (TensorRT, ONNX, Triton).

largelanguagemodels

12-Month Skill Trend

Momentum and market value over time
Trending
Score
+20 in 12 mo
96
12 mo agoNow
Career
Value
+$12K in 12 mo
$42K/year
12 mo agoNow

Recommended Survey Paper

Quick overview of the field
View more

Must-Read Papers

Most classic and influential ideas
View more

Introduction to Sequence Modeling with Transformers

Feb 26, 2025
JK
Joni-Kristian Kämäräinen
🏛️ Tampere University

This work clarifies the functional boundaries and necessity of core Transformer components—tokenization, embedding/un-embedding, masking, positional encoding, and padding—addressing widespread conceptual ambiguity in their mechanistic roles. Targeting ML engineers, we propose an incremental, invertibility-based analytical framework: using binary (0/1) sequences as probes, we systematically introduce each component via a “zero-one construction” and empirically validate its irreplaceability in the encode-decode pipeline. Implemented lightweightly in PyTorch, our framework supports manual attention matrix construction, explicit positional embedding injection, and interpretable mask design. Experiments demonstrate significantly improved conceptual accuracy among learners. Notably, we provide the first empirical verification that, in the absence of self-attention, positional encoding combined with padding alone suffices for basic length-aware tasks.

Incremental modeling with simple sequencesRole of tokenization, embedding, masking in transformersUnderstanding transformer architecture components

Toward a Theory of Tokenization in LLMs

Apr 12, 2024
NR
Nived Rajaraman
🏛️ University of California, Berkeley

Why do large language models (LLMs) require tokenization, and why does character-level modeling lead to performance degradation in Transformers? Method: The authors construct a *k*-order Markov data source and rigorously analyze the cross-entropy of Transformers under character-level versus token-level modeling, grounding the analysis in information-theoretic modeling capacity. They establish a provable relationship between tokenization strategies and the accuracy of sequence probability estimation. Contribution/Results: Theoretically, without tokenization, Transformers collapse to modeling only unigram character distributions, failing to capture higher-order dependencies; with appropriate tokenization, learning single-step token predictions suffices to near-optimally model the source distribution. Empirically, tokenization significantly reduces cross-entropy on high-order Markov sources. This work provides the first rigorous information-theoretic and probabilistic justification that tokenization is a necessary condition for overcoming the fundamental limitations of character-level Transformer modeling.

Compare transformers' learning with and without tokenization on simple dataJustify tokenization use by analyzing cross-entropy loss in transformersStudy tokenization's role in transformer performance on Markov processes

Parallel Token Prediction for Language Models

Dec 24, 2025
FD
Felix Draxler
🏛️ University of California, Irvine | Chan-Zuckerberg Initiative | Pyramidal AI | AI in Science Institute

Autoregressive decoding in large language models incurs high latency, and existing multi-token prediction methods rely on strong independence assumptions that limit modeling fidelity. Method: We propose Parallel Token Prediction (PTP), the first framework to internalize the sampling process into the model architecture, enabling joint generation of multiple semantically coherent tokens in a single Transformer forward pass while strictly preserving expressivity over any autoregressive distribution—thereby eliminating restrictive independence assumptions. PTP integrates inverse autoregressive training with explicit sampling modeling and supports both teacher-free and distillation-based training. Results: Evaluated on Vicuna-7B, PTP achieves 4.12 average accepted tokens per speculative step on Spec-Bench, maintains full modeling capability for long-sequence generation, and attains state-of-the-art performance in speculative decoding.

Avoids restrictive independence assumptions in token predictionEnables parallel generation without loss of modeling powerReduces latency bottleneck in autoregressive decoding

TokenFormer: Rethinking Transformer Scaling with Tokenized Model Parameters

Oct 30, 2024
HW
Haiyang Wang
🏛️ Max Planck Institute for Informatics | Peking University | Google

Scaling Transformer models is prohibitively expensive due to fixed-parameter linear projection layers; architectural modifications necessitate full retraining. Method: We propose TokenFormer, the first architecture introducing *parameter tokenization*, which models model parameters as learnable tokens and replaces all linear layers with token-parameter self-attention—unifying parameter and input token representations in a shared latent space. Contribution/Results: Our method enables zero-shot, progressive parameter expansion without retraining, overcoming classical scaling bottlenecks. Without altering network topology, we scale model parameters from 124M to 1.4B while matching the performance of fully trained baselines, achieving substantial training cost reduction. The code and models are publicly released.

Dependence on fixed parameters requiring full retrainingHigh computational cost of scaling Transformer modelsLack of efficient progressive scaling for large models

Next-token prediction capacity: general upper bounds and a lower bound for transformers

May 22, 2024
LM
Liam Madden
🏛️ University of British Columbia

This paper investigates the maximum interpolatable context length—the largest sequence length for which a decoder-only Transformer can exactly interpolate the next-token probability distribution in next-token prediction. Method: We derive tight asymptotic upper and lower bounds (within constant factors) on this capacity, covering both arbitrary true distributions and empirical distributions. Our analysis leverages the injectivity of self-attention, information-theoretic arguments, parameter-complexity analysis, and numerical experiments. Results: We prove that a single-layer multi-head Transformer achieves the lower bound; the bounds are tight up to constant factors; and the minimal memory parameter count suffices for convergence to the entropy lower bound. This work provides the first rigorous, quantitative characterization of the modeling capacity of Transformers in terms of interpolatable context length.

Analyzes memorization requirements for optimal trainingEstablishes bounds on transformer's next-token prediction capacityProves interpolation limits for decoder-only transformers

Latest Papers

What's happening recently
View more

This work addresses the rapid yet often unstructured evolution of Transformer-based language models by proposing a practical, four-dimensional evaluation framework to distinguish substantive advances from incremental improvements and to guide cross-domain deployment. The framework holistically assesses model architecture, alignment methodologies, energy-efficiency trade-offs, and domain adaptability, encompassing key techniques such as encoder/decoder variants, long-context modeling, mixture-of-experts (MoE), retrieval augmentation, instruction tuning, and preference optimization. Through empirical analysis across vertical domains—including healthcare, finance, and law—the study quantifies the trade-offs between model scale and computational cost, redefines what constitutes an “advanced” model in real-world settings, identifies critical research gaps, and offers actionable guidelines for model selection and deployment.

architectural comparisondomain applicationsmodel evaluation

Pool Me Wisely: On the Effect of Pooling in Transformer-Based Models

Oct 02, 2025
SE
Sofiane Ennadir
🏛️ King AI Labs | Microsoft Gaming | NXAI GmbH | Kreditz AB | Amazon

The impact of pooling operations on representational capacity and task performance in Transformer models has long been overlooked. Method: We establish, for the first time, theoretical expressivity bounds for pooling methods and propose a unified analytical framework that characterizes how distinct pooling strategies—e.g., [CLS], mean, and attention-weighted pooling—affect input discriminability, contextual modeling capability, and optimization dynamics. Our analysis spans three modalities—NLP, computer vision, and time series—and encompasses multiple attention variants across diverse downstream tasks. Contribution/Results: Empirical evaluation reveals that pooling choice significantly influences accuracy, gradient sensitivity, and convergence stability. Crucially, we identify task-agnostic, high-performing pooling patterns that generalize consistently across modalities and tasks. This work provides both theoretical foundations and practical guidelines for task-aware pooling design in Transformer architectures.

Analyzing pooling's impact on Transformer model expressivity and capacityEvaluating pooling strategies across vision, NLP, and time-series tasksProviding theoretical and empirical guidance for pooling mechanism selection

This study systematically uncovers the scalability bottlenecks and performance walls imposed by the O(n²) complexity of the attention mechanism in Transformer architectures during real-world deployment. Through a large-scale empirical evaluation of loading time, memory consumption, and computational efficiency across 118 models and seven architectural variants under varying sequence lengths, the work provides the first quantitative evidence of performance degradation: task success rates plummet to 44.9% at sequence length 1024 and drop to zero at 2048. The paper introduces a novel deployment-oriented benchmarking methodology and demonstrates that compressed models can achieve over 50 times the parameter efficiency of large generative models, offering critical insights for efficient Transformer deployment.

attention complexitydeployment constraintsperformance walls

This work addresses the GPU memory bottleneck in Transformer models caused by high parameter and activation memory demands during training and inference. The authors propose a novel parallelism strategy that integrates tensor parallelism (TP) and sequence parallelism (SP) along the same device axis, enabling each device to simultaneously shard both model weights and input sequences. By leveraging broadcast-based weight sharding with key-value exchange in attention layers and ring-based weight passing with local accumulation in gated MLPs, the method achieves dual compression of both parameter and activation memory. This approach significantly reduces per-device memory consumption, outperforming conventional TP, SP, and their hybrid variants. It demonstrates superior hardware adaptability and scaling efficiency under long-context and memory-constrained settings, while seamlessly integrating with pipeline and expert parallelism.

memory-efficientmodel trainingsequence parallelism

This study systematically evaluates the practical benefits of pretraining in DNA language models for downstream genomic tasks and investigates the effectiveness of Byte Pair Encoding (BPE) tokenization. By comparing Transformer-based architectures (e.g., DNABERT2) with convolutional models (e.g., ConvNova) across a range of genomic fine-tuning benchmarks, the work provides the first empirical analysis of whether pretraining is necessary and how BPE compares to traditional k-mer representations. The findings indicate that the performance gains conferred by pretraining are limited and that BPE does not consistently outperform k-mer tokenization across all tasks. These results offer critical empirical insights for the design of foundational models in genomics, challenging prevailing assumptions about the universal advantages of large-scale pretraining and subword tokenization in this domain.

BPE tokenizationDNA language modelsfine-tuning

Hot Scholars

WZ

Wentao Zhang

Institute of Physics, Chinese Academy of Sciences
photoemissionsuperconductivitycupratehtsc
DT

Dacheng Tao

Nanyang Technological University
artificial intelligencemachine learningcomputer visionimage processing
PS

Philip S. Yu

Professor of Computer Science, University of Illinons at Chicago
Data miningDatabasePrivacy
LZ

Linfeng Zhang

DP Technology; AI for Science Institute
AI for Sciencemulti-scale modelingmolecular simulationdrug/materials design
KG

Kun Gai

Senior Director & Researcher, Alibaba Group
Machine LearningComputational Advertising