mmBERT-CJKE-base
A multilingual encoder with an improved tokenizer for CJK+E
2 min readupdated
This model is a 312M-parameter encoder (a text analysis and feature extraction model) based on ModernBERT, trained to handle Korean, Chinese, Japanese, and English. The authors replaced the old Gemma 2 tokenizer (a tool that splits text into subwords) with the Gemma 3 version and fine-tuned the model on 30 billion tokens. The main difference from the original is fixed word boundary handling in ideographs and Korean script, making Korean text processing 27% more efficient in token count. Developers will find the model useful for text classification, search, and named entity recognition (NER) tasks.
Key features
- Multilingualism: Support for Korean, Chinese, Japanese, and English within a unified space.
- Tokenization efficiency: Reduced token consumption by 27.3% for Korean and 12% for Chinese.
- Accuracy gains: Improved results on the KLUE-NER F1 entity recognition task up to 0.9025.
- Base knowledge retention: Full retention of metrics on standard benchmarks (KLUE-TC, XNLI) without degradation.
What you can do
- Text classification: Apply the model for fine-tuning on moderation and review analysis tasks.
- Named entity recognition (NER): Use it for precise extraction of names, dates, and terms in Asian languages.
- Cross-encoders and search: Deploy it as a backend for semantic search and ranking systems.
Example
Running the model for Masked Language Modeling using the transformers library:
from transformers import AutoTokenizer, AutoModelForMaskedLM
import torch
repo = "CaveduckAI/mmBERT-cjke-base"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForMaskedLM.from_pretrained(repo, dtype=torch.bfloat16)
text = "서울은 대한민국의 이다."
inputs = tok(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
mask_idx = (inputs.input_ids == tok.mask_token_id).nonzero(as_tuple=True)[1]
print(tok.decode(logits[0, mask_idx].argmax(-1)))
Read more
Details• Architecture: ModernBERT (312M parameters, context up to 8,192 tokens).
• Training data: 30 billion tokens (FineWeb2 and Wikipedia for Korean, Chinese, Japanese, and English).
• Hardware and training: 4× NVIDIA H200 (DDP), two-stage recipe with FlashAttention-2 and PyTorch.
• License: MIT (the tokenizer is subject to Gemma Terms of Use).










Comments