/ Модель

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

Контекст
1 024 токена
Параметры
72,4 млн
Лицензия
Apache 2.0
Архитектура
masinissa · dense
Опубликована
31 окт 2026

Masinissa-73M

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

Двунаправленная языковая модель для заполнения маски и построения контекстных представлений кабильского текста.

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

Бенчмарки

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

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

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

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

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

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

Masinissa-73M — плотная двунаправленная masked language model на 72,4 млн параметров, разработанная AƔBALU для кабильского языка (Taqbaylit) в латинской графике. Модель обучена с нуля на 3,92 млрд токенов кабильского текста; архитектура включает 20 слоёв, скрытый размер 512 и 8 голов внимания. Контекст — до 1024 токенов.

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

Это энкодер, а не генеративная модель: он не предназначен для продолжения текста, открытого диалога или перевода. Модель рассчитана на кабильский язык и не подходит для других языков; результаты downstream-задач требуют соответствующей задачи и классификатора. Лицензия — Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Masinissa-73M

A 73.3M-parameter masked language model for Kabyle (Taqbaylit, kab, Latin script), trained from scratch on 3.92 billion tokens of deduplicated, provenance-tracked Kabyle text.

Masinissa-73M establishes the definitive state of the art on KabEncBench, the unified multitask benchmark for Kabyle representation learning. In a 2,000-bootstrap Bradley–Terry tournament across nine models anchored at FacebookAI/xlm-roberta-base = 1,000, Masinissa-73M achieves an Elo rating of 1,953.7 (Tier 1), leading the nearest external baseline by +753.4 Elo points.

Results: KabEncBench

All models are evaluated on KabEncBench (Track A: Frozen Scale-Normalized Probe) across six core linguistic tasks and three diagnostic probes. Backbones are 100% frozen; a layer-weighted scalar mix (ScalarMix) and linear probe are fitted across 5 random seeds per learning rate.

Bradley–Terry Elo Leaderboard

Pairwise Bradley–Terry Elo ratings are computed via 2,000 paired cluster-bootstraps over all task items, anchored at FacebookAI/xlm-roberta-base = 1,000:

RankModelParametersElo (95% CI)Tier
1agbalu/Masinissa-73M73M1,953.7 [1,534.7, 3,379.1]Tier 1
2agbalu/Masinissa-31M31M1,708.4 [1,371.1, 2,886.2]Tier 2
3UBC-NLP/serengeti-E250278M1,200.3 [953.6, 1,480.1]Tier 3
4Davlan/afro-xlmr-base-76L_script278M1,151.6 [919.5, 1,451.0]Tier 3
5UBC-NLP/serengeti-E110110M1,148.2 [918.5, 1,421.2]Tier 3
6jhu-clsp/mmBERT-base278M1,141.7 [906.4, 1,435.3]Tier 3
7jhu-clsp/mmBERT-small135M1,039.1 [804.2, 1,282.5]Tier 3
8google-bert/bert-base-multilingual-cased178M1,012.6 [780.9, 1,266.8]Tier 4
9FacebookAI/xlm-roberta-base (Anchor)278M1,000.0 [1,000.0, 1,000.0]Tier 4

Comprehensive Task Performance (%)

ModelUPOS (Syntax)Aspect (Morph)Micro-F1 (NER)SentimentSIB-200 (Topic)PunctuationTaPaCo (Paraphrase)Minimal Pairs (Spell)
agbalu/Masinissa-73M80.5957.9188.2493.8364.8755.4264.3860.90
agbalu/Masinissa-31M78.8854.1987.7492.0659.2852.2158.7818.70
serengeti-E25076.9849.1383.9885.3343.7245.5442.556.30
serengeti-E11076.2448.8384.9185.6539.6443.1143.864.70
mmBERT-base75.5248.4484.0185.6437.9639.9848.6353.30
mmBERT-small75.7245.8481.7983.1734.9439.9148.9861.00
xlm-roberta-base75.4444.5279.7184.7538.2139.1242.1357.40
afro-xlmr-base75.3247.9383.0485.7538.4138.5648.5462.50
bert-base-multilingual73.2146.7980.6284.3540.8439.0151.7727.00

Part-of-Speech Tagging Detail (UD_Kabyle-ADPT)

On the gold Universal Dependencies UD_Kabyle-ADPT test split (845 sentences, 10,181 words, 8,563 whitespace tokens), Masinissa-73M scores 94.08% surface accuracy with a linear probe:

systemgold-wordssurfacegold-words, corruptedsurface, corrupted
Masinissa-73M + linear probe93.82%94.08%91.28%91.51%
Masinissa-31M + linear probe90.38%90.51%87.10%87.42%
most-frequent-tag baseline84.14%83.42%80.23%79.52%
boffire/kabyle-pos-v256.50%63.69%55.10%62.35%
lexicon projection26.65%27.67%23.15%24.15%

Stripping punctuation tokens isolates lexical and syntactic tagging performance:

systemsurface (clean)surface (non-punct)macro-F1 (all)macro-F1 (non-punct)
Masinissa-73M94.08%92.20%0.77430.7582
Masinissa-31M90.51%87.50%0.73010.7110
most-frequent-tag83.42%78.16%0.70510.6841

Three things worth reading carefully:

The encoder is frozen. Only the probe is fitted. This measures what pretraining put into the representation, not what a deep task head can learn.

Both tokenisation settings are reported because they disagree. 29.5% of UD_Kabyle-ADPT words sit inside a multiword token, so "accuracy" is two different numbers depending on whether you score gold word segmentation or raw whitespace tokens. Reporting both makes this distinction transparent.

The corrupted condition tests orthographic resilience. Kabyle text in the wild carries systematic homoglyph substitution (Greek ε U+03B5 for Latin ɛ U+025B, γ for ɣ) in 2.6–3.2% of public corpora. Masinissa-73M retains 91.51% accuracy under corruption.

Intended use

Kabyle NLP where high-capacity contextual representations are required: sequence labelling, named entity recognition, dependency parsing, sentence similarity, semantic retrieval, and fine-tuning for classification tasks.

Not suitable for: generative text continuation (it is a bidirectional encoder), open-ended dialogue, translation, or non-Berber languages.

Usage

Loadable directly via transformers and torch with trust_remote_code=True:

import torch
from transformers import AutoModelForMaskedLM, AutoTokenizer

REPO = "agbalu/Masinissa-73M"
tokenizer = AutoTokenizer.from_pretrained(REPO, trust_remote_code=True)
model = AutoModelForMaskedLM.from_pretrained(REPO, trust_remote_code=True).eval()

text = "Axxam n [MASK] meqqer."
encoded = tokenizer(text, return_tensors="pt")
with torch.inference_mode():
    logits = model(**encoded).logits

position = (encoded["input_ids"][0] == tokenizer.mask_token_id).nonzero()[0, 0]
top = logits[0, position].topk(5).indices
print([tokenizer.decode(piece) for piece in top])

For extracting representations rather than logits:

from transformers import AutoModel

encoder = AutoModel.from_pretrained(REPO, trust_remote_code=True).eval()
with torch.inference_mode():
    hidden = encoder(**tokenizer("Aman d tudert.", return_tensors="pt")).last_hidden_state
print(hidden.shape)  # (1, sequence_length, 512)

Normalise the input first. The vocabulary was built over text where ɛ is U+025B and ɣ is U+0263. Homoglyph-corrupted text fragments into fallback bytes and degrades downstream accuracy.

mammeri-tok-base-16k.model is the SentencePiece model the vocabulary was trained as, kept beside the converted tokenizer.json for anyone who needs the original.

Architecture

A modern deep bidirectional encoder featuring Block Attention Residuals and QK RMSNorm:

Trainable parameters73,318,016 (11.13% embedding table)
Layers / hidden / heads20 / 512 / 8 (head size 64)
Feed-forward1,408, SwiGLU
Vocabulary16,000, SentencePiece Unigram — agbalu/Mammeri-Tok
Position representationlog-bucketed relative positions, 32 buckets
Routing / ResidualsBlock Attention Residuals (Block AttnRes, block size 4) with Depth Attention
NormalisationRMSNorm ($\epsilon=10^{-6}$), with QK RMSNorm
Sequence length1,024 tokens
Classifiertied to input embeddings with learned vocabulary bias

Training data

AƔBALU Corpus — deduplicated Kabyle documents tokenised to 16,000 pieces via Mammeri-Tok. Pretraining consumed 3,918,417,150 tokens (3.92B tokens) over 28,731 updates.

Every source carries an audited provenance record (source id, licence, retrieval date). Text passed the reference normaliser at version 1.3.0+rules1.0.0, which standardises orthography while preserving all phonemic and spirantised distinctions (ɣ ɛ ḥ ḍ ṣ ṭ ẓ ṛ č ǧ ţ).

Decontamination. Evaluated against FLORES+ kab_Latn and SIB-200 with zero overlap, verified against a positive-control detector.

Licence composition of the training text

The model weights and code are released under Apache-2.0. As with all web-derived language corpora, the weights licence does not relicense the underlying texts:

redistributionsentencesshare
unclear1,062,56934.9%
permissive973,21832.0%
share-alike944,43831.0%
non-commercial61,7642.0%

Training recipe

ObjectiveMasked Language Modelling (dynamic masking, 15–20%, mean span 3.0)
OptimiserAdamW, peak lr 6e-4, $\beta=(0.9, 0.98)$, $\epsilon=10^{-8}$, weight decay 0.1
Batch size131,072 tokens/step (gradient accumulation from 8,192-token micro-batches)
Context curriculum512 tokens up to 3.41B tokens $\rightarrow$ 1,024 tokens to completion
Schedule2% linear warmup, cosine decay to 10% peak lr
Updates28,731 updates (3,918,417,150 tokens consumed)
Throughput42,046 tokens/sec sustained
PrecisionBF16 mixed precision, torch.compile + FlexAttention
Hardware1× NVIDIA H100 SXM 80GB (MIG 3g.47gb partition)
Seed20261030

Pretraining loss

Validation cross-entropy reached 2.9303 nats (perplexity 18.73, accuracy 49.51% at step 27,231), improving monotonically from 6.81 at step 50.

Files

filesizedescription
model.safetensors293.3 MB73,318,016 parameters (float32)
mammeri-tok-base-16k.model254 KBraw SentencePiece unigram model
config.json—architecture configuration, training summary, and auto_map
configuration_masinissa.py—MasinissaConfig for Hugging Face transformers
modeling_masinissa.py—MasinissaModel and MasinissaForMaskedLM
tokenizer.json, tokenizer_config.json1.0 MBconverted fast tokenizer for AutoTokenizer

Reproduction

The source pretraining snapshot is step 27,231 (SHA-256 91083cdf72e04c8dc0bd9edff0334a9be5232f49bfdd92a2a354c1902ccb6b00), promoted under minimum validation cross-entropy (2.9303 nats, perplexity 18.73).

The downstream POS evaluation protocol trains a 20-epoch frozen linear probe across the 1,085 training sentences of UD_Kabyle-ADPT (seed 0) and evaluates on the 845 gold test sentences. All reported metrics reproduce deterministically under the fixed seed.

The name

Masinissa (c. 238 – c. 148 BCE) was the first king of Numidia, uniting the Massylii and Masaesyli into a unified North African state. Masinissa-73M represents the highest-capacity monolingual encoder trained for Kabyle to date.

Citation

@software{agbalu_masinissa_73m_2026,
  title  = {Masinissa-73M: a deep bidirectional masked language model for Kabyle},
  author = {AƔBALU},
  year   = {2026},
  url    = {https://huggingface.co/agbalu/Masinissa-73M},
  note   = {Trained on AƔBALU text corpus; normaliser 1.3.0+rules1.0.0}
}

Licence

Apache-2.0 for weights and code.

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

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

0 моделей