Views
No views yet

| Property | Value |
|---|---|
| Base model | ModernBERT-base |
| Parameters | ~150M |
| Architecture | Masked Language Model (diffusion objective) |
| Pretrain data | Project Gutenberg (6,400,553 train chunks, seq_len=1024) |
| SFT data | Open-Orca (~4.2M Q&A pairs) |
| Pretrain steps | 30,000 |
| SFT steps | 10,000 |
| Effective batch size | 128 |
| Pretrain LR | 5e-5 (cosine, 1500 warmup steps) |
| SFT LR | 1e-5 (cosine, 300 warmup steps) |
| Hardware | RTX 4090 24GB |
| Pretrain time | ~20 hours |
| SFT time | ~4.3 hours |
t of tokens is masked, and the model learns to predict the original tokens. The loss is scaled by 1/t to account for the difficulty of predicting heavily masked sequences.random — masked tokens are randomly re-masked at each steplow_confidence — the lowest confidence tokens are re-masked, leading to more coherent outputs1from transformers import AutoModelForMaskedLM
2from safetensors.torch import load_file
3import torch
4
5# Load model
6model = AutoModelForMaskedLM.from_pretrained("answerdotai/ModernBERT-base")
7state_dict = load_file("model.safetensors")
8model.load_state_dict(state_dict, strict=False)
9model.eval()1# Interactive inference
2bash inference.sh
3
4# Generate GIF
5bash create_gif.sh