Run this model with HF Jobs
Run iamtatsuki05/Sentence-ModernBERT-JP-1B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/iamtatsuki05/Sentence-ModernBERT-JP-1B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/iamtatsuki05/Sentence-ModernBERT-JP-1B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use iamtatsuki05/Sentence-ModernBERT-JP-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use iamtatsuki05/Sentence-ModernBERT-JP-1B with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("iamtatsuki05/Sentence-ModernBERT-JP-1B") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Transformers
How to use iamtatsuki05/Sentence-ModernBERT-JP-1B with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("iamtatsuki05/Sentence-ModernBERT-JP-1B") model = AutoModel.from_pretrained("iamtatsuki05/Sentence-ModernBERT-JP-1B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Sentence-ModernBERT-JP-1B
English / Japanese
Overview
Sentence-ModernBERT-JP-1B fine-tunes iamtatsuki05/Sentence-ModernBERT-JP-1B-PT with supervised contrastive learning on cl-nagoya/ruri-v3-dataset-ft, yielding 1,792-dimensional Japanese sentence embeddings.
Usage
Requirements
sentence-transformers>=4.1.0
transformers>=4.51.0
accelerate>=1.6.0
sentencepiece>=0.2.0
flash-attn>=2.7.3
Sample Code
import torch
from sentence_transformers import SentenceTransformer
model_name = "iamtatsuki05/Sentence-ModernBERT-JP-1B"
model_kwargs = {
"torch_dtype": torch.bfloat16,
"attn_implementation": "flash_attention_2",
}
model = SentenceTransformer(model_name, model_kwargs=model_kwargs)
queries = ["ハチワレはどのようなキャラクターですか?"]
docs = [
"ハチワレは、『ちいかわ』に登場する猫風のキャラクターで、明るく社交的、前向きな性格が特徴。ちいかわたちと共に日常を楽しみつつ、討伐などの冒険にも積極的に挑む存在です。",
"うさぎは、天真爛漫でマイペースな性格が特徴のキャラクターで、突飛な行動力と鋭い直感でちいかわたちを引っ張る存在。自由気ままながらも仲間思いな一面を併せ持ちます。",
]
q_emb = model.encode(queries, normalize_embeddings=True)
d_emb = model.encode(docs, normalize_embeddings=True)
scores = model.similarity(q_emb, d_emb)
print(scores)
Model Details
- Base model: iamtatsuki05/Sentence-ModernBERT-JP-1B-PT
- Architecture: ModernBERT
- Maximum sequence length: 8,192 tokens
- Embedding dimension: 1792 (mean pooling)
- Tokenizer: SentencePiece / vocabulary size 102,400
- Positional encoding: RoPE
- Supported languages: Japanese
- Similarity metric: cosine
Model Series
These encoders start from weakly supervised checkpoints and undergo supervised fine-tuning on cl-nagoya/ruri-v3-dataset-ft.
| ID | Architecture | #Param. | #Param. w/o Emb. |
JMTEB-Avg | JMTEB-Retrieval | JMTEB-STS | JMTEB-Classification | JMTEB-Reranking | JMTEB-Clustering |
|---|---|---|---|---|---|---|---|---|---|
| iamtatsuki05/Sentence-ModernBERT-JP-1B (this model) |
ModernBERT | 1304M | 1120M | 63.51 | 60.52 | 81.61 | 57.92 | 67.04 | 50.47 |
| iamtatsuki05/Sentence-Llama-Bi-JP-1B | Llama | 1224M | 1040M | 61.50 | 56.38 | 79.14 | 55.63 | 64.66 | 51.70 |
| iamtatsuki05/Sentence-Sarashina-Bi-JP-1B | Llama | 1224M | 1040M | 66.36 | 65.03 | 83.16 | 61.90 | 71.37 | 50.34 |
Scores are measured on JMTEB v2. Each task-family score averages all datasets, splits, and subsets in the family, and JMTEB-Avg is the macro average over the five families.
Licence
This model is distributed under the MIT License.
How to Cite
@article{MIREI
title={同一条件下における Encoder/Decoder アーキテクチャによる文埋め込みの性能分析},
author={岡田 龍樹 and 杉本 徹},
journal={言語処理学会第 32 回年次大会 (NLP2026)},
year={2026}
}
@misc{okada2026decoder,
title={What Makes Decoder-Based Sentence Embeddings Strong? Rethinking Encoder and Decoder Architectures for Sentence Embeddings},
author={Tatsuki Okada and Toru Sugimoto and Yusuke Sakai and Taro Watanabe},
year={2026},
eprint={2611.41554},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2611.41554}
}
- Downloads last month
- 53
Model tree for iamtatsuki05/Sentence-ModernBERT-JP-1B
Base model
iamtatsuki05/ModernBERT-JP-1B-init