Model reference · open weights
ettin-encoder is an open-weight embedding model from jhu-clsp. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | jhu-clsp |
|---|---|
| Type | Embedding models |
| Task | Embeddings |
| Context | 7999 tokens |
| Runs with | transformers |
| Released | 2025-03-24 |
| Popularity | 6k downloads / month |
| Licence | Open weights |
About
🎯 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.
pip install torch>=1.9.0
# until the new pip release, install from main to use decoders (transformers>=4.54.X will contain it)
# encoders work with transformers>=4.48.0
pip install git+https://github.com/huggingface/transformers.git
Encoder for Classification/Embeddings:
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("jhu-clsp/ettin-encoder-150m")
model = AutoModel.from_pretrained("jhu-clsp/ettin-encoder-150m")
Decoder for Text Generation:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("jhu-clsp/ettin-decoder-150m")
model = AutoModelForCausalLM.from_pretrained("jhu-clsp/ettin-decoder-150m")
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 |
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys ettin-encoder for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (ettin-encoder below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/embeddings \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"ettin-encoder","input":"text to embed"}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.