llm-jp / llm-jp-modernbert-base

huggingface.co
Total runs: 772
24-hour runs: 0
7-day runs: -35
30-day runs: -33
Model's Last Updated: June 18 2025
fill-mask

Introduction of llm-jp-modernbert-base

Model Details of llm-jp-modernbert-base

llm-jp-modernbert-base

This model is based on the modernBERT-base architecture with llm-jp-tokenizer . It was trained using the Japanese subset (3.4TB) of the llm-jp-corpus v4 and supports a max sequence length of 8192.

For detailed information on the training methods, evaluation, and analysis results, please visit at llm-jp-modernbert: A ModernBERT Model Trained on a Large-Scale Japanese Corpus with Long Context Length

Usage

Please install the transformers library.

pip install "transformers>=4.48.0"

If your GPU supports flash-attn 2, it is recommended to install flash-attn.

pip install flash-attn --no-build-isolation

Using AutoModelForMaskedLM:

from transformers import AutoTokenizer, AutoModelForMaskedLM

model_id = "llm-jp/llm-jp-modernbert-base"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForMaskedLM.from_pretrained(model_id)

text = "日本の首都は<MASK|LLM-jp>です。"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)

# To get predictions for the mask:
masked_index = inputs["input_ids"][0].tolist().index(tokenizer.mask_token_id)
predicted_token_id = outputs.logits[0, masked_index].argmax(axis=-1)
predicted_token = tokenizer.decode(predicted_token_id)
print("Predicted token:", predicted_token)
# Predicted token:  東京
Training

This model was trained with a max_seq_len of 1024 in stage 1, and then with a max_seq_len of 8192 in stage 2.

Training code can be found at https://github.com/llm-jp/llm-jp-modernbert

Model stage 1 stage 2
max_seq_len 1024 8192
max_steps 500,000 200,000
Total batch size 3328 384
Peak LR 5e-4 5e-5
warmup step 24,000
LR schedule Linear decay
Adam beta 1 0.9
Adam beta 2 0.98
Adam eps 1e-6
MLM prob 0.30
Gradient clipping 1.0
weight decay 1e-5
line_by_line True

The blank in stage 2 indicate the same value as in stage 1.

Evaluation

JSTS, JNLI, and JCoLA from JGLUE were used. Evaluation code can be found at https://github.com/llm-jp/llm-jp-modernbert

Model JSTS (pearson) JNLI (accuracy) JCoLA (accuracy) Avg
tohoku-nlp/bert-base-japanese-v3 0.920 0.912 0.880 0.904
sbintuitions/modernbert-ja-130m 0.916 0.927 0.868 0.904
sbintuitions/modernbert-ja-310m 0.932 0.933 0.883 0.916
llm-jp/llm-jp-modernbert-base 0.918 0.913 0.844 0.892
LICENSE

Apache License, Version 2.0

Citation
@misc{sugiura2025llmjpmodernbertmodernbertmodeltrained,
      title={llm-jp-modernbert: A ModernBERT Model Trained on a Large-Scale Japanese Corpus with Long Context Length}, 
      author={Issa Sugiura and Kouta Nakayama and Yusuke Oda},
      year={2025},
      eprint={2504.15544},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2504.15544}, 
}

Runs of llm-jp llm-jp-modernbert-base on huggingface.co

772
Total runs
0
24-hour runs
39
3-day runs
-35
7-day runs
-33
30-day runs

More Information About llm-jp-modernbert-base huggingface.co Model

More llm-jp-modernbert-base license Visit here:

https://choosealicense.com/licenses/apache-2.0

llm-jp-modernbert-base huggingface.co

llm-jp-modernbert-base huggingface.co is an AI model on huggingface.co that provides llm-jp-modernbert-base's model effect (), which can be used instantly with this llm-jp llm-jp-modernbert-base model. huggingface.co supports a free trial of the llm-jp-modernbert-base model, and also provides paid use of the llm-jp-modernbert-base. Support call llm-jp-modernbert-base model through api, including Node.js, Python, http.

llm-jp-modernbert-base huggingface.co Url

https://huggingface.co/llm-jp/llm-jp-modernbert-base

llm-jp llm-jp-modernbert-base online free

llm-jp-modernbert-base huggingface.co is an online trial and call api platform, which integrates llm-jp-modernbert-base's modeling effects, including api services, and provides a free online trial of llm-jp-modernbert-base, you can try llm-jp-modernbert-base online for free by clicking the link below.

llm-jp llm-jp-modernbert-base online free url in huggingface.co:

https://huggingface.co/llm-jp/llm-jp-modernbert-base

llm-jp-modernbert-base install

llm-jp-modernbert-base is an open source model from GitHub that offers a free installation service, and any user can find llm-jp-modernbert-base on GitHub to install. At the same time, huggingface.co provides the effect of llm-jp-modernbert-base install, users can directly use llm-jp-modernbert-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

llm-jp-modernbert-base install url in huggingface.co:

https://huggingface.co/llm-jp/llm-jp-modernbert-base

Url of llm-jp-modernbert-base

llm-jp-modernbert-base huggingface.co Url

Provider of llm-jp-modernbert-base huggingface.co

llm-jp
ORGANIZATIONS

Other API from llm-jp

huggingface.co

Total runs: 8.9K
Run Growth: 8.1K
Growth Rate: 91.11%
Updated:February 04 2025
huggingface.co

Total runs: 1.3K
Run Growth: -148
Growth Rate: -11.56%
Updated:February 04 2025
huggingface.co

Total runs: 1.2K
Run Growth: 0
Growth Rate: 0.00%
Updated:September 27 2024
huggingface.co

Total runs: 887
Run Growth: -447
Growth Rate: -50.39%
Updated:September 27 2024
huggingface.co

Total runs: 638
Run Growth: 0
Growth Rate: 0.00%
Updated:January 31 2025
huggingface.co

Total runs: 321
Run Growth: 0
Growth Rate: 0.00%
Updated:September 27 2024
huggingface.co

Total runs: 180
Run Growth: -30
Growth Rate: -16.67%
Updated:February 04 2025
huggingface.co

Total runs: 102
Run Growth: 71
Growth Rate: 69.61%
Updated:February 27 2025
huggingface.co

Total runs: 94
Run Growth: 73
Growth Rate: 77.66%
Updated:February 27 2025
huggingface.co

Total runs: 91
Run Growth: 76
Growth Rate: 83.52%
Updated:February 27 2025
huggingface.co

Total runs: 85
Run Growth: 70
Growth Rate: 82.35%
Updated:February 27 2025
huggingface.co

Total runs: 85
Run Growth: 68
Growth Rate: 80.00%
Updated:February 27 2025
huggingface.co

Total runs: 79
Run Growth: 0
Growth Rate: 0.00%
Updated:December 23 2024
huggingface.co

Total runs: 77
Run Growth: 59
Growth Rate: 76.62%
Updated:February 27 2025
huggingface.co

Total runs: 42
Run Growth: 4
Growth Rate: 9.52%
Updated:September 19 2025