Model reference · open weights

ModernGBERT

Embeddings LSX-UniWue Embeddings 2 builds Its own licence terms 4k dl/mo

ModernGBERT is an open-weight embedding model from LSX-UniWue. ModernGBERT_134M (FP32) weighs 318 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.

ModernGBERT 134M is a German feature-extraction model developed by LSX-UniWue. It has 159M parameters and a context length of 8192 tokens. The model is released under a research-only RAIL-M license.

Summary of the LSX-UniWue/ModernGBERT_134M model card, 2026-10-01

What it is

Released byLSX-UniWue
Released2025-05-27
Parameters159M
VRAM318 MB for the weights

What it runs on

Memory and cards for ModernGBERT_134M (FP32)

318 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

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
ModernGBERT_134M (above) ↗ 159MFP32 318 MBRTX 3060 12 GB
ModernGBERT_1B ↗ 1.1BFP32 2.3 GBRTX 3060 12 GB

From the model card

What LSX-UniWue says about ModernGBERT

Read the model card

ModernGBERT 134M is a German ModernBERT language model with 134 million parameters and a native context length of up to 8,192 tokens. This model follows the same BERT-style architecture and training procedure as the ModernBERT codebase. ModernGBERT 134M has been pre-trained on 470 billion tokens from the German portion of RedPajama V2, a subset of the same training dataset used for our LLäMmlein decoder family.

We provide two model sizes:

  • ModernGBERT 1B 28 layers, hidden size 2,048, 1 billion parameters

  • ModernGBERT 134M ← You are here 22 layers, hidden size 768, 134 million parameters

Find more details in our preprint!

Usage

You can use ModernGBERT with the transformers library from version v4.48.0 onwards. (Optional: install flash-attn to achieve highest efficiency.)

Since ModernGBERT 134M is a Masked Language Model (MLM), you can load it via AutoModelForMaskedLM. For downstream tasks such as classification, retrieval, or QA, fine-tune the model by following standard BERT fine-tuning recipes.

Example using AutoModelForMaskedLM:

from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "LSX-UniWue/ModernGBERT_134M"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id)

text = "Die Hauptstadt von Frankreich ist [MASK]."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)

# To get predictions for the mask:
masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
predicted_token_id = outputs.logits[0, masked_index].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)
print("Predicted token:", predicted_token)
# Predicted token:  Paris

NOTE: If you want to use HuggingFace's PEFT library for LoRA training, you need to specify the target modules, e.g.:

from peft import LoraConfig, get_peft_model
peft_config = LoraConfig(
    task_type="TOKEN_CLS", r=8, lora_alpha=32,
    target_modules=["Wqkv", "Wi", "Wo"],
)
model = get_peft_model(model, peft_config)

Intermediate Checkpoints

In addition to the final model checkpoint, we publish intermediate checkpoints throughout the full training process as unique branches in this repository. A specific checkpoint can be loaded like this:

from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "LSX-UniWue/ModernGBERT_134M"
revision = "base-100000-ckpt"
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
model = AutoModelForMaskedLM.from_pretrained(model_id, revision=revision)

Performance

We evaluate our models across a broad range of tasks. For natural language understanding, we use the SuperGLEBer benchmark, and for embedding capabilities, we use the German MTEB benchmark (after unsupervised fine-tuning of every model on the German mMARCO portion). The following table provides a comparison of this encoder with other German and multilingual encoders. See our preprint for more details about the evaluation.

ModelSuperGLEBer AvgMTEB Avg
ModernGBERT 1B0.8080.551
ModernGBERT 134M(you are here)0.7490.501
GBERT-base0.7180.500
GBERT-large0.7680.521
GeBERTa-base0.7160.493
GeBERTa-large0.7490.494
GeBERTa-xlarge0.7670.521
Gerturax-30.7400.472
XLM-RoBERTa-large0.7300.460
XLM-RoBERTa-xlarge0.7580.479

License

We release the ModernGBERT models under a research-only RAIL-M license. See license.md for details. Data Take Down

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