LLM architecture type determines suitability, not just size When teams compare LLMs, parameter count and benchmark scores dominate the discussion. Architecture type — decoder-only, encoder-decoder, or encoder-only — matters at least as much for matching a model to a use case, and it carries the deployment constraints that show up months later in the infrastructure bill. These three families are not interchangeable variants of the same thing at different scales. They make different trade-offs about what the model can see, what it can produce, and what it costs to run. The shorthand most teams reach for — “we need an LLM” — collapses three architectures with quite different operational profiles into one decision. We see this regularly when reviewing systems where a decoder-only model is doing the work of what should have been a BERT-family encoder, paying generative-model inference costs to produce a classification label. Decoder-only models Examples: GPT-4, Llama 3, Claude, Gemini, Mistral. The decoder-only architecture generates text autoregressively: each output token is predicted from all previous tokens. The model sees only past context through a causal attention mask. This is the dominant architecture for general-purpose LLMs, and the ecosystem of tooling — RLHF pipelines, instruction-tuning datasets, serving stacks like vLLM and TensorRT-LLM — is built around it. Strengths: natural fit for open-ended generation, instruction following, reasoning, code generation, and the prompting interface most teams now expect. Scales well with parameters and data. Limitations: not inherently suited for tasks requiring bidirectional understanding of a fixed input (classification of full documents, span extraction). Inference latency scales with output length because each token requires a forward pass and an updated KV cache. Encoder-decoder models Examples: T5, FLAN-T5, mT5, BART. The encoder processes the input bidirectionally, producing a contextualized representation of every input token. The decoder generates the output autoregressively from that representation, attending both to its own previous tokens and to the encoder’s output via cross-attention. Strengths: well-suited for tasks with a clear input → output transformation: summarization, translation, question answering from a given context, structured extraction with a defined output schema. The encoder’s bidirectional attention captures input semantics more fully than causal attention when full input comprehension matters more than open-ended continuation. Limitations: less amenable to few-shot prompting than decoder-only models. The ecosystem of production-ready instruction-tuned encoder-decoder checkpoints is smaller, and many tasks require per-task fine-tuning to reach competitive quality. Encoder-only models Examples: BERT, RoBERTa, DeBERTa, sentence-transformers. Encoder-only models process input bidirectionally and produce contextualized representations. They do not generate text — they represent it. Strengths: fast inference, small footprint, and excellent quality for classification, named entity recognition, semantic search (via embedding generation), and any task where understanding the input is the goal. Limitations: no text generation. Most non-trivial tasks require fine-tuning or a task-specific head, rather than prompting. Architecture comparison Architecture Generation Classification Embedding Inference cost Best for Decoder-only Excellent Possible With pooling High (KV cache, O(n²) per token) General tasks, instruction following, RAG generation Encoder-decoder Structured With head Limited Medium Translation, summarization, structured extraction Encoder-only Not supported Excellent Excellent Low Search, classification, NER Treat the table as a starting filter, not a verdict. The right choice depends on output length, latency budget, dataset size for fine-tuning, and how stable the task definition is. How does architecture choice affect deployment cost? Architecture type directly determines inference cost through two mechanisms: memory footprint and computational complexity per token. Decoder-only models generate tokens autoregressively, and each new token attends to every previous token — an O(n²) attention cost that grows with sequence length even with KV caching. Encoder-decoder models compute the encoder output once and reuse it during decoding, which makes them more efficient when input is long relative to output. For summarization (long input, short output) we have measured a 40–60% lower inference cost for T5-family models versus GPT-family models on inputs above 2,000 tokens on the same hardware (observed pattern across recent engagements; not a published benchmark). The crossover, where decoder-only becomes cheaper, only appears when output length exceeds input length — uncommon in the production workloads we see. Encoder-only models occupy a different cost tier entirely. They process the input in a single forward pass without autoregressive generation, which is operationally 5–10× cheaper per inference than generative models for classification, embedding, and extraction (observed pattern across our document-processing deployments). Using a decoder-only model for these tasks pays for generation capability that is never used at inference time. The memory footprint gap also shapes hardware choices. A 7B-parameter decoder-only model needs roughly 14 GB of GPU memory at FP16 for weights alone, before activations and KV cache. An encoder-only model with strong understanding capability — DeBERTa-v3-large at around 304M parameters — fits in under 1 GB. Where GPU memory is the binding constraint, architecture selection determines how many models can be co-located on a single device. What is our architecture selection framework? Our default sequence is straightforward: start with an encoder-only model for classification and extraction, use an encoder-decoder for input-to-output transformations like translation and summarization, and reserve decoder-only for open-ended generation where the output length and content are unpredictable. Task-architecture matching reduces inference cost by roughly 30–70% compared with defaulting to decoder-only for every task (observed range across our deployments; the actual figure depends on traffic mix and sequence-length distribution). A few practical signals we use when the choice is not obvious: If the output is a label, a span, or a vector, the model should be encoder-only unless there is a hard reason otherwise. If the output is constrained text derived from a specific input (translate this, summarize this, fill this schema), encoder-decoder is usually the cheaper and more controllable option. If the output is open-ended, dialog-shaped, or requires reasoning across loosely structured context, decoder-only earns its cost. If the task definition is still moving week to week, decoder-only with prompting is the lower-friction starting point even when it is operationally expensive — you can replace it with a fine-tuned encoder model once the definition stabilises. This is the same lens we apply when evaluating whether an “LLM” is even the right family for a problem. The architecture taxonomy beyond language models — diffusion models, GANs, VAEs, autoregressive image and audio models — opens further options when the output is not text at all. We explore that wider landscape in what types of generative AI models exist beyond LLMs. FAQ What kinds of generative AI models exist beyond LLMs, and when does each architecture make sense? Beyond decoder-only LLMs sit encoder-decoder transformers for input-to-output transformations, encoder-only models for understanding tasks, and non-text families like diffusion models, GANs, VAEs, and autoregressive audio models. Each fits a different shape of input, output, and data regime — the question is what the model needs to produce, not whether it counts as “an LLM”. How do GANs, diffusion models, VAEs, and autoregressive models differ in what they generate and what they need to train? GANs train two networks adversarially and can produce sharp samples from relatively small datasets but are unstable to train. Diffusion models learn to reverse a noising process and currently dominate high-fidelity image generation, with higher compute cost. VAEs learn a structured latent space useful for controllable generation. Autoregressive models — including LLMs — generate one token or patch at a time and scale well with data and parameters. When is an LLM the wrong default for a generative use case? When the output is not free-form text. Classification, embedding, span extraction, image generation, and audio synthesis all have purpose-built architectures that are cheaper to run and often higher quality than coercing an LLM into the role. The wrong default appears as inference bills that scale with token count for tasks whose output is a single label. Which generative architecture fits a small-data, high-fidelity image problem? GANs and conditional diffusion models with transfer learning from a pre-trained backbone are usually the strongest options. The choice depends on whether sharpness or diversity matters more, and on how much compute is available for training. How do I match a generative model to a use case before committing to an architecture? Define the input modality, the output modality, the output length distribution, the latency budget, and the available training data. Then pick the architecture family whose inductive bias matches that shape, rather than starting from a favoured model and shaping the task to fit it. What are realistic examples of generative AI in production beyond chatbots? Document summarization with encoder-decoder transformers, semantic search and reranking with encoder-only embedders, image inpainting and synthetic data generation with diffusion models, voice synthesis with autoregressive audio models, and structured extraction pipelines that combine a small encoder model with an LLM only where free-form reasoning is unavoidable.