Zenaique

Name a 2026 task where an encoder-decoder transformer still beats a decoder-only LLM

Short answer·Easy·4.0 · 0·~3 min·Asked atNVIDIATcs·Relevant atGoogleMistral AI
Attempt it

Pick one production task where an encoder-decoder transformer is still the right choice in 2026, and explain what specifically makes encoder-decoder a better fit than a decoder-only LLM.

Free · 2 AI evals / day
TL;DR

Speech-to-text. Whisper-style encoder-decoders run the encoder once on the audio, then the decoder cross-attends to that cached encoding at every step: far cheaper than a decoder-only LLM ingesting audio tokens

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine you have a long voice message and you want it written down. An encoder-decoder model is like having one specialist who listens to the whole recording from start to finish and writes a summary on a whiteboard, then a writer who looks at that whiteboard while typing the transcript word by word. The whiteboard is written once and read many times. A decoder-only LLM would be like asking the writer to re-read the entire audio from scratch before each word they type: wasteful when the audio never changes. That's the core reason Whisper and other speech models still beat decoder-only LLMs on cost and latency for transcription, even though decoder-only LLMs in 2026 are technically capable of doing it.

Key concepts

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

The transformer architecture in 2017 came in two flavors: the encoder-decoder (the original 'Attention Is All You Need' shape used for translation) and the decoder-only (GPT, used for left to right generation). For half a decade the field has consolidated around decoder-only LLMs, to the point where new practitioners often assume encoder-decoder is a legacy shape. It is not.

The correct framing for 2026 is that encoder-decoder owns a specific corner of the workload space: tasks where the input is bounded and reused across many decoder steps, where the input modality differs from the output modality, and where unit economics at scale matter more than open-ended generation quality. Speech-to-text is the textbook example, machine translation is the strong second, and bounded structured extraction is the quiet third.

This question is testing whether the candidate has internalized why the split exists in the first place, not just which models use which shape today.

What the encoder-decoder split actually does

An encoder-decoder transformer processes input in two distinct phases. The encoder stack runs once over the input sequence and produces a sequence of hidden states with shape [encoder_seq_len, d_model]. These hidden states encode bidirectional context (every position can attend to every other position during encoding) and they are then frozen for the duration of the query.

The decoder stack generates output autoregressively, one token at a time. Each decoder layer has two attention sub-blocks. Self-attention lets the decoder attend over the tokens it has already generated (masked to be causal). Cross-attention lets the decoder attend over the encoder's hidden states; the encoder hidden states are the K and V, the decoder's own hidden state at the current step is the Q.

The key property: the encoder runs once, the decoder runs many times. The encoder hidden states are computed once at the start of decoding and reused at every subsequent decoder step at zero recompute cost. For a 30-second audio clip that produces a 100-token transcript, the encoder runs once and the decoder runs 100 times against the same cached encoder hidden states.

A decoder-only transformer has no such split. The input and the output sit in one sequence, separated by special tokens. Every decoder step self-attends over the entire prefix, which includes the original input. The KV cache of the input is reused (so the input is not re-encoded), but the per step attention compute over that cached prefix is still paid every step.

Speech-to-text: the canonical 2026 fit
Translation: the strong second fit
The general structural rule
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.
PropertyEncoder-decoderDecoder-only LLM
Input encoding costOnce per queryOnce per query (but in same sequence)
Per-decode-step attentionSelf-attn over text + cross-attn over cached encoder K/VSelf-attn over full audio + text prefix
Cost-per-audio-secondLow (Whisper-class)Multiples higher (audio-LLM)
Best fitBounded input + bounded output (transcription, translation, extraction)Open-ended generation, reasoning, multi-turn chat

Real products, models, and research that use this idea.

  • Whisper-large-v3 is the workhorse open-weight speech-to-text encoder-decoder in 2026; it powers podcast transcription pipelines, call-center analytics, and meeting-summary products.
  • Distil-Whisper is a distilled encoder-decoder variant that runs at roughly 6x the speed of Whisper-large for production transcription at scale.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhy is the audio-token sequence so much longer than the text-token sequence for the same content?
A

Speech tokenizers operate at frame rates of 25-50 Hz on the audio side, while text tokenizers compress to roughly 3-4 characters per token. A 30-second clip of speech becomes ~1500 audio tokens and ~75 text tokens. The 20x ratio is what makes encoder-decoder attractive for transcription.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Claiming decoder-only models have fully replaced encoder-decoders in 2026. They have not. Speech to text, large-batch translation, and bounded-output structured extraction still favor encoder-decoder on cost per token and latency.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Cross-attention in the decoder and how it reuses the encoder's cached hidden states

  • Why audio token sequences are much longer than the resulting text sequences

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Explain scaled dot product attention.
Short answer·Medium