LLM foundations

Architecture
Patterns

Foundational LLM architectures: from transformers and attention mechanisms to mixture of experts and KV-cache optimization.

Architecture Patterns

13 patterns

Transformer Architecture

The foundation model architecture using multi-head self-attention.

foundationattention

Decoder-only Models

GPT-style autoregressive models optimized for text generation.

gptgeneration

Encoder-only Models

BERT-style bidirectional models optimized for understanding tasks.

bertunderstanding

Encoder-Decoder Models

T5-style sequence-to-sequence models for translation and summarization.

t5seq2seq

Mixture of Experts

Sparse activation architecture for scaling model capacity efficiently.

moesparse

Sparse Attention Mechanisms

Reduce quadratic attention complexity for long sequence processing.

efficiencylong-context

KV-Cache Optimization

Cache key-value projections to speed up autoregressive generation.

inferenceoptimization

Architecture Comparison

Compare transformer architectures across use cases and trade-offs.

referencecomparison

State Space Models

Sequence architectures such as Mamba that trade quadratic attention for linear-time recurrence.

ssmlong-contextefficiency

Multimodal Foundation Models

Unified models that reason across text, image, audio, and video instead of stitching separate systems together.

multimodalvisionaudio

Reasoning Models and Test-Time Compute

Architectures that improve performance by allocating more inference-time reasoning to hard problems.

reasoninginferencerl

LLM Inference Serving Systems

Serving-layer architecture behind real-world AI products: paged attention, continuous batching, prefix caching, speculative decoding.

servinglatencycost

Tool-Augmented LLM Systems

Architectures that combine the model with tools, retrieval, execution environments, and standard context interfaces.

toolsmcpagents