/ Модель

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

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

multilingual-punctuation-truecase-small

Разметка токеновТекст → label8 профессий

Мультиязычная модель на 140,5 млн параметров восстанавливает пунктуацию и регистр в тексте с нижним регистром, например в расшифровках речи.

614скачиваний за 30 дней2лайкавеса обновлены13 ноя 2026

Бенчмарки

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

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

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

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

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

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

Multilingual Punctuation + Truecasing small — мультиязычная модель Horizon Labs для восстановления знаков препинания и регистра букв в тексте, предварительно приведённом к нижнему регистру. Она предсказывает для каждого слова один из знаков ., ,, ?, : или - либо отсутствие знака, а также тип регистра следующего слова. Модель основана на mmBERT-small и архитектуре ModernBERT для классификации токенов; содержит 140,5 млн параметров и поддерживает контекст до 8192 токенов. README заявляет обучение на 88 языках и приводит оценку также на языках, не входивших в обучение. В репозитории есть веса Safetensors и ONNX, включая квантованный вариант для запуска на CPU и в браузере через transformers.js.

Модель предназначена прежде всего для восстановления пунктуации и прописных букв в расшифровках распознавания речи, субтитрах и сообщениях чата. В опубликованных оценках она показывает высокое качество восстановления регистра и пунктуации на Europarl, TED Talks и FLORES; качество на языках вне обучающего набора ниже. Лицензия — Apache-2.0.

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

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

  • расстановка пунктуации в расшифровках аудиозаписей
  • восстановление заглавных букв в результатах ASR
  • нормализация регистра в субтитрах
  • восстановление пунктуации в сообщениях чата
  • постобработка многоязычных транскрипций

Ограничения

Исходный регистр игнорируется; модель восстанавливает только ., ,, ?, : и -, причём двоеточие и дефис менее надёжны. Смешанный регистр, редкие акронимы и небрежная разговорная речь обрабатываются хуже; тайский, лаосский, кхмерский, бирманский и тибетский не поддерживаются.

Для каких профессий подходит8

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

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

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

Открыть на Hugging Face

Multilingual Punctuation + Truecasing (small, 140M): 88 languages

Restores punctuation and capital letters in lowercase text in one pass, for example the output of a speech-recognition (ASR) system, subtitles or chat messages. For each word it predicts the mark that follows it (. , ? : - or nothing) and its casing (lower, Capitalized or UPPER). Trained on 88 languages. Built on mmBERT-small, Apache-2.0, ONNX files for CPU and the browser (transformers.js) included. Try it in the browser. A larger, more accurate version is available as multilingual-punctuation-truecase-base.

Actual output of this model (from the release check):

in : my name is anna i live in berlin and work for the united nations in new york
out: My name is Anna. I live in Berlin and work for the United Nations in New York.
in : ich heiße thomas und wohne in münchen was machst du am wochenende
out: Ich heiße Thomas und wohne in München. Was machst du am Wochenende?
  • A standard token-classification model with 18 labels <mark>|<case> (0|lower, .|Cap, ,|UPPER, ...), so it runs with the transformers pipeline and transformers.js. The included truecase.py turns the labels into text. It also writes ,。?: in Chinese and Japanese (no word segmentation needed), । in Hindi and Bengali, ، ؟ in Arabic script, ; for questions in Greek and ። ፣ in Amharic.
  • Input is lowercased first: the model was trained on lowercase text and does not use casing you already have. If your text is already cased and only lacks punctuation, use punctuation-restoration-small instead.
  • onnx/model_quantized.onnx (int8 embeddings, 268 MB) predicts the same label as fp32 for 99.91% of tokens on lowercased held-out text.

Usage

With the included helper (any language; long texts are processed in overlapping chunks):

from huggingface_hub import hf_hub_download
import importlib.util
spec = importlib.util.spec_from_file_location("truecase", hf_hub_download("Horizon-Labs/multilingual-punctuation-truecase-small", "truecase.py"))
truecase = importlib.util.module_from_spec(spec); spec.loader.exec_module(truecase)

t = truecase.Truecaser("Horizon-Labs/multilingual-punctuation-truecase-small")
print(t("my name is anna i live in berlin and work for the united nations in new york"))
print(t("今天天气很好我们去公园散步吧你觉得怎么样"))

Plain transformers: the label of each word is the label of its last token. Lowercase the text first.

from transformers import pipeline
tagger = pipeline("token-classification", model="Horizon-Labs/multilingual-punctuation-truecase-small")
tagger("the nasa mission launched on monday from florida")

transformers.js:

import { pipeline } from "@huggingface/transformers";
const tagger = await pipeline("token-classification", "Horizon-Labs/multilingual-punctuation-truecase-small", { dtype: "q8" });
console.log(await tagger("the nasa mission launched on monday from florida"));

Evaluation

Every system gets the same input: a paragraph lowercased, with . , ? : ; ! - removed. The test sets were used only for evaluation:

  • Europarl: European Parliament proceedings, 5 consecutive sentences, 200 paragraphs in each of 12 languages.
  • TED talks (TED2020 via OPUS): transcripts and their translations, 5 consecutive sentences, 200 paragraphs in each of 25 languages. Spoken style.
  • FLORES-200 devtest: professionally translated news, travel and wiki text, one paragraph per article. Columns: our 88 training languages, and all 199 FLORES languages (the extra 111 were never trained on).

Metrics are averaged over languages:

  • Casing F1: over the words that should be Capitalized or UPPER. A word counts only with the exact class, and capitals predicted on words that should be lower case count as false positives. Languages are included when their test text contains capitals (for Chinese, Japanese, Arabic and other scripts without case, only the few Latin-script words count).
  • Casing accuracy: all words, including the lower-case ones.
  • Punctuation F1: as on the punctuation-restoration cards. Micro-F1 over the five marks, and a mark counts only at the right position.

Casing F1:

modelEuroparl, 12 languagesTED talks, 25 languagesFLORES, our 88 languagesFLORES, all 199 languages
this model (140M)0.8870.8050.8830.784
multilingual-punctuation-truecase-base (307M)0.8970.8160.8860.796
punctuation-restoration-small + rule casing0.5410.5890.4820.389
xlm-roberta_punctuation_fullstop_truecase0.8300.7740.8020.658

Punctuation F1 (lowercased input):

modelEuroparl, 12 languagesTED talks, 25 languagesFLORES, our 88 languagesFLORES, all 199 languages
this model (140M)0.8260.7060.7940.584
multilingual-punctuation-truecase-base (307M)0.8360.7230.8030.602
punctuation-restoration-small + rule casing0.8300.7060.7960.588
xlm-roberta_punctuation_fullstop_truecase0.7500.6440.6890.483

Casing accuracy:

modelEuroparl, 12 languagesTED talks, 25 languagesFLORES, our 88 languagesFLORES, all 199 languages
this model (140M)0.9780.9750.9820.966
multilingual-punctuation-truecase-base (307M)0.9800.9770.9840.969
punctuation-restoration-small + rule casing0.9220.9490.9390.934
xlm-roberta_punctuation_fullstop_truecase0.9660.9670.9610.912
  • + rule casing is our punctuation-only model punctuation-restoration-small, followed by capitalizing the first word and every word after . or ? (and English "i"). This is what you get by adding capitals to the output of a punctuation-only model. Its punctuation F1 is that model's own lowercased-input score on these paragraphs.
  • xlm-roberta_punctuation_fullstop_truecase (Apache-2.0, 47 languages) was run through the punctuators package on lowercased input, with its sentence splitting turned off, and its output was re-aligned to the input words. 2.3% of words could not be aligned and count as "no mark, lower case", which lowers its scores somewhat. The FLORES columns include languages it was not trained on.
  • Two training seeds per size were evaluated before release. Mean casing F1 / punctuation F1 over Europarl, TED and FLORES-199: small .824 / .705, base .834 / .720.
languagecasing F1, this modelcasing F1, xlm-roberta_punctuation_fullstop_truecasepunctuation F1, this modelpunctuation F1, xlm-roberta_punctuation_fullstop_truecase
Afrikaans0.9070.8790.8080.768
Albanian0.9020.8520.8350.769
Amharic0.8030.5040.7610.720
Arabic0.8350.7520.7340.652
Armenian0.8910.8370.5770.551
Azerbaijani0.9070.8550.8180.750
Basque0.8750.7790.7890.544
Belarusian0.8990.8490.8770.808
Bengali0.8870.7970.7390.628
Bosnian0.9200.8940.8610.806
Bulgarian0.9250.8970.8860.849
Catalan0.9160.8530.8430.751
Central Kurdish0.8910.2140.6230.147
Chinese (Simplified)0.3100.9230.8290.771
Croatian0.9260.8980.8530.798
Czech0.9280.8880.9160.839
Danish0.9470.9140.8880.751
Dutch0.9470.9190.9000.835
English0.9280.8930.8260.781
Esperanto0.8940.8380.8490.713
Estonian0.9290.9000.9050.847
Faroese0.9230.6820.8260.466
Filipino0.8790.8040.7700.658
Finnish0.9320.9170.8960.865
French0.9340.8820.8710.806
Galician0.9140.8630.8490.752
Georgian0.8760.0950.7790.652
German0.9850.9780.9240.900
Greek0.8900.8650.8110.750
Gujarati0.9020.8650.7500.692
Hausa0.7920.6920.6050.512
Hebrew0.8580.8320.7890.612
Hindi0.8220.7320.7920.709
Hungarian0.9000.8710.8670.819
Icelandic0.9280.9090.8280.780
Indonesian0.9070.8810.8050.769
Irish0.8440.7030.7290.584
Italian0.9070.8590.8350.775
Japanese0.5570.8990.9050.806
Javanese0.8280.7630.6590.536
Kannada0.8590.7930.7490.709
Kazakh0.9180.8820.8420.752
Kinyarwanda0.7960.7680.5700.571
Korean0.9070.9130.8750.859
Kyrgyz0.9060.8800.8550.792
Latvian0.9140.8930.9080.862
Lithuanian0.9110.8860.8680.816
Luxembourgish0.9780.7020.8320.266
Macedonian0.9080.8730.8390.777
Malay0.8910.8500.7730.707
Malayalam0.8480.7380.6930.660
Maltese0.8960.3910.7550.247
Marathi0.9380.8810.7520.709
Mongolian0.8760.8490.8390.750
Nepali0.9530.9170.8130.686
Norwegian Bokmål0.9430.9050.8450.786
Odia0.8590.7670.6180.714
Pashto0.9420.9290.7280.653
Persian0.8940.8820.8150.678
Polish0.9190.9020.8880.857
Portuguese0.9160.8720.8530.793
Punjabi0.8960.7970.7590.685
Romanian0.9210.8850.8610.793
Russian0.9280.8900.9130.850
Serbian0.9120.8920.8510.798
Sindhi0.9220.8080.7210.648
Sinhala0.8730.8380.7160.731
Slovak0.9310.8890.9130.848
Slovenian0.9320.8880.9190.764
Somali0.7740.7640.5960.583
Spanish0.9220.8710.8390.778
Sundanese0.8310.7350.6380.489
Swahili0.8450.8220.7160.672
Swedish0.9510.9080.8590.797
Tajik0.9050.2500.8830.220
Tamil0.8920.8390.7110.692
Tatar0.8930.5410.8040.293
Telugu0.9320.9180.7210.699
Turkish0.9320.8930.8010.750
Ukrainian0.9080.8840.8920.849
Urdu0.9230.7800.7690.702
Uyghur0.9020.8240.7530.757
Uzbek0.8910.8260.8370.733
Vietnamese0.8660.7920.7650.668
Welsh0.8700.7550.7500.649
Xhosa0.7940.5720.6550.387
Yoruba0.7170.5210.4670.259
Zulu0.7630.5200.6430.365

On real speech-recognizer output (checked November 2026)

Speech recognizers make word errors, so we also tested the model on real recognizer output. We used the FLEURS test recordings (CC-BY-4.0): 6,424 read sentences in 20 languages. They were transcribed by Whisper-large-v3-turbo, and the transcripts were lowercased and stripped of punctuation, like the output of recognizers that produce neither. Scoring is end to end: a mark or capital on a word the recognizer got wrong counts as missed. That is why even perfect punctuation of the recognizer's text cannot reach the scores on the correct text. Whisper's own punctuation and casing is shown for comparison.

inputpunctuation F1 (20 languages)casing F1 (14 languages with cased scripts)
this model on the recognizer's text0.7510.775
this model on the correct text of the same sentences0.8510.912
Whisper's own punctuation and casing0.6720.777
  • In the 11 European languages Whisper's own punctuation is slightly better (+0.013 F1 on average in its favour). This model is clearly better in Arabic, Chinese, Japanese, Korean, Hindi. If your recognizer already punctuates well in your language, this model may not add much; if it outputs no punctuation, this is the quality to expect.
  • Casing is not scored for Arabic, Persian, Hindi, Korean, Chinese and Japanese: their only capitals are Latin-script names, which the recognizer usually writes in the native script.
  • FLEURS recordings are single read sentences. Long spontaneous speech, with hesitations and false starts, is likely harder. Thirty recordings longer than 30 seconds were skipped. Files: eval/speech_asr_text.json; scripts: code/speech/.
languagepunctuation: this modelpunctuation: Whispercasing: this modelcasing: Whisper
Arabic0.6550.063n/an/a
Chinese0.7820.410n/an/a
Dutch0.8220.8260.8250.829
English0.7490.7890.8280.831
French0.7770.7960.7860.805
German0.8630.8760.9170.912
Hindi0.6840.527n/an/a
Indonesian0.7020.7030.7280.706
Italian0.7940.8160.8250.837
Japanese0.8750.607n/an/a
Korean0.8350.637n/an/a
Persian0.5720.482n/an/a
Polish0.8240.8600.8030.836
Portuguese0.7890.7990.7950.794
Russian0.8450.8580.8040.814
Spanish0.7970.7690.8200.807
Swahili0.4500.4190.5370.511
Turkish0.7610.7510.7840.775
Ukrainian0.8120.8320.7510.772
Vietnamese0.6430.6200.6450.652

Training

  • Data: the training text of punctuation-restoration v1.1: 1,168,626 windows (119M words) of FineWeb-2 and FineWeb web text (ODC-BY) in 88 languages, plus 49,144 synthetic spoken-style transcripts in 69 languages, written by Qwen3.8-27B (Apache-2.0) for this purpose. Any transcript that shared a sentence with a test set was removed.
  • Labels come from the original text. Punctuation is normalized as for punctuation-restoration. The casing classes are: Cap (first cased letter upper case), UPPER (two or more cased letters, all upper case) and lower (everything else, including words in scripts without case). The model always sees the text lowercased.
  • Model: mmBERT-small token classification, 18 joint labels on each word's last token, 2 epochs, learning rate 5e-5 (the punctuation-restoration-small recipe). The checkpoint and the released seed were chosen on held-out web text by the mean of punctuation F1 and casing F1.
  • Release criteria, fixed before training: punctuation F1 no more than .01 below punctuation-restoration-small on lowercased input; casing F1 at least .05 above the rule baseline on every test set and .10 above on average; and higher casing F1 than xlm-roberta_punctuation_fullstop_truecase on Europarl + TED. Both sizes passed.
  • Code: code/ in this repository.

Limitations

  • Only three casing classes. Mixed-case words come out wrong: iphone becomes Iphone, and mcdonald's becomes Mcdonald's. All-caps words are rare (0.3% of the words in the test text), so acronyms the model has not seen may stay lower case.
  • Capitals on names depend on the model having seen the name or its context. This is weaker in low-resource languages (see the per-language table).
  • The mark after a word and the casing of the next word are separate labels, so the model sometimes writes a comma followed by a capital ("Hello, How are you") where a full stop belongs or the next word should be lower case. On the test sets this happens for about 1 in 1,000 words or fewer, and most comma + capital predictions are right (a name after a comma). A decoding that re-checks these boundaries did not help on held-out text (eval/boundary_decoding.json), so truecase.py uses the plain predictions.
  • Your casing is ignored: the input is lowercased first.
  • Only . , ? : - are predicted. Exclamation marks, semicolons, quotes and brackets are not restored, and : and - are much less reliable than . , ?. Thai, Lao, Khmer, Burmese and Tibetan are not supported.
  • Trained mostly on written web text, plus synthetic spoken-style transcripts. Disfluent speech (fillers, false starts, repetitions) is harder.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей