Downloads ยท 30 days
64
28% of all-time downloads
onnx-community/ettin-encoder-32m-ONNX
ettin-encoder-32m-ONNX is a fill-mask model from onnx-community. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as mit.
[](https://opensource.org/licenses/MIT) [](https://arxiv.org/abs/2507.11412) [](https://huggingface.co/jhu-clsp) [](https://huggingface.co/datasets/jhu-clsp)
Downloads ยท 30 days
64
28% of all-time downloads
All-time downloads
228
Public
Repo size
373 MB
Likes
1
Public
Click a slice to open those files.
.onnx_data373 MB ยท 99%
From the Hugging Face model README
๐ฏ TL;DR: State-of-the-art paired encoder and decoder models (17M-1B params) trained identically for fair comparison with open data. Encoders beat ModernBERT. Decoders beat Llama 3.2/SmolLM2.
๐ Paper | ๐ GitHub Repository
This model is part of the Ettin suite - the first collection of paired encoder-only and decoder-only models trained with identical data, architecture, and training recipes. Ettin enables fair comparisons between encoder and decoder architectures across multiple scales, providing state-of-the-art performance for open-data models in their respective size categories.
Architecture-specific advantages persist: A 400M encoder outperforms a 1B decoder on classification tasks, while a 400M decoder outperforms a 1B encoder on generation tasks.
If you haven't already, you can install the Transformers.js JavaScript library from NPM using:
npm i @huggingface/transformers
import { pipeline } from "@huggingface/transformers";
const unmasker = await pipeline("fill-mask", "onnx-community/ettin-encoder-32m-ONNX");
const result = await unmasker("The capital of France is [MASK].");
console.log(result);
// [
// { score: 0.5151872038841248, token: 7785, token_str: ' Paris', sequence: 'The capital of France is Paris.' },
// { score: 0.033725105226039886, token: 42268, token_str: ' Lyon', sequence: 'The capital of France is Lyon.' },
// { score: 0.031234024092555046, token: 23397, token_str: ' Nancy', sequence: 'The capital of France is Nancy.' },
// { score: 0.02075139433145523, token: 30167, token_str: ' Brussels', sequence: 'The capital of France is Brussels.' },
// { score: 0.018962178379297256, token: 31955, token_str: ' Geneva', sequence: 'The capital of France is Geneva.' }
// ]
Ettin models are designed to provide a foundation for comparing encoder-only and decoder-only architectures. Unlike previous comparisons that were limited by different training data, architectures, and recipes, Ettin models use:
This approach allows for true apples-to-apples comparisons between encoder and decoder models, revealing the inherent strengths of each architecture.
The training data is publicly available and split across different phases:
| Size | Model | Parameters | Best For | Download |
|---|---|---|---|---|
| XXS | ettin-encoder-17m | 17M | Mobile/Edge devices | |
| XS | ettin-encoder-32m | 32M | Fast inference | |
| Small | ettin-encoder-68m | 68M | Balanced performance | |
| Base | ettin-encoder-150m | 150M | Standard use cases | |
| Large | ettin-encoder-400m | 400M | High accuracy needs | |
| XL | ettin-encoder-1b | 1B | Best performance |
| Size | Model | Parameters | Best For | Download |
|---|---|---|---|---|
| XXS | ettin-decoder-17m | 17M | Lightweight generation | |
| XS | ettin-decoder-32m | 32M | Quick prototyping | |
| Small | ettin-decoder-68m | 68M | Efficient generation | |
| Base | ettin-decoder-150m | 150M | Standard generation | |
| Large | ettin-decoder-400m | 400M | Quality generation | |
| XL | ettin-decoder-1b | 1B | Best generation |
These models demonstrate what happens when you continue training encoders as decoders (and vice versa). Important: Load these models using the architecture they were converted to, not their original architecture.
Load as encoders using AutoModel or AutoModelForMaskedLM:
| Size | Model | Parameters | Description | Download |
|---|---|---|---|---|
| XXS | ettin-encoder-from-decoder-17m | 17M | Decoder โ MLM continued training | |
| XS | ettin-encoder-from-decoder-32m | 32M | Decoder โ MLM continued training | |
| Small | ettin-encoder-from-decoder-68m | 68M | Decoder โ MLM continued training | |
| Base | ettin-encoder-from-decoder-150m | 150M | Decoder โ MLM continued training | |
| Large | ettin-encoder-from-decoder-400m | 400M | Decoder โ MLM continued training | |
| XL | ettin-encoder-from-decoder-1b | 1B | Decoder โ MLM continued training |
Ettin provides the first controlled comparison of encoder vs. decoder architectures:
All training artifacts are publicly available:
Data: High-quality mixture including DCLM, Dolma v1.7, scientific papers, code, and curated sources totaling 2T+ tokens
Architecture: Transformer with RoPE, GLU activations, and prenorm layers
Training Phases:
Key Features:
| Parameter | 17M | 32M | 68M | 150M | 400M | 1B |
|---|---|---|---|---|---|---|
| Layers | 7 | 10 | 19 | 22 | 28 | 28 |
| Hidden Size | 256 | 384 | 512 | 768 | 1024 | 1792 |
| Intermediate Size | 384 | 576 | 768 | 1152 | 2624 | 3840 |
| Attention Heads | 4 | 6 | 8 | 12 | 16 | 28 |
If you use Ettin models in your research, please cite our work:
@misc{weller2025seqvsseqopen,
title={Seq vs Seq: An Open Suite of Paired Encoders and Decoders},
author={Orion Weller and Kathryn Ricci and Marc Marone and Antoine Chaffin and Dawn Lawrie and Benjamin Van Durme},
year={2025},
eprint={2507.11412},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2507.11412},
}
This project is licensed under the MIT License - see the LICENSE file for details.
Contact: For questions about the models or research, please open an issue or contact the authors.