/ Модель

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

Лицензия
CC BY-NC 4.0
Опубликована
2 сен 2026

ami-yoruba-diacritics

Разметка токеновТекст → label3 профессии
20скачиваний за 30 дней1лайквеса обновлены2 сен 2026

Описание модели

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

ami восстанавливает пропущенные диакритические знаки в письменном тексте на йоруба, приводя его к стандартной орфографии.

ami — модель восстановления диакритических знаков в текстах на йоруба, разработанная Kenny0bi. Она возвращает тоновые знаки и точки под буквами, которые часто опускают при наборе текста, сохраняя исходные базовые буквы, пунктуацию и цифры. Модель предназначена для восстановления стандартной орфографии йоруба в сообщениях и других текстах; она не транскрибирует речь.

Это символьный двунаправленный LSTM-теггер с 1,29 млн параметров, двумя слоями и шестью классами для каждого символа. Модель рассчитана на работу на CPU; доступны экспорты ONNX, включая динамический INT8. На тестовой части MENYO-20k указана точность 92,4% по символам и 86,0% по словам. Лицензия CC BY-NC 4.0 ограничивает коммерческое использование.

Обучение проводилось на текстах MENYO-20k и Yorùbá Text C3. В README отмечено, что неформальные SMS, частое переключение между йоруба и английским, диалектные написания и незнакомые имена представлены хуже; результат нормализуется к стандартной орфографии.

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

  • восстановление тоновых знаков в сообщениях на йоруба
  • добавление точек под буквами ẹ, ọ и ṣ
  • нормализация текстов на йоруба к стандартной орфографии

Ограничения

Неформальные SMS, тексты с частым переключением на английский, диалектные написания и незнакомые имена представлены в обучении хуже. Модель нормализует текст к стандартной орфографии йоруба, поэтому восстановленные знаки для имён могут быть неверными.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

ami: Yoruba diacritic restoration

àmì is Yoruba for "mark". This model puts the marks back.

Written Yoruba depends on diacritics: the dotted letters ẹ, ọ, ṣ are different letters, and the tone marks distinguish words that are otherwise spelled the same (oko farm, ọkọ husband, ọkọ̀ vehicle). Most Yoruba text typed on phones and keyboards drops them. This model restores them, character by character, with a 1.29M-parameter BiLSTM that runs comfortably on a CPU, because a tool for restoring text messages should not need a GPU.

Results

Evaluated on the MENYO-20k test split (Adelani et al. 2021), the professionally translated and diacritized benchmark, never touched during training or model selection:

systemchar accuracyword accuracyambiguous-word accuracy
leave text unmarked0.3920.1550.122
word lookup (most frequent form)0.7710.6920.786
ami (this model)0.9240.8600.882

Char accuracy is scored only on positions that can legally carry marks, so the model gets no credit for copying consonants. Ambiguous words are those whose stripped form has more than one attested diacritization in training, which is 129,512 of the 149,693 test words: the cases a lookup table cannot decide.

Throughput on a 2014 4-core laptop CPU: about 9,643 characters per second.

Using it

from huggingface_hub import snapshot_download
import sys
path = snapshot_download("kenny0bi/ami-yoruba-diacritics")
sys.path.insert(0, path)
from restore import load_restorer

restorer = load_restorer(path)
print(restorer.restore("bawo ni oko re se n lo"))

The model only ever changes the marks. Base letters, punctuation, numbers and anything non-Yoruba pass through untouched, and combinations that are impossible in Yoruba orthography (a dot on a, a tone on ṣ) are masked out of the softmax, so the model is structurally unable to produce them.

Model details

  • character BiLSTM tagger, 1.29M parameters (embedding 64, hidden 192, 2 layers), six output classes per character: plain, grave, acute, dot, dot+grave, dot+acute
  • trained on 200,000 lines: the Yoruba side of the MENYO-20k training split plus the diacritized portion of the Yorùbá Text C3 corpus (Alabi et al. 2020), filtered to lines with genuine diacritic density and de-duplicated against the evaluation splits on stripped text
  • 3 epochs, 5907s of training on a 2014 laptop CPU
  • licence follows the data: CC BY-NC 4.0

Where the marks matter, measured

Knowing only the base letter, a mark costs 1.64 bits per restorable character to guess; e and o are hardest at about 2.5 bits each, because they can take all six classes. Knowing the whole word cuts the residue to 0.61 bits per word. That remainder is what sentence context has to resolve, and it is exactly where this model beats the lookup table.

Limits

  • Trained on published prose (news, religious text, Wikipedia-adjacent sources). Informal SMS-style Yoruba, heavy code-switching with English, and dialectal spellings are underrepresented.
  • The model restores standard Yoruba orthography and will normalise toward it; it is not a transcription of how any individual speaks.
  • Proper names it has never seen get the most probable marking, which may be wrong; names are the hardest case for any restorer.

Training code, evaluation, and the full honest-limits discussion: github.com/Kenny0bi/ami

ONNX exports

The onnx/ folder carries the same model exported for serving (see the gbe project for the pipeline and proofs): model.onnx (fp32, byte-identical restorations to this checkpoint on all 6,573 test sentences) and model.int8.onnx (dynamic INT8, 1.3 MB, ties fp32 at 92.39% vs 92.38% character accuracy on the full test set). The int8 file is what runs in the browser demo at kenny0bi/yoruba-diacritics.

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

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

GPU в ailist

Универсальный рантайм

Нельзя запустить

Архитектура ? неизвестна transformers в образе рантайма.

Ревизия весов
06b1e4f

0 моделей