/ Модель

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

Лицензия
CC BY-SA 4.0
Базовая модель
roberta-eus-euscrawl-base-cased
Библиотека
transformers
Опубликована
31 авг 2026

gector-eus-v2

Разметка токеновТекст → label

Модель GECToR для исправления грамматических ошибок и классификации их типов в баскском тексте.

24скачиваний за 30 дней0лайковвеса обновлены31 авг 2026

Бенчмарки

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

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

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

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

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

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

itzune/gector-eus-v2 — модель GECToR, разработанная для исправления грамматических ошибок в баскском языке. Она дообучена на 208 тысячах пар предложений из horkonpon-corpus и использует энкодер RoBERTa-eus-base с тремя головами: для выбора правок, обнаружения ошибок и классификации их типов. Размер модели — около 124 млн параметров.

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

По оценке на отложенной выборке horkonpon-corpus F0.5 исправления составил 77,6, а точность классификации типов ошибок на ошибочных словах — 75,8%. Слабее распознаются кальки и имена собственные; качество также может меняться в других предметных областях. Лицензия весов — CC-BY-SA-4.0.

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

  • исправление орфографических ошибок в баскских текстах
  • проверка баскской морфологии и грамматики
  • поиск ошибок пунктуации и регистра
  • классификация типов ошибок для объяснимой проверки текста
  • встраивание баскского корректора в веб-редактор

Ограничения

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

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

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

Открыть на Hugging Face

GECToR v2 — Multi-task Basque Grammatical Error Correction

A multi-task GECToR (Tag, Not Rewrite) model for Basque grammatical error correction, fine-tuned on horkonpon-corpus (208K EBE-grounded error pairs). This is the successor to gector-eus (v1), with three key improvements:

  1. Multi-task architecture — a third "type" head classifies each edited token into one of 8 error categories (spelling, morphology, punctuation, capitalization, zalantza, proper_noun, word_level, calque), enabling explainable corrections for linting/UI use.
  2. EBE-grounded training data — horkonpon-corpus covers 8+ error categories (not just morphology like v1), including real-word errors (zalantza) and calques from Spanish/French.
  3. Commercial license — training data is CC-BY-SA / CC-BY / public-domain, so the weights carry no NonCommercial restriction (unlike v1).

Model details

ArchitectureGECToR (RoBERTa-eus-base encoder + 3 heads: edit-label, detect, type)
Base modelixa-ehu/roberta-eus-euscrawl-base-cased (Apache 2.0)
Parameters~124M
Training datahorkonpon-corpus: 161,670 pairs (error + clean natures)
LicenseCC-BY-SA 4.0
Error typesnone, spelling, punctuation, capitalization, word_level, zalantza, morphology, proper_noun, calque

Evaluation results

Evaluated on the horkonpon-corpus held-out eval split (1,037 errorful + 1,037 clean sentences), min_error_prob=0.5, 5 iterations.

Correction

MetricGECToR v2 (mt)GECToR v1Gemma 4 (FT)Gemma 4 (base)
F0.577.647.5¹80.82.2
Exact match51.3%18.0%¹65.5%7.0%
Precision87.6%83.8%¹86.3%1.8%
Recall53.3%17.4%¹64.4%16.5%
Clean FP1.8%1.7%¹8.6%97.2%

¹ v1 on horkonpon eval (domain shift — v1 was trained on Elhuyar morphology only, so it misses spelling/calque/zalantza errors). v1 scores F0.5=90.2 on its own Elhuyar Dem eval set.

Trade-off: The multi-task type head adds a small cost to correction (-1.2 F0.5 vs the single-task v2's 78.8) but enables per-token error-type classification. GECToR wins decisively on clean FP rate (1.8% vs Gemma 4's 8.6%) and is lightweight enough for in-browser ONNX deployment (~80MB).

The base Gemma 4 ablation (F0.5=2.2, 97.2% clean FP) confirms that fine-tuning is essential — the base LLM has linguistic knowledge but no minimal-edit discipline. See itzune/gemma-4-e4b-horkonpon for the full ablation report.

Error-type classification (new capability)

MetricValue
Overall word accuracy98.1% (15,348 words)
Type accuracy on error words75.8% (1,115 error words)
CategoryPrecisionRecallF0.5Support
morphology100.0%93.5%98.6%292
spelling95.7%92.4%95.0%170
punctuation97.8%70.7%90.9%258
word_level87.8%100.0%90.0%36
zalantza82.0%85.0%82.6%89
capitalization78.6%100.0%82.1%33
proper_noun100.0%38.7%75.9%83
calque100.0%28.7%66.8%76

High precision across all categories — when the model flags a type, it's almost always correct. Recall is lower for calque and proper_noun because the detection head often doesn't flag them as errors in the first place (the type head only fires on detected edits).

Usage

This is a GECToR-format model (custom architecture, not standard AutoModel). Use with the gotutiyan/gector package (MIT) or the multi-task fork in gector-eus-v2/gector_multitask.

import torch
from transformers import AutoTokenizer
from gector import GECToR
from gector.predict import predict, load_verb_dict

# Load model + tokenizer
model = GECToR.from_pretrained("itzune/gector-eus-v2")
model.eval()
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)

tokenizer = AutoTokenizer.from_pretrained("itzune/gector-eus-v2", add_prefix_space=True)
tokenizer.add_special_tokens({"additional_special_tokens": ["$START"]})

# Verb-form dictionary (for morphological reinflection)
# Download from gector-eus-v2 repo: data/verb-form-vocab.txt
encode, decode = load_verb_dict("verb-form-vocab.txt")

# Correct a sentence (pre-tokenized: punctuation split from words)
sentences = ["Ni uste hiru hilabetez ohean egoteak eragin zidala ."]
pred_lines, pred_types = predict(
    model, tokenizer, sentences, encode, decode,
    min_error_prob=0.5, batch_size=128, n_iteration=5,
    return_types=True,  # enable error-type head
)

print(pred_lines[0])
# → "Nik uste hiru hilabetez ohean egoteak eragin zidala ."

print(pred_types[0])
# → ['none', 'morphology', 'none', ...]  (per-source-word type labels)

In-browser deployment (ONNX)

Export to int4 ONNX (~80MB) for Transformers.js / WASM deployment:

PYTHONPATH=src python scripts/export_onnx.py \
    --model_dir itzune/gector-eus-v2 --out_dir onnx

The ONNX model exposes three outputs: logits (edit labels), logits_d (detection), and logits_t (error types) — enabling explainable in-browser GEC with error-type annotations.

Training details

HyperparameterValue
Epochs9 (early-stopped; best at epoch 8)
Cold epochs2 (encoder frozen, lr=1e-3)
Main lr1e-5 (linear schedule, 500 warmup)
Batch size32
Max length128 tokens
Type loss weight0.5
Early stoppingpatience=3 (on valid loss)
Seed42
HardwareNVIDIA L40 (46GB)

Training data composition (horkonpon-corpus, error + clean natures): 161,670 pairs including 10,605 mined morphology records. Categories: morphology (synthetic + mined), spelling, capitalization, punctuation, zalantza (real-word errors), word_level (h-dropping, sibilant confusion), calque, proper_noun.

Limitations

  • Calque recall is low (28.7%) — literal translations from Spanish/French require semantic understanding that the encoder struggles with.
  • Proper noun recall is low (38.7%) — the model can't know correct forms of place names, person names, etc. without world knowledge.
  • Punctuation recall is moderate (70.7%) — missing commas require clause-boundary understanding.
  • Domain-specific — trained on Basque web text (Berria, Wikipedia, EBE examples). Performance may vary on other text domains.
  • Pre-tokenization required — input must be pre-tokenized (punctuation split from words) for the model to work correctly.

Ethics

This model corrects grammatical errors in Basque text. It should not be used to penalize or shame language learners, dialect speakers, or writers using regional Basque variants. The model follows Euskaltzaindiaren Euskara Baturaren Eskuliburua (EBE) as the sole normative authority.

Citation

@misc{ezpeleta2026gectoreusv2,
  author       = {Ezpeleta, Xabi},
  title        = {GECToR v2: Multi-task Basque Grammatical Error Correction},
  year         = {2026},
  howpublished = {Hugging Face model},
  url          = {https://huggingface.co/itzune/gector-eus-v2}
}

Base model

@misc{artetxe2022euscrawl,
  title         = {Does corpus quality really matter for low-resource languages?},
  author        = {Artetxe, Mikel and Aldabe, Itziar and Agerri, Rodrigo and
                   Perez-de-Viñaspre, Olatz and Soroa, Aitor},
  year          = {2022}, eprint = {2203.08111},
  archivePrefix = {arXiv}, primaryClass = {cs.CL}
}

Architecture

@inproceedings{omelianchuk2020gector,
  title     = {GECToR--Grammatical Error Correction: Tag, Not Rewrite},
  author    = {Omelianchuk, Kostiantyn and Atrasevych, Vitaly and
               Chernodub, Artem and Skurzhanskyi, Oleksandr},
  booktitle = {Proceedings of the Fifteenth Workshop on Innovative Use of
               NLP for Building Educational Applications}, year = {2020}
}

Related

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

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

GPU в ailist

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

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

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

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

0 моделей