modernbert-decoder
A ModernBERT-architecture decoder trained with causal language modeling for autoregressive text generation.
Language · 1,263 operations Checked
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
- Task
- Language
- Parameters
- 149.7M
- Operations
- 1,263
- Framework
- PyTorch
- Recurrent
- No
- Source
- transformers 5.18.0
- 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 file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m7386
- Graph hash
- f6237272365f3a4e576e83e1d4d297d187503b6fd13945f4d81575659ad693f1
- Skeleton hash
- ba90b5a3d0b2368a37dd3f7a6cb9a7d1f82df5a33f55fedc3d3542ea6f26e0d0
- Architecture hash
- 7a68fb62f01d416f4fde5a0284167bcc93a5598e72a09e1d0a5c9dd11d1b4235
- Diagram SHA-256
- 754ed403f5e2912cd34454511067c5fce6d4590705e38ab78534bbc2751f8618
- 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.AutoModelForCausalLM.from_config()
What it is
ModernBERT Decoder is a text generation model that keeps the ModernBERT architecture but is trained from scratch with a causal language modeling objective, following the Ettin paper. Using one architecture for both makes it possible to compare encoders and decoders. It is the decoder implementation of ModernBERT, designed for autoregressive text generation tasks.
For efficiency and to handle longer sequences, the model uses sliding window attention and rotary positional embeddings. The original checkpoints are published in the jhu-clsp collection. Besides the causal language modeling head, the library provides a sequence classification head for the same model.
Key idea. ModernBERT Decoder keeps the ModernBERT architecture but is trained from scratch with a causal language modeling objective, so encoders and decoders can be compared on one architecture.
- ModernBERT Decoder
- modernbert-decoder
- ModernBertDecoder
- causal language model
- text generation
- autoregressive
- decoder-only
- sliding window attention
- rotary positional embeddings
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.