---
title: "Ettin Suite: SoTA Paired Encoders and Decoders"
description: "Ettin is a suite of paired encoder-only and decoder-only models (17M–1B parameters) trained on identical open data (2T tokens), architecture and three-phase recipe derived from ModernBERT, differing only in attention pattern and objective (MLM vs CLM)."
url: "https://swe.quest/articles/ettin-suite-sota-paired-encoders-and-decoders-285a76b68aebed62"
canonical: "https://huggingface.co/blog/ettin"
source: "Hugging Face"
published: "2025-07-16"
difficulty: "hard"
kind: "Research"
reading_minutes: 15
tags: ["llms","model-training","evals","search"]
---

# Ettin Suite: SoTA Paired Encoders and Decoders

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2025-07-16, 15 min read, Research. Original: [https://huggingface.co/blog/ettin](https://huggingface.co/blog/ettin)

## Summary

Ettin is a suite of paired encoder-only and decoder-only models (17M–1B parameters) trained on identical open data (2T tokens), architecture and three-phase recipe derived from ModernBERT, differing only in attention pattern and objective (MLM vs CLM). The encoders beat ModernBERT and the decoders match or beat Llama 3.2 1B and SmolLM2. The controlled comparison shows encoders dominate classification and retrieval (a 150M encoder beats a 400M decoder on MNLI) while decoders win at generation. Continued training with the opposite objective for 50B tokens fails to close the gap, so architecture choice matters beyond the objective. Usage and fine-tuning code for Sentence Transformers and PyLate ColBERT embeddings is included.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)

## Prerequisites

- transformer attention
- masked vs causal language modeling
- Hugging Face Transformers

## Keywords

Ettin, ModernBERT, Llama 3.2, SmolLM2, LLM2Vec, Sentence Transformers, PyLate, ColBERT

## Related posts

- [Introducing the Ettin Reranker Family](https://swe.quest/articles/introducing-the-ettin-reranker-family-7e39cb92c1c0a726.md): Hugging Face · 2026-05-19 · Medium · 30 min read · Search, Model training, Inference & serving, Evaluation, Python
  Six Sentence Transformers CrossEncoder rerankers (17M to 1B parameters) built on the Ettin ModernBERT encoders are released with their data and full training recipe.
- [Finally, a Replacement for BERT: Introducing ModernBERT](https://swe.quest/articles/finally-a-replacement-for-bert-introducing-modernbert-95bd85fcbbb49537.md): Hugging Face · 2024-12-19 · Medium · 23 min read · Machine learning, Model training, Inference & serving, RAG & retrieval, LLMs
  ModernBERT is a family of encoder-only models (149M base, 395M large) that ports recent LLM architecture and training advances back to the BERT style, raising context length to 8,192 tokens and including large amounts of code in pretraining.
- [Train a Sentence Embedding Model with 1B Training Pairs](https://swe.quest/articles/train-a-sentence-embedding-model-with-1b-training-pairs-f0642783223f8c14.md): Hugging Face · 2021-10-25 · Hard · 6 min read · Model training, Machine learning, Vector search
  Sentence embedding models trained with a contrastive multiple-negatives ranking loss (InfoNCE) on up to 1 billion sentence pairs, using in-batch negatives, a scaled similarity (C≈20), and cosine vs. dot-product tradeoffs for clustering and ANN search.
- [tokenizers v1: encode, decode and scaling, measured](https://swe.quest/articles/tokenizers-v1-encode-decode-and-scaling-measured-49d0c7f94c7739e1.md): Hugging Face · 2026-09-21 · Medium · 10 min read · Performance engineering, Rust, LLMs, Algorithms
  tokenizers v1 encodes text 3 to 30 times faster than v0.23 single-threaded on an Apple M4 Max and scales at 76% of linear across eight cores, while producing identical token IDs and keeping the same API.
- [Assisted Generation: a new direction toward low-latency text generation](https://swe.quest/articles/assisted-generation-a-new-direction-toward-low-latency-text-generation-46c4fea13508392f.md): Hugging Face · 2023-05-11 · Medium · 12 min read · Inference & serving, LLMs, Performance engineering, Python
  Assisted generation cuts autoregressive LLM latency by letting a much smaller assistant model with the same tokenizer greedily draft candidate tokens, then verifying them all in a single forward pass of the large model.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
