Model reference · open weights

EdgeCoder-31M

Embeddings knowledgator Embeddings 1 build Open weights 618 dl/mo

EdgeCoder-31M is an open-weight embedding model from knowledgator. EdgeCoder-31M (BF16) weighs 62 MB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • EdgeCoder-31M is a compact English text encoder with 31M parameters and a maximum context length of 8192 tokens.
  • It is designed for feature extraction and fine-tuning on classification and embedding tasks, using the Apache-2.0 license.
  • The model supports only the English language.

Summary of the knowledgator/EdgeCoder-31M model card, 2026-11-30

What it is

Released byknowledgator
Released2026-10-29
Parameters31M
VRAM62 MB for the weights

What it runs on

Memory and cards for EdgeCoder-31M (BF16)

62 MBweights, file size
1.1 GBruntime overhead
CardRunsMemory
RTX 3060 12 GBfits11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What knowledgator says about EdgeCoder-31M

Read the model card

EdgeCoder-31M is a compact English text encoder (31M parameters, 8 layers) with a context of up to 8192 tokens. It is pre-trained with ModernELECTRA: replaced-token detection (RTD), as in ELECTRA and DeBERTaV3, plus a boundary-window reconstruction task.

RTD encoders are strong on classification but usually weak as backbones for embedding models. EdgeCoder-31M keeps the classification quality of RTD and, after fine-tuning, matches masked-language-model encoders of its size on embedding tasks.

Model details

ArchitectureDeBERTa-v2 (disentangled relative attention, no absolute positions)
Layers / hidden / FFN / heads8 / 384 / 1536 / 6
Token embeddingfactorized: 128-d table with a linear projection to 384
Parameters31.0M (14.2M without the embedding table)
Maximum sequence length8192 tokens
TokenizerDeBERTa-v3 SentencePiece (128,100 tokens)
LanguageEnglish

The repository contains the discriminator encoder. It has no masked-language-model head, so it is meant for fine-tuning and feature extraction, not for fill-mask.

Usage

The checkpoint is a standard DeBERTa-v2 model and loads with transformers:

from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("knowledgator/EdgeCoder-31M")
model = AutoModel.from_pretrained("knowledgator/EdgeCoder-31M")

inputs = tokenizer("EdgeCoder is a compact text encoder.", return_tensors="pt")
outputs = model(**inputs)
hidden = outputs.last_hidden_state  # (batch, seq_len, 384)

For fine-tuning, use the usual task heads, for example AutoModelForSequenceClassification or AutoModelForTokenClassification.

Long inputs and faster inference with FlashDeBERTa

The standard DeBERTa attention needs memory that grows quadratically with the sequence length. For long inputs, we recommend FlashDeBERTa, the implementation the model was trained with. It loads the same checkpoint:

pip install flashdeberta -U
import torch
from transformers import AutoTokenizer
from flashdeberta import FlashDebertaV2Model

tokenizer = AutoTokenizer.from_pretrained("knowledgator/EdgeCoder-31M")
model = FlashDebertaV2Model.from_pretrained("knowledgator/EdgeCoder-31M").to("cuda")

inputs = tokenizer(long_text, truncation=True, max_length=8192, return_tensors="pt").to("cuda")
with torch.no_grad():
    outputs = model(**inputs)

FlashDeBERTa also provides heads for sequence and token classification, question answering and multiple choice.

Evaluation

All numbers are from the paper. Baselines were run with the same protocols.

GLUE (dev)

Single seed, best run of a hyperparameter sweep that follows the Ettin protocol.

ModelParamsCoLASST-2MRPCSTS-BQQPMNLIQNLIRTEAvg
BERT-small28.8M44.890.183.187.690.179.288.269.379.0
MiniLM-L1233.4M59.193.391.289.291.585.691.974.784.6
Ettin-Enc-32m31.9M57.492.089.789.591.083.490.774.783.5
EdgeCoder-31M31.0M64.992.291.890.291.184.590.382.786.0
Larger models, for reference
DistilBERT66.4M56.992.286.887.490.882.789.566.181.5
BERT-base109.5M59.093.189.589.491.485.491.678.284.7
Ettin-Enc-68m68.1M64.894.492.291.191.987.092.983.887.2

MTEB English v2

Each backbone is fine-tuned once into a sentence embedding model on 1M MS MARCO triplets (one epoch, mean pooling, contrastive loss) and then evaluated on the 41 tasks of MTEB English v2. The scores describe the backbone after this fine-tuning, not the checkpoint in this repository used as is.

ModelParamsClass.Clust.PairCl.Rerank.Retr.STSSumm.Mean (Type)
BERT-small28.8M64.739.679.441.738.173.021.651.1
MiniLM-L1233.4M64.937.879.843.538.473.221.451.3
Ettin-Enc-32m31.9M64.239.677.142.639.773.219.950.9
EdgeCoder-31M31.0M65.339.778.042.338.673.120.951.1

Training

  • Objective. Replaced-token detection on every position, plus boundary-window reconstruction: each token is predicted from the two hidden states at the borders of a random window (3 to 12 tokens) that contains it. The window loss has weight 0.003.
  • Generator. A separate 4-layer generator is pre-trained with masked language modelling and then frozen. Replacements are sampled from it at a temperature that decreases from 1.5 to 0.9 during training. The masking rate is 30%.
  • Data. About 1.0 trillion tokens of English text: web pages, news, scientific papers and PDFs, books, legal text, source code, mathematics and Q&A forums.
  • Length curriculum. 512 tokens for about 90% of the training tokens, then 2048 and 8192 tokens on long documents.
  • Hardware. One node with 8 × NVIDIA RTX PRO 6000 Blackwell GPUs, bf16 mixed precision.

Limitations

  • English only. For other languages, use EdgeCoder-Multilingual-61M.
  • The model is a backbone. It needs fine-tuning for classification, token classification, retrieval or embedding tasks.
  • GLUE results are single runs with one seed, so differences below a

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms