/ Модель

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

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

punctuation-restoration-small

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

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

4 654скачиваний за 30 дней3лайкавеса обновлены13 ноя 2026

Бенчмарки

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

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

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

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

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

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

Horizon Labs Punctuation Restoration Small — мультиязычная модель на базе энкодера mmBERT-small с архитектурой ModernBERT и 140,5 млн параметров. Она восстанавливает знаки препинания в тексте без пунктуации, например в расшифровках ASR, субтитрах, сообщениях, голосовых заметках и OCR-тексте. После каждого слова модель предсказывает точку, запятую, вопросительный знак, двоеточие, тире или отсутствие знака. Поддерживает 88 языков; для китайского и японского README предлагает вспомогательную обработку, которая не требует сегментации слов. Контекст модели — 8192 токена.

Модель рассчитана на добавление пунктуации без изменения слов и регистра. Доступны веса Safetensors и ONNX, включая квантованный вариант int8 для CPU; заявлена совместимость с transformers.js для работы в браузере. По приведённым оценкам качество ниже на тексте в нижнем регистре, разговорной речи с запинками и повторами, а также на языках с малым количеством данных. Модель не восстанавливает восклицательные знаки, кавычки, скобки и некоторые другие знаки. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Punctuation Restoration (small, 140M): 88 languages

Adds punctuation back to text that has none: speech-recognition (ASR) transcripts, subtitles, chat messages, voice notes, OCR or scraped text. It predicts, after each word, one of . , ? : - or nothing, in 88 languages, with any casing (including the all-lowercase output of many ASR systems). 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 punctuation-restoration-base.

  • Same labels as oliverguhr/fullstop-punctuation-multilang-large and kredor/punctuate-all (0 . , ? - :), so it is a drop-in for the deepmultilingualpunctuation package.
  • Chinese and Japanese work too (no word segmentation needed) with the included punctuate.py, which writes ,。?: there, and । (Hindi, Bengali), ، ؟ (Arabic script), ; for questions in Greek and ። ፣ in Amharic.
  • It restores punctuation only. It does not change casing or the words. For lowercase text (such as ASR output) where you also want capital letters, use multilingual-punctuation-truecase-small.
  • onnx/model_quantized.onnx (int8 embeddings, 268 MB) predicts the same label as fp32 for 99.96% of tokens on 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, sys
spec = importlib.util.spec_from_file_location("punctuate", hf_hub_download("Horizon-Labs/punctuation-restoration-small", "punctuate.py"))
punctuate = importlib.util.module_from_spec(spec); spec.loader.exec_module(punctuate)

p = punctuate.Punctuator("Horizon-Labs/punctuation-restoration-small")
print(p("hello how are you today i hope everything is fine"))
print(p("今天天气很好我们去公园散步吧你觉得怎么样"))

As a drop-in for deepmultilingualpunctuation (space-separated languages; that package needs transformers 4.x, because it passes grouped_entities, which transformers 5 removed):

from deepmultilingualpunctuation import PunctuationModel
model = PunctuationModel(model="Horizon-Labs/punctuation-restoration-small")
print(model.restore_punctuation("my name is anna i live in berlin what about you"))

Plain transformers: the label of each word is the label of its last token ("0" = no mark).

from transformers import pipeline
tagger = pipeline("token-classification", model="Horizon-Labs/punctuation-restoration-small")
tagger("hello how are you today")

transformers.js:

import { pipeline } from "@huggingface/transformers";
const tagger = await pipeline("token-classification", "Horizon-Labs/punctuation-restoration-small", { dtype: "q8" });
console.log(await tagger("hello how are you today i hope everything is fine"));

Evaluation

Punctuation F1: micro-averaged over the five marks (a predicted mark counts only if it is the correct mark at the correct position), averaged over languages. Every model gets the same input: the paragraph with . , ? : ; ! - removed, once with its original casing and once lowercased (as most ASR output is). Same script for every model (code/). The test sets were used only for evaluation:

  • FLORES-200 devtest: professionally translated news, travel and wiki text; the consecutive sentences of one article form a paragraph (about 280 paragraphs per language). Columns: the 12 languages of punctuate-all, and our 88 training languages.
  • TED talks (TED2020 via OPUS): transcripts and their translations, 5 consecutive sentences, 200 paragraphs in each of 25 languages. Spoken style.
  • Europarl: European Parliament proceedings, 5 consecutive sentences, 200 paragraphs in each of 12 languages. punctuate-all and the fullstop models were trained on Europarl, so this column is in-domain for them; we never trained on it.
modellicencelanguagesFLORES, 12 EU languages (cased)(lowercased)FLORES, our 88 languages (cased)(lowercased)TED talks, 25 languages (cased)(lowercased)Europarl, 12 languages (cased)(lowercased)
this model (140M)Apache-2.0880.9200.8830.8420.7960.7860.7060.8780.830
punctuation-restoration-base (307M)Apache-2.0880.9220.8910.8470.8040.7950.7220.8810.839
punctuate-allMIT120.8790.8730.6670.6570.6640.6540.8850.884
fullstop-punctuation-multilang-largeMIT40.8410.8380.6690.6630.6480.6420.8260.824
fullstop-punctuation-multilingual-baseMIT60.8460.8290.6680.6520.6570.6360.8260.822
xlm-roberta_punctuation_fullstop_truecaseApache-2.047—0.818—0.689—0.643—0.751
punct_cap_seg_47_languageApache-2.047—0.565—0.448—0.510—0.504
  • The 1-800-BAD-CODE models expect lowercased input and also restore casing and split sentences; they are scored only on lowercased input, through the punctuators package, by re-reading their output against the input words. Words their output changed beyond casing (about 2% of words for xlm-roberta_punctuation_fullstop_truecase, 11% for punct_cap_seg_47_language) could not be aligned and count as "no mark", which lowers their scores somewhat.
  • On Europarl, punctuate-all (trained on it) is ahead of this model, most clearly on lowercased input.

Per mark (this model; mean over languages, FLORES over our 88):

markFLORES (cased)FLORES (lowercased)TED (cased)TED (lowercased)
.0.9450.8820.9000.788
,0.7250.6950.6840.626
?0.7710.6400.7980.709
:0.4420.4070.5710.504
-0.1750.1680.0720.062
languagethis model (cased)this model (lowercased)punctuate-all (cased)xlm-roberta_punctuation_fullstop_truecase (lowercased)
Afrikaans0.8460.8110.7380.767
Albanian0.8880.8300.8120.769
Amharic0.7650.7650.5570.721
Arabic0.7440.7430.6230.652
Armenian0.6060.5820.5400.551
Azerbaijani0.8660.8180.6850.753
Basque0.8490.7950.5760.543
Belarusian0.9350.8760.8230.808
Bengali0.7490.7490.6340.626
Bosnian0.9110.8600.6850.805
Bulgarian0.9280.8880.8810.849
Catalan0.8890.8440.8250.751
Central Kurdish0.6190.6190.1750.147
Chinese (Simplified)0.8380.8380.5760.771
Croatian0.9010.8590.6880.797
Czech0.9470.9150.9090.839
Danish0.9030.8910.7760.751
Dutch0.9260.8990.8990.835
English0.8720.8270.8100.780
Esperanto0.9030.8480.7790.713
Estonian0.9420.9020.8660.846
Faroese0.8710.8320.4380.466
Filipino0.8610.7840.6840.658
Finnish0.9420.8980.8590.864
French0.9110.8750.8610.806
Galician0.8970.8510.8330.752
Georgian0.7820.7810.6150.652
German0.9480.9290.9350.899
Greek0.8690.8050.8000.750
Gujarati0.7460.7460.6820.690
Hausa0.7680.5920.4990.512
Hebrew0.7910.7930.7440.611
Hindi0.7890.7890.7040.708
Hungarian0.9250.8690.7990.818
Icelandic0.8910.8290.7650.780
Indonesian0.8830.8100.7590.768
Irish0.8260.7200.6220.584
Italian0.8930.8470.8450.774
Japanese0.9090.9090.4460.806
Javanese0.8010.6670.5270.536
Kannada0.7470.7460.6480.709
Kazakh0.9020.8420.7110.752
Kinyarwanda0.7460.5720.2150.571
Korean0.8720.8720.7580.858
Kyrgyz0.9040.8500.6430.792
Latvian0.9450.9030.8450.861
Lithuanian0.9230.8660.7900.816
Luxembourgish0.8670.8380.2470.266
Macedonian0.8890.8400.7490.777
Malay0.8500.7680.7270.707
Malayalam0.6930.6930.5760.658
Maltese0.8360.7540.1880.246
Marathi0.7560.7550.6440.706
Mongolian0.8900.8440.6610.750
Nepali0.8190.8180.6860.686
Norwegian Bokmål0.8760.8460.8320.785
Odia0.6220.6230.6620.717
Pashto0.7300.7300.5220.652
Persian0.8170.8170.7450.678
Polish0.9290.8870.8980.857
Portuguese0.9000.8570.8480.793
Punjabi0.7690.7710.6810.685
Romanian0.9050.8660.8480.793
Russian0.9520.9130.8310.850
Serbian0.8960.8490.7110.798
Sindhi0.7220.7230.5870.646
Sinhala0.7220.7220.6240.731
Slovak0.9470.9100.9090.848
Slovenian0.9540.9200.9220.764
Somali0.7460.5860.4850.583
Spanish0.8800.8380.8350.778
Sundanese0.7880.6390.4720.489
Swahili0.8230.7210.6600.671
Swedish0.8780.8590.8370.796
Tajik0.9170.8790.1720.220
Tamil0.7190.7210.5990.688
Tatar0.8630.7970.2090.293
Telugu0.7230.7230.6280.695
Turkish0.8410.8090.6780.753
Ukrainian0.9270.8940.8460.848
Urdu0.7740.7750.6670.701
Uyghur0.7670.7670.6440.757
Uzbek0.8960.8400.6460.733
Vietnamese0.8510.7760.7180.668
Welsh0.8440.7630.6690.648
Xhosa0.7930.6380.3800.387
Yoruba0.7110.4550.2150.258
Zulu0.8040.6500.3600.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 is shown for comparison.

inputpunctuation F1 (20 languages)
this model on the recognizer's text0.754
this model on the correct text of the same sentences0.854
Whisper's own punctuation0.672
  • In the 11 European languages Whisper's own punctuation is slightly better (+0.010 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.
  • 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/.
languagethis modelWhisper
Arabic0.6640.063
Chinese0.7790.410
Dutch0.8290.826
English0.7570.789
French0.7780.796
German0.8690.876
Hindi0.6930.527
Indonesian0.7160.703
Italian0.7950.816
Japanese0.8790.607
Korean0.8280.637
Persian0.5710.482
Polish0.8320.860
Portuguese0.7870.799
Russian0.8400.858
Spanish0.8010.769
Swahili0.4380.419
Turkish0.7590.751
Ukrainian0.8120.832
Vietnamese0.6500.620

Training

  • Data: 1,168,626 text windows (119M words) in 88 languages from FineWeb-2 and FineWeb (ODC-BY). The labels come from the text's own punctuation: snippets that end in a full stop, are mostly letters and are not lists; 1-4 snippets per window (up to 230 words), 30% cut mid-sentence. 70% of the inputs were lowercased.
  • Spoken-style text (v1.1): 49,144 windows of edited transcripts of everyday speech (talks, podcasts, interviews, meetings, lectures, vlogs, phone calls ...) in 69 languages, written by Qwen3.8-27B (Apache-2.0) for this purpose; transcripts that shared a sentence with any test set were removed.
  • Normalisation: !, ;, … and script full stops (。 । ። ۔ ...) count as .; ,、، as ,; ?؟ (and ; in Greek) as ?; a free-standing dash as -. A . before a lowercase word (abbreviations) counts as no mark.
  • Model: mmBERT-small token classification, one label per word on its last token, 2 epochs, learning rate 5e-5. Checkpoint and number of epochs (2 over 1) chosen on held-out web text, not on the test sets.
  • Code: code/ in this repository.

Changelog

  • v1.1 (2026-10-09): + 49k windows of synthetic spoken-style transcripts (69 languages). TED talks (spoken, 25 languages), two training seeds: punctuation F1 .772 -> .786 (cased) and .688 -> .706 (lowercased). FLORES (written text, 88 languages) unchanged (.841 / .795).
  • v1.0 (2026-10-03): first release.

Limitations

  • Only . , ? : - are predicted. Exclamation marks, semicolons, quotes, brackets and Spanish inverted marks are not restored. : and especially - (a free-standing dash) are much less reliable than . , ? (see the per-mark table).
  • Accuracy on lowercased text is lower than on cased text, because capital letters reveal sentence starts.
  • Trained mostly on written web text, plus synthetic spoken-style transcripts. Disfluent speech (fillers, false starts, repetitions) is harder, and punctuation conventions vary by writer. Thai, Lao, Khmer, Burmese and Tibetan are not supported.
  • Low-resource languages and languages outside the 88 score lower (see the per-language table).

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей