/ Модель

Характеристики

Контекст
8 192 токена
Параметры
312 млн
Лицензия
MIT
Архитектура
modernbert · dense
Базовая модель
mmBERT-base
Библиотека
transformers
Опубликована
25 ноя 2026

DuckBERT-base

Заполнение пропусковТекст → текст

Многоязычный энкодер ModernBERT для дообучения на классификацию и другие задачи понимания корейского, китайского, японского и английского текста.

160скачиваний за 30 дней0лайковвеса обновлены30 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

DuckBERT-base — плотный энкодер на 312 млн параметров от Warp Space Inc. (CaveduckAI), основанный на jhu-clsp/mmBERT-base с архитектурой ModernBERT. Авторы заменили токенизатор Gemma 2 на Gemma 3 с словарём 262 тыс. токенов и продолжили предобучение на 132 млрд токенов с задачей masked language modeling. Модель принимает текст и поддерживает контекст до 8192 токенов.

Модель предназначена прежде всего для дообучения на классификацию, распознавание сущностей, поиск фрагментов, ранжирование и другие задачи понимания текста на корейском, китайском, японском и английском языках. По сравнению с исходной моделью она показывает лучшие результаты на большинстве приведённых корейских, японских и китайских задач; корейский текст токенизируется компактнее. Лицензия — MIT.

DuckBERT-base обучалась только на задаче MLM и не является готовой моделью эмбеддингов: для получения эмбеддингов требуется дополнительное контрастивное обучение. Для английского точность примерно на один пункт ниже базовой модели; на языках вне четырёх целевых языков качество может быть слабее. Корейский экстрактивный QA немного уступает исходной модели, а китайские данные были преимущественно упрощёнными, без специального фокуса на традиционное письмо. Корпуса могут содержать предвзятый или оскорбительный текст.

Сценарии применения

  • Классификация тем корейских текстов
  • Распознавание именованных сущностей на японском и китайском
  • Извлечение и разметка фрагментов текста
  • Оценка релевантности пар текстов после дообучения
  • Создание эмбеддингов после контрастивного обучения
  • Модерация и классификация ответов персонажей

Ограничения

Для получения качественных эмбеддингов требуется дополнительное контрастивное обучение; на языках вне корейского, китайского, японского и английского модель уступает исходной mmBERT-base. Английские результаты немного ниже базовой модели, корейский экстрактивный QA также слегка уступает ей; традиционный китайский специально не целевой.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

DuckBERT-base

DuckBERT-base is a 312M-parameter encoder for Korean, Chinese, Japanese and English. It starts from jhu-clsp/mmBERT-base (ModernBERT architecture), replaces the Gemma 2 tokenizer with the Gemma 3 tokenizer (262K vocab), and continues masked-language-model pre-training for 132B tokens. Korean text takes 27% fewer tokens, and the model is ahead of mmBERT-base on 12 of 14 Korean, Japanese and Chinese fine-tuning tasks (see Evaluation).

The name stands for Domain-augmented Understanding via Continued Knowledge transfer: the knowledge of the original model is carried over to a new tokenizer by continued pre-training, then extended with domain text.

mmBERT-base (original)DuckBERT-base
TokenizerGemma 2 (256K)Gemma 3 (262K)
Korean tokens for the same text4432 (−27.3%)
Chinese tokens for the same text2522 (−12.0%)
Japanese / English31 / 2531 / 25 (unchanged)
Korean + Japanese + Chinese, 14 fine-tuning tasks (avg ×100)81.682.3
KLUE-NER F1 (Korean)89.791.2
KoBEST COPA (Korean commonsense)72.976.7
JCommonsenseQA (Japanese)78.882.2
Parameters307M312M
Max positions8,1928,192

Developed by Warp Space Inc. (CaveduckAI). The model is the backbone for the lightweight classification, moderation and sequence-labeling models that run inside the Caveduck AI character platform. This repository was previously named CaveduckAI/mmBERT-cjke-base; the old id redirects here.

Why swap the tokenizer?

mmBERT-base is a strong multilingual encoder, but it inherits the Gemma 2 tokenizer, which inserts a prefix space in front of tokens. Chinese and Japanese have no spaces, and Korean spacing differs from English, so token boundaries end up misaligned with word boundaries. This hurts tasks where boundaries matter (NER, span detection, segmentation) and wastes context on Korean text. The mmBERT authors note this limitation and recommend the Gemma 3 tokenizer.

Swapping a tokenizer breaks the embedding table, so the new embeddings are initialized from overlapping tokens and sub-token averages and the model is then pre-trained further, embeddings first and the full model afterwards, until the knowledge of the original model is carried over to the new vocabulary.

Training

Stage 1 (embedding stabilization)Stage 2 (full adaptation)Stage 3 (domain-augmented)
Trainabletoken embeddings + MLM headall parametersall parameters
Tokens2B30B100B
LR1e-4, cosine8e-5, cosine8e-5, then decayed over the last 20B
Mask rate30%30%30%, then 15% over the last 20B
  • Objective: masked language modeling, sequence length 512, about 1M tokens per step, bf16 autocast, FlashAttention-2.
  • Hardware: 4× NVIDIA H200 (DDP) on kt cloud AI Nexus, about 600k tokens/s.
  • Held-out MLM loss (mean over the four languages): 1.65 after stage 2, 1.22 after stage 3.
  • Framework: PyTorch, 🤗 Transformers, 🤗 Datasets.

Data

StageSources
Stage 1–2 (32B)FineWeb2 (kor_Hang, cmn_Hani, jpn_Jpan), Wikipedia (ko/zh/ja), FineWeb-edu (English)
Stage 3 (100B)FineWeb2 and HPLT v2 (Korean, Chinese, Japanese web), DCLM-baseline (English), AI Hub Korean corpora (books, stories, classical literature)

The AI Hub corpora were built through projects of the National Information Society Agency of Korea (NIA). (AI Hub 데이터는 한국지능정보사회진흥원(NIA)의 사업 결과로 구축된 데이터를 활용했습니다.)

Evaluation

Both models were measured with one protocol: load the weights in fp32, fine-tune with the tokenizer files shipped in each repository, 20k training samples per task, 3 epochs, batch 32, best of two learning rates (3e-5, 5e-5), inputs truncated at 512 tokens, evaluated on up to 3k held-out samples. Scores are ×100 and come from a single seed, so differences below about 0.5 on one task are noise. These are model-to-model comparisons under a reduced protocol and are not comparable to leaderboard numbers. Raw results are in evaluation/.

Averages

mmBERT-baseDuckBERT-baseΔ
Korean (5 tasks)87.187.9+0.8
Japanese (4 tasks)87.087.6+0.6
Chinese (5 tasks)71.772.5+0.8
Korean + Japanese + Chinese (14 tasks)81.682.3+0.7
English (2 tasks)83.682.3-1.3

Per task

TaskLangMetricmmBERT-baseDuckBERT-baseΔ
KLUE-TC (topic classification)komacro F181.382.3+1.0
KLUE-NLIkoacc84.485.8+1.4
KLUE-STSkoPearson91.592.5+1.0
KLUE-NERkoF189.791.2+1.5
WikiAnn ko (NER)koF188.587.9-0.6
JGLUE MARC-jajaacc95.996.1+0.2
JGLUE JNLIjaacc91.192.1+1.0
JGLUE JSTSjaPearson92.291.9-0.3
WikiAnn ja (NER)jaF168.870.2+1.4
CLUE TNEWSzhacc54.655.8+1.2
CLUE OCNLIzhacc74.374.6+0.3
CLUE CMNLIzhacc78.579.0+0.5
CLUE AFQMCzhacc74.075.0+1.0
WikiAnn zh (NER)zhF177.278.2+1.0
XNLI enenacc84.182.9-1.2
WikiAnn en (NER)enF183.181.8-1.3

All four KLUE tasks, all five Chinese tasks and three of four Japanese tasks are above the base model. English is about 1 point lower: the last training stage is weighted toward Korean, Chinese and Japanese.

Commonsense reasoning and reading comprehension

A second suite with inputs up to 8,192 tokens (multiple choice scored per option, extractive QA scored over whole documents). Training sets were sub-sampled and each task was run once, so treat it as indicative.

TaskLangMetricmmBERT-baseDuckBERT-baseΔ
KoBEST COPAkomacro F172.976.7+3.8
KoBEST HellaSwagkomacro F180.080.5+0.5
KoBEST BoolQkomacro F178.077.9-0.1
KoBEST WiCkomacro F173.577.1+3.6
KoBEST SentiNegkomacro F190.189.6-0.5
KorQuAD 2.0 (full documents, 8,192 tokens)koF170.169.2-0.9
KLUE-MRCkoF166.165.9-0.2
JCommonsenseQAjaacc78.882.2+3.4
JaQuADjaF185.585.8+0.3
C3 (multiple-choice reading)zhacc72.673.8+1.2
CMRC 2018zhF187.988.9+1.0

The largest gains are on commonsense reasoning (KoBEST COPA, KoBEST WiC, JCommonsenseQA), which we attribute to the book and story corpora added in stage 3. Korean extractive QA is slightly below the base model: the Gemma 3 tokenizer saves Korean tokens partly by merging a noun with the particle that follows it, so a span model cannot always cut the answer exactly at a token boundary.

Downstream example: sequence labeling vs. LLMs and other encoders

A sequence labeler (DuckBERT-base + Linear + CRF) that segments AI character responses into dialogue, narration and speaker-prefix spans was compared on the same 120 held-out responses (30 each in Korean, English, Japanese and Traditional Chinese) with 21 general-purpose LLMs (2-shot prompts) and with seven public multilingual encoders fine-tuned on the same data with the same recipe.

Modelspan F1 (micro, 120 samples)span F1 (validation set, 3,322 samples)Max input
DuckBERT-base0.9940.9668,192
mmBERT-base0.9920.9658,192
mDeBERTa-v3 base0.9890.959512
XLM-R large0.9890.957512
XLM-R base0.9860.956512
mBERT0.9880.946512
Best LLM (DeepSeek V4 Pro, 2-shot)0.970n/an/a
GPT-5.5 (2-shot)0.966n/an/a

Inference cost of the labeler is about USD 0.001 per 1,000 responses on a single RTX A5000, against USD 0.06 for the cheapest LLM tested and USD 18.5 for GPT-5.5.

Tokenizer efficiency

Measured on identical texts (tokens per text, lower is better):

LanguageGemma 2 (mmBERT-base)Gemma 3 (this model)Change
Korean4432−27.3%
Chinese2522−12.0%
Japanese31310%
English25250%

Fewer tokens means more Korean text fits in the same context window and faster inference on Korean inputs.

Usage

from transformers import AutoTokenizer, AutoModelForMaskedLM
import torch

repo = "CaveduckAI/DuckBERT-base"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForMaskedLM.from_pretrained(repo)

text = "서울은 대한민국의 <mask>이다."
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)))

For downstream tasks use AutoModelForSequenceClassification / AutoModelForTokenClassification as with any ModernBERT checkpoint. Install flash-attn for the fastest path; the model falls back to SDPA otherwise. The checkpoint is stored in fp32; the MLM head is tied to the input embeddings.

Intended use and limitations

  • Intended as a base encoder for fine-tuning (classification, NER, span detection, cross-encoder scoring, embeddings after contrastive training) on Korean, Chinese, Japanese and English text.
  • Not a sentence-embedding model out of the box; it was trained with MLM only.
  • Continued pre-training used sequence length 512. The architecture supports 8,192 positions and the model runs at that length.
  • English fine-tuning accuracy is about 1 point below the base model.
  • Languages other than Korean, Chinese, Japanese and English were not part of continued pre-training; on a mixed 15-language XNLI input the model scores 79.7 against 82.1 for mmBERT-base. Use mmBERT-base for broad multilingual coverage.
  • Korean extractive QA is slightly below the base model because of the coarser Korean tokenization (see Evaluation).
  • Chinese web data is Simplified; Traditional Chinese was not specifically targeted.
  • The web corpora may contain biased or offensive content; apply your own filtering for sensitive applications.

License

  • Model weights and code: MIT, the same license as the base model jhu-clsp/mmBERT-base.
  • Tokenizer: derived from google/gemma-3-4b-pt. The tokenizer files are subject to the Gemma Terms of Use. mmBERT-base itself redistributes the Gemma 2 tokenizer under the same arrangement.

Acknowledgements

This model was trained on GPU resources provided through the 2026 High-Performance Computing Support Program of the National IT Industry Promotion Agency (NIPA), operated by the Korea Association for ICT Promotion (KAIT), on kt cloud AI Nexus (4× H200). (본 모델은 정보통신산업진흥원(NIPA) 「2026년 고성능컴퓨팅 지원사업」의 지원(운영기관 한국정보통신진흥협회, kt cloud AI Nexus H200 4장)을 받아 학습되었습니다.)

Acknowledgements

This model was trained on GPU resources provided through the 2026 High-Performance Computing Support Program of the National IT Industry Promotion Agency (NIPA), operated by the Korea Association for ICT Promotion (KAIT), on kt cloud AI Nexus (4× H200). (본 모델은 정보통신산업진흥원(NIPA) 「2026년 고성능컴퓨팅 지원사업」의 지원(운영기관 한국정보통신진흥협회, kt cloud AI Nexus H200 4장)을 받아 학습되었습니다.)

Citation

@misc{duckbert-base-2026,
  title  = {DuckBERT-base: a Korean/Chinese/Japanese/English encoder via tokenizer swap and continued pre-training of mmBERT},
  author = {Choi, Young and Warp Space Inc.},
  year   = {2026},
  url    = {https://huggingface.co/CaveduckAI/DuckBERT-base}
}

Please also cite the base model:

@misc{marone2025mmbert,
  title  = {mmBERT: A Modern Multilingual Encoder with Annealed Language Learning},
  author = {Marone, Marc and Weller, Orion and Fleshman, William and Yang, Eugene and Lawrie, Dawn and Van Durme, Benjamin},
  year   = {2025},
  url    = {https://arxiv.org/abs/2509.06888}
}

한국어 요약

DuckBERT-base는 jhu-clsp/mmBERT-base의 Gemma 2 토크나이저를 Gemma 3 토크나이저(262K vocab)로 교체하고, 한·중·일·영 132B 토큰으로 연속 사전학습한 인코더(312M)입니다. 동일 문장 기준 한국어 토큰 수가 27% 줄었고(44→32), 한·중·일 14개 미세조정 과제 평균은 81.6에서 82.3으로 올라 14개 중 12개 과제에서 원본을 넘었습니다. KLUE-NER F1은 89.7에서 91.2로, KoBEST COPA는 72.9에서 76.7로 올랐습니다. 영어 과제는 약 1점 낮습니다(자세한 수치는 Evaluation). 분류·개체명 인식·구간 검출·리랭킹 등 파인튜닝용 기반 모델로 쓰도록 만들었습니다.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · fill-mask

Можно запустить

Подбираем GPU…

Класс архитектуры
ModernBertForMaskedLM
Ревизия весов
d638fcc

0 моделей