ModernBERT-EN-1B-PT-stage1
English / Japanese
Overview
ModernBERT-EN-1B-PT-stage1 is pre-trained from random initialization on HuggingFaceFW/fineweb-edu. The model observes approximately 17B tokens with 1,024-token context windows, providing an encoder backbone for language understanding tasks in English.

Usage
Requirements
transformers>=4.51.0
accelerate>=1.6.0
sentencepiece>=0.2.0
flash-attn>=2.7.3
Sample Code
import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer
model_name = "iamtatsuki05/ModernBERT-EN-1B-PT-stage1"
model_kwargs = {
"torch_dtype": torch.bfloat16,
"attn_implementation": "flash_attention_2",
"device_map": "auto",
}
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForMaskedLM.from_pretrained(model_name, **model_kwargs)
text = f"The capital of France is {tokenizer.mask_token}."
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model(**inputs)
masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
print(tokenizer.decode(outputs.logits[0, masked_index].argmax(axis=-1)))
Model Details
- Architecture: ModernBERT
- Maximum sequence length: 8,192 tokens
- Embedding dimension: 1792
- Tokenizer: SentencePiece / vocabulary size 102,400
- Positional encoding: RoPE
- Supported languages: English
Model Series
The following checkpoints share the same training recipe on HuggingFaceFW/fineweb-edu with 1,024-token contexts.
| ID | Architecture |
|---|---|
| iamtatsuki05/ModernBERT-EN-1B-PT-stage1(this model) | ModernBERT |
| iamtatsuki05/Llama-EN-1B-PT-stage1 | Llama |
Licence
This model is distributed under the MIT License.
How to Cite
@article{MIREI
title={同一条件下における Encoder/Decoder アーキテクチャによる文埋め込みの性能分析},
author={岡田 龍樹 and 杉本 徹},
journal={言語処理学会第 32 回年次大会 (NLP2026)},
year={2026}
}