MIREI
Collection
MIREI: What Makes Decoder-Based Sentence Embeddings Strong? Rethinking Encoder and Decoder Architectures for Sentence Embeddings • 70 items • Updated • 1
How to use iamtatsuki05/ModernBERT-JP-1B-init with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("fill-mask", model="iamtatsuki05/ModernBERT-JP-1B-init") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("iamtatsuki05/ModernBERT-JP-1B-init")
model = AutoModelForMaskedLM.from_pretrained("iamtatsuki05/ModernBERT-JP-1B-init", device_map="auto")English / Japanese
ModernBERT-JP-1B-init is a randomly initialized ModernBERT checkpoint built from iamtatsuki05/ModernBERT-JP-1B-settings, sized to match sbintuitions/sarashina2.2-1b. It is a starting point for pre-training, not a usable model.
transformers>=4.51.0
accelerate>=1.6.0
sentencepiece>=0.2.0
flash-attn>=2.7.3
import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer
model_name = "iamtatsuki05/ModernBERT-JP-1B-init"
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"ハチワレは{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)))
This table lists the initialization checkpoints prior to any training. All variants share the sarashina2.2 tokenizer.
| ID | Architecture | #Param. | #Param. w/o Emb. |
|---|---|---|---|
| iamtatsuki05/ModernBERT-JP-1B-init (this model) |
ModernBERT | 1304M | 1120M |
| iamtatsuki05/Llama-JP-1B-init | Llama | 1224M | 1040M |
This model is distributed under the MIT License.
@article{MIREI
title={同一条件下における Encoder/Decoder アーキテクチャによる文埋め込みの性能分析},
author={岡田 龍樹 and 杉本 徹},
journal={言語処理学会第 32 回年次大会 (NLP2026)},
year={2026}
}