In one line: With size, data, data order and recipe held fixed (six pairs, 17M to 1B, single runs), native encoders beat their paired decoders on MNLI and MS MARCO and decoders win the generative average at every size. Training on the other objective for 2.5% of pretraining leaves the classification gap open at every size and the generation gap open from 150M up (level up to 68M), while on retrieval the converted decoder ends within noise of the encoder at 17M and 1B. The largest size ratio at which a native encoder beats a native decoder is about 2.7x, not an order of magnitude.
How far to trust it: Believe the direction: with data, order and recipe held fixed, encoders win classification and retrieval and decoders win generation, at every size. Treat the size of the gaps as provisional (single runs, no error bars), the retrieval claim as within noise at 1B, the 1B generation gap as measured on a third of the data and a third of the adaptation budget, and the SciQ and SIQA nuance as a table mix-up. The evidence, judged.
The idea in one sentence: train an encoder and a decoder as an exact pair (same size, data, data order and recipe; only the attention mask and the objective differ) at six sizes from 17M to 1B, then convert each into the other with 2.5% more training; the encoder wins classification and retrieval and the decoder wins generation at every size, a native encoder beats decoders up to about 2.7 times its size, and the conversion does not close the classification gap at any size or the generation gap from 150M up, while on retrieval it brings a decoder to within noise of the encoder at the smallest and largest sizes.
The figure: every model of the suite drawn to scale, one slab per layer, each slab as wide as the model's hidden size (Table 1), then the paper's three headline scores as the encoder's lead over its paired decoder at each size (Table 9, the table version of the paper's Figure 1).
You need: the model families and their masks and objectives (causal LM, masked LM, prefix LM; Families and objectives) and what an encoder is used for in retrieval (Embedding models); this page is the paper. New terms: Ettin (the suite: six encoder and decoder pairs); MNTP (masked next-token prediction: a masked token predicted from the previous position's hidden state, LLM2Vec's way to make a decoder bidirectional); encoder-from-decoder, decoder-from-encoder (a finished model trained further on the other side's objective and mask); cross-objective budget (50B tokens, 2.5% of pretraining).
The field moved from encoder-only models such as ELMo and BERT to decoder-only, GPT-style models because decoders generate text so well (§1). With little new encoder development, the part of the community that does classification, retrieval or fast on-device inference still runs models from 2019: in March 2025 alone, BERT-base had 90 million downloads on Hugging Face (§2). Encoder development mostly stalled; ModernBERT, the strongest recent attempt to revive it, did not release its training data (§2).
Meanwhile a belief spread that decoders can simply be adapted to encoder jobs (classification, embeddings), often zero-shot. Decoders are more studied, more over-trained (Chinchilla) and larger, and adapted decoders now top leaderboards such as MTEB that used to belong to encoders (§1). Whether that is the right call had never been cleanly testable: every earlier comparison of the two kinds (DeBERTa against GPT-2 in similar sizes, for instance) used models with different parameter counts, architectures, training recipes, pretraining data and tokenizers, and the attempts to control for this used very little pretraining data (§2).
The gap: a suite of encoders and decoders that share everything except the thing being compared, trained to state-of-the-art quality so the comparison means something, with all the data open.
The grid is the attention mask: a filled cell means the token in that row may read the token in that column. Arrows run from the position whose output is scored to the token it must predict. Masked positions are drawn from the paper's rates (30% MLM, 15% MNTP) on this one sentence, so the counts move by a token or two from the rate.
Ettin (named for a two-headed giant of Norse myth: two language-model heads) trains each size twice from scratch, with the same architecture, the same data, in the same order, with the same hyperparameters. The only differences between the two members of a pair are (§3.3, Table 1):
The masks and objectives in general, with their own visuals: Families and objectives; the animation on the right shows only what Ettin does with them.
Then each finished model is trained further on the other side's objective (§3.5): a decoder continued with MNTP (masked next-token prediction, below) becomes an encoder-from-decoder; an encoder continued with CLM becomes a decoder-from-encoder. Four kinds of model per size. The animation runs one toy sentence through all four objectives; the first two are the pair, the last two the conversions.
Step by step, for the objective chosen on the right
The counter that matters most is the share of tokens that produce a loss. A decoder learns from every token; an encoder only from the masked ones. That is the paper's own explanation (in §6) for why a concurrent study at a small budget reached the opposite verdict: CLM is more data-efficient per token, an advantage that fades with enough data.
ModernBERT has two sizes, so Ettin designs new shapes for the others, roughly doubling at each step and matching common encoder sizes (§3.2). The small models follow MobileLLM's advice to go deep and thin; the 1B keeps the 400M's 28 layers and widens instead. The six shapes are drawn to scale in the first figure. The 150M and 400M shapes are ModernBERT-base and -large exactly (both 149.0M and 394.8M in Table 11).
Recounted here from each model's released configuration on Hugging Face (jhu-clsp/ettin-encoder-* and ettin-decoder-*; vocabulary 50,368, tied embeddings, no biases, a GLU feed-forward whose input projection is 2 × the intermediate size, LayerNorms without bias, the first layer's attention norm skipped): every total, embedding and non-embedding count reproduces Table 11 to its printed 0.1M, independently, once the prediction head (dense layer, norm and output bias, 0.1M to 3.3M) is left out, as Table 11 does. The encoder and decoder configurations of each size differ only in the causal flags. Learning rate, weight decay and warmups are Table 1's.
Every other choice is ModernBERT's block (Table 12), with one change: local and global layers share one rotary base.
The rest is ModernBERT's block (Table 12, Appendix C): rotary positions (no position embeddings) with the base raised to 160,000, pre-norm LayerNorm, a GELU GLU feed-forward, no biases, an embedding norm, sliding-window attention of 128 tokens in two layers of every three, the ModernBERT tokenizer, and a context of 1,024 tokens growing to 7,999. The only change from ModernBERT is that local and global layers use the same rotary base.
One recipe for both sides, the three-phase schedule open-data decoders use and ModernBERT followed, with a trapezoidal learning rate (§3.3). Data comes from the sources open decoders train on, chiefly OLMo's: DCLM plus curated Dolma v1.7 sources at first, then the filtered DCLM and other higher-quality Dolmino sources that the OLMo 2 paper introduced for its decay phase (§3.1; footnote 5: the unfiltered data ablated worse).
Three phases: 1.7T tokens of base pretraining on a broad mix, 250B of context extension to 8,000 tokens with the noisiest sources dropped, and a 50B decay on long, higher-quality data.
It differs from ModernBERT in five deliberate ways, chiefly open data and no model merging, so the comparison stays clean.
Five deliberate differences from ModernBERT (§3.4): open data; decay during context extension; no model merging (for a clean comparison; footnote 7 guesses a merge would add "another point or two"); 15% masking in the decay phase instead of 30%; the same rotary base for local and global layers.
Open everything. Checkpoints every 8.5B tokens, 236 per model (236 × 8.5B = 2,006B, the whole 2T run), plus the training data and the exact batch order, so anyone can pinpoint what a model learned between two checkpoints (§3.3), as Pythia did for decoders.
Because large decoders are trained much longer than encoders ever were, it has become common to adapt them to encoder tasks (§3.5). The paired models make that testable: take the final model of each kind and continue pretraining it on the reverse objective.
The figure on the right takes the six pairs of the first figure through both conversions, with the paper's results before and after (Table 9).
MNLI accuracy from Table 9 (the table version of Figure 1). The figure on the right is now on step 2. Bars: the encoder's lead over the decoder at each size (outlined), and what is left of it after the decoder's 50B tokens of MNTP (solid). The conversion helps retrieval more (step 3; Encoders vs decoders).
GLUE sweeps 5 learning rates, 4 weight decays, 2 batch sizes and 4 epoch settings, 160 runs per model, and reports the best score per task (Appendix F). Retrieval is fine-tuned on MS MARCO with a new script (ModernBERT's precise scores could not be reproduced), with more negatives, which raised every model's scores.
[MASK] tokens and an end token, predict the first mask, append it, repeat. Two tasks needed adjustments because encoders are not calibrated on where the end token goes (TriviaQA stops on a newline instead; LAMBADA does not score the end token). The Train the pairs tab animates this method on the toy models.Before comparing the two kinds, the paper shows its recipe favours neither, by beating the best open models of each kind at each size (§4).
So "matches or beats" is fair on both sides at every size where a peer exists, from a single recipe. It is also the first public, open-data replication of ModernBERT. The tables are sortable in The paper's tables, rebuilt.
Three representative scores: MNLI accuracy (classification), MS MARCO dev nDCG@10 (retrieval) and the average of the ten generative tasks (§4.2). Figure 1 is rebuilt on the right from Table 9, its table version; the figure's own vector coordinates, decoded from the arXiv HTML, agree with Table 9 to the last printed digit.

Every pair of sizes in Table 9 was checked: a native model at size a against the other kind at every larger size b. Figure 1's caption says "even with an order of magnitude greater size"; no row supports a ratio above 2.7. The 6.7x win is against the encoder-from-decoder, and only by 0.2 points.
The nuance inside the generative average (§4.2, Table 8). The paper says encoders used generatively beat decoders on the more classification-like tasks, "such as ARC and SciQ" (400M: ARC 35.6 against 33.6), while decoders gain hugely on HellaSwag, TriviaQA and Social IQA. ARC holds. The SciQ and Social IQA part does not survive a check of Table 8 against Table 4:
Harder tasks at 1B (Table 5, added in v2): the decoder-from-encoder scores 37.0 against the decoder's 27.0 on "MMLU CS", but 18.9 against 32.0 on GSM8k. The paper reads this as the same split: the converted encoder wins classification and loses generation. Two cautions: the table does not define "MMLU CS" (a computer-science subset of MMLU, or MMLU as a classification task; the old page called it "MMLU classification"), and 27.0 is barely above the 25% chance level of four-way multiple choice, as the authors expect when they say most of their models are too small for signal on these tasks.
Because both kinds saw the same data, differences in learned bias come from the objective (§5). The test is the "Gotcha" split of WinoGender: 240 sentences, half with a female and half with a male stereotypical pronoun (nurse: female). Most of the small models are at chance on the real coreference task (Table 10), so the case study uses an easier one: predict the pronoun itself, with a [MASK] for encoders and the lower-perplexity sentence for decoders, and count male, female and neutral answers.
The paper's reading: encoders are "much more likely to use a gender neutral pronoun overall"; both lean male, "if slightly higher for decoders"; female pronouns become more common with size, steadily for decoders and "more stochastic" for encoders. The decoded figure supports this on average (neutral 37.0% of answers for encoders against 21.5% for decoders; male 55.9% against 67.7%) and up to 150M, but at 400M and 1B it reverses: the decoders choose neutral pronouns more often (30.8% and 30.0% against 22.9% and 24.6%) and the encoders choose male more often (69.2% and 59.6% against 53.7% at both sizes). Each bar is one model on 240 sentences, so a share has a standard error of about 3 points.
Figure 2 rebuilt from its vector coordinates in the arXiv HTML; every share is a whole number of the 240 sentences (shown on hover). The labels of the figure's own size axis read 66M for the 68M models.
What holds up, and why. The design is the strongest part: the two members of a pair have identical released configurations apart from the causal flags (checked above), the same data in the same order and the same hyperparameters, and both sides are competitive with the best open models of their kind, so neither looks starved. The direction of the main result is the same at all six sizes: encoders ahead of their paired decoders on MNLI by 1.9 to 3.6 points (Table 9); decoders ahead on the generative average by 1.3 to 8.3 over the encoder. At about 9,800 MNLI dev examples a single accuracy has a binomial standard error of about 0.32 points, and a difference between two models about 0.45 (derived; the paper gives no error bars), so the MNLI gaps are 4 to 8 standard errors wide; a ten-task generative average has a standard error of about 0.42 (from the standard split sizes of the ten tasks), about 0.6 for a difference, so the 6.8-point generation gap at 1B is about 11 of them.
Where the evidence is weaker.
In the authors' favour: they release every model, checkpoint, the data and the batch order, so each of these points can be checked; they state that the 1B run was cut to a third, that the setup for generative encoders is imperfect, that most models are too small for MMLU or GSM8k, and that a concurrent study disagrees; and they run 300+ GPU hours on DeBERTa-v2-XXL before excluding it for size rather than leave out an unflattering baseline silently.
ettin-enc-from-dec-* and ettin-dec-from-enc-* on the Hub; the README's longer names do not resolve), plus raw checkpoints in jhu-clsp/ettin-checkpoints and training-stage tags (step*, ext*, decay*) on each model.This is the cleanest evidence to date in the encoder-against-decoder debate: with data, recipe and size held fixed, the objective and the attention pattern alone create task-specific advantages that 50B tokens of the other objective do not erase. The practical reading the authors draw (§6): for classification and retrieval at 1B or below, a native encoder beats decoders larger than itself, so fine-tuning an encoder (for transcript or intent classification, say) remains the right default rather than adapting a small decoder LLM. MTEB-style leaderboards are topped by adapted decoders of 7B or more because no large encoders exist; the authors predict a natively trained encoder of about 3B would beat them. That is a forecast, not a measurement: no model above 1B was trained.
The disagreement. Concurrent work by Gisserot-Boukhlef et al. (2025) found that starting from CLM and then continuing with MLM was better "in nearly all cases". Its pretraining used about 100B tokens; Ettin's authors argue that is the regime where CLM's per-token data efficiency (a loss on every token, against MLM's 15 to 30%) dominates, and that the advantage disappears at state-of-the-art scale (§6). Both studies are consistent with an objective effect that depends on the token budget; neither tests the crossover directly.
A research platform. The suite (paired open-data models at six sizes, 236 checkpoints each, the replayable batch order) is a successor to Pythia for studying how objectives shape learning, with the gender-bias study as a first example. The mechanism at toy scale: the BERT page trains a bidirectional encoder against a left-to-right twin; this page's Train the pairs tab adds what is specific to Ettin: four models from one recipe, conversion in both directions, and an encoder generating by filling masks.
The BERT page already trains a toy bidirectional encoder against a left-to-right twin, on a task built so that the right-hand context decides the answer. This tab does what is specific to Ettin: a small suite of paired models, each pair built and trained identically, at three sizes; cross-objective continued training in both directions, at the paper's budget (2.5% of pretraining) and, for the middle size, at four and ten times it; and an encoder generating text by filling masks, the method the paper uses to score encoders on generative tasks.
Every document lists two or three random facts and restates three to six of them: ann red cup . bob blue box . so bob blue box . The facts are drawn at random, so nothing can be memorised; every answer has to be read from the context. 30% of the documents are cut short at a random point, as packed pretraining sequences are cut at the context boundary. Three tasks, one for each family in the paper's Figure 1 except retrieval:
Retrieval is left out: in a world where a query and its document share their words, a toy retriever would be measuring word overlap, not representations.
The same prompt generated by each of the four toy models of the small size (the four that ship with the page, 82 KB of weights; the middle size, at 62,714 parameters per model against 19,482, would add about three times as much), running in your browser on their real (6-bit) weights. A decoder reads the prompt left to right and predicts the next token at the last position. An encoder is given the prompt plus three [MASK] tokens and an end token, fills the first mask, and repeats, the method of Samuel (2024) that the paper uses (Appendix B). The encoder-from-decoder fills the mask too, but reads it one position earlier, as MNTP trained it. Bars: the model's top three tokens at each step. The small encoder never learned which colour belongs to which name within its budget, so it fills the masks with a plausible colour from the facts, right about half the time; the encoder-from-decoder, which inherited the decoder's lookup, fills them correctly.
Step by step, for the model chosen on the right
The paper could afford one cross-objective budget. The toy tries three on its middle size (the shared machine's CPU did not stretch to all three sizes). Each line is the converted model's score minus the native model's (the encoder for classify, the decoder for generate and choose), against the budget; zero means the conversion caught up.
All four shipped models answer the same prompt (greedy, three tokens). A tick means all three tokens are right.
Fresh random prompts (a different random stream from the one the models trained on), generated by the four shipped models in this browser. The PyTorch numbers beside them were measured on 1,000 prompts from the training script's own test stream.
Every table of the arXiv HTML v2, transcribed by script (mk_tables.py) with values exactly as printed; click a column header to sort. Every derived number on this page comes from recompute.py. Ettin rows are highlighted.
| Check | Result |
|---|
"MMLU CS" is not defined in the paper. Chance on four-way multiple choice is 25%.
Printed as accuracy ± standard error. The printed errors are binomial at 50% for 720 sentences (all: 1.86), 240 (Gotcha: 3.23) and 120 (each half of Gotcha: 4.56), which is how the set sizes on this page were inferred. Most models are within two standard errors of chance (50%), as the caption says.
Every link opens in a new tab. Reading time of the resources below: 4h 50m.
ICLR 2026 (poster), the paper itself; the HTML version has the anchors this page links to. abstract page, PDF.
(45 min)
MIT-licensed repository with links to the code, data and batch order (repo, about 20 minutes for the README and entry path); the training code itself lives in the orionw/bert24 fork of the ModernBERT codebase.
(20 min)
Hugging Face blog, the authors: the authors' own release post; condensed walkthrough of the suite, the recipe, and the encoder-vs-decoder findings with usage snippets.
(15 min)
the authors: the 24 models (encoders, decoders, cross-objective), the raw checkpoints, the training data by phase and the batch order.
(10 min)
Warner et al., Answer.AI and LightOn, December 2024: the recipe Ettin replicates with open data: the architecture of Table 12, the three training phases, the evaluation setup Ettin reuses.
(40 min)
BehnamGhader et al., 2024: the decoder-to-encoder adaptation Ettin stress-tests: bidirectional attention, MNTP, then contrastive training; read section 2 and appendix D.1.1 for the MNTP budget.
(40 min)
David Samuel, NeurIPS 2024: the trick Ettin uses to run encoders on generative benchmarks: append three [MASK] tokens and an end token, fill the first mask, repeat.
(30 min)
Gisserot-Boukhlef et al., 2025: the concurrent study that reached the opposite verdict (CLM then MLM wins) at about 100B tokens; read it beside Ettin's section 6.
(30 min)
Biderman et al., EleutherAI, 2023: the template for Ettin's release: one data order, many sizes, every checkpoint public.
(30 min)
Marone et al., JHU, September 2025: the authors' follow-up built on the Ettin recipe; the paper's section 6 cites it for encoders beating adapted decoders at scale.
(30 min)
2018: the encoder lineage Ettin modernises; its page trains a toy bidirectional encoder against a left-to-right twin, the experiment this paper runs at 17M to 1B.
2020: the decoder-only shift this paper interrogates.
2025: supplies the DCLM, Dolma and Dolmino data sources and the open-artifact philosophy.
2021: rotary positions; Ettin extends context by raising the RoPE base to 160,000.
2022: training far past compute-optimal is what made decoder adaptation popular, and Ettin's 1B is still past it at 667B tokens.
2024: bidirectional attention added inside a decoder during instruction tuning; Ettin cites it as mixed training.
2019: the third architecture (encoder-decoder) that Ettin's pairs leave out; its page compares the three attention masks.
2025: another way to reuse a decoder's weights, as an encoder-decoder rather than a pure encoder.
2024: Llama 3.2 1B is the decoder baseline Ettin's 1B decoder beats (59.0 against 56.6).
2020: dense retrieval, the job where this paper says a native encoder stays the right default.
objectives, multi-phase recipe, continued pretraining.
encoder against adapted-decoder embeddings and rerankers, MTEB implications.
This page is one row of the Papers database; its properties (Paper, Takeaway, Topics, Year) live there.