All models

ModernGBERT-1B

ModernGBERT-1B, a masked language model built with the ModernBERT architecture.

Language · 1,110 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (9 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
149.7M
Operations
1,110
Framework
PyTorch
Recurrent
No
Published
2025
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m1796
Graph hash
26f7e2e70a1f1ed5fa0c4d54ad83965b2280ac6359e6b4c8c3444e86e06f0660
Skeleton hash
973820ab06741a163b98629203df10a444a17cdd94d13d33798edc7fd98b8ff1
Architecture hash
2134f86643a5a8db8185a1bd1a156a7de133e72427adec323da299427ee943a3
Diagram SHA-256
85a48f7a1700b7d4f22e849bfa8aa833e92cc732a573fe28ef245173671299d1
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.AutoModelForMaskedLM.from_config()

What it is

ModernGBERT-1B is built with the ModernBERT architecture, a modernized version of BERT. As a masked language model it predicts the [MASK] token in a sentence.

The architecture's changes to the original BERT design include rotary positional embeddings to support sequences of up to 8192 tokens, unpadding to avoid wasting compute on padding tokens, GeGLU layers, and alternating attention. ModernBERT models also support padding-free inference and training, which requires FlashAttention2 as the attention implementation.

Key idea. The ModernBERT architecture used by this model updates BERT with rotary positional embeddings for sequences of up to 8192 tokens, unpadding, GeGLU layers and alternating attention.

  • moderngbert
  • moderngbert-1b
  • moderngbert 1b
  • german masked language model
  • german text encoder
  • masked language model
  • fill-mask
  • encoder-only transformer

AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.