/ Модель

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

Лицензия
Apache 2.0
Архитектура
extractor · dense
Базовая модель
gliner2-multi-v1
Библиотека
gliner
Опубликована
20 июн 2026

gliner2-ptbr-ontoevidence

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

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

0скачиваний за 30 дней0лайковвеса обновлены20 июн 2026

Бенчмарки

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

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

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

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

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

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

ottema/gliner2-ptbr-ontoevidence — модель извлечения сущностей, разработанная Ottema на архитектуре GLiNER2. Она дообучена для распознавания сущностей по онтологии из 58 меток в операционных текстах на бразильском португальском, особенно в материалах об образовании, технической поддержке и оказании помощи. Модель рассчитана на шумные тексты и неоднозначные слова, которые могут выглядеть как сущности, но не должны получать метку. Формат весов — safetensors, лицензия — Apache-2.0.

Обучение сочетало положительные примеры OntoEvidence-BR, образцы в стиле HAREM и отрицательные примеры против склонности предсказывать все метки. В тестовой оценке на 114 примерах модель показала F1 0,320 при пороге 0,3. Для более высокого полноты автор рекомендует порог 0,3, а для более высокой точности — 0,5 и выше. Модель функциональна, но качество ограничено: возможна путаница между метками, а результаты на реальных текстах могут ухудшаться из-за сдвига домена; обучение в основном опиралось на синтетические данные.

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

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

Ограничения

Возможна путаница между несколькими правдоподобными метками для одного фрагмента; результаты на реальных текстах могут ухудшаться из-за сдвига домена, поскольку обучение в основном использовало синтетические данные. По оценке автора, качество пока ограничено (F1 0,320 на тестовом наборе при пороге 0,3).

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

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

Открыть на Hugging Face

ottema/gliner2-ptbr-ontoevidence (v0.18)

Ontology-guided evidence extraction for Brazilian Portuguese operational text (education, technical support, assistance) with hard-negative rejection.

This is the first version with real weights, trained using an anti-yes-man recipe that combines OE positives with diverse HAREM-style samples to prevent the model from collapsing into predicting all labels.

Performance

Evaluation on the OntoEvidence-BR test set (114 samples, 302 entities, full 58-label ontology, threshold 0.3):

ModelOE samplesMix (OE/HAREM/anti)Avg pred/textPrecisionRecallF1Yes-man?
v0.18 (this model)204131% / 63% / 6%4.410.2560.4270.320No ✅
v0.17204145% / 45% / 10%4.270.2530.4070.312No ✅
v0.19 (5x OE data)387637% / 56% / 7%15.120.1020.5830.174Yes 🔴
v0.20 (3x vol, 31%)387631% / 63% / 6%14.510.1050.5760.178Yes 🔴
v0.16 (OE 70%, no HAREM)204170% / 30% / 0%17.960.0910.6160.158Yes 🔴

Data scaling findings:

  • More data is NOT always better. Doubling OE positives (v0.19, v0.20) reactivated yes-man even with HAREM majority.
  • Proportion matters more than volume. v0.18 succeeded at 31% OE / 63% HAREM with 6.5k total. Scaling the same proportion failed (v0.20).
  • The signal-to-noise ratio breaks down at scale. Synthetic HAREM samples become repetitive, weakening the "real text has few entities" lesson.
  • Real data would likely help. Synthetic-only training has hit a ceiling around F1=0.32.

A healthy model predicts 1-3 entities per text on average. The v0.18 model sits in this range, confirming the yes-man failure mode is broken.

Real-world examples (threshold 0.3)

Text: "a marcha n esta funcionando"

  • cambio_signal 0.83 ✅ (correct: gearbox issue)
  • pane_mecanica_signal 0.32 (correct: mechanical failure)
  • motor_signal 0.91 ⚠️ (over-predicted, but thresh=0.3 keeps it)

Text: "o motor falhou"

  • motor 0.998 ✅
  • pane_mecanica_signal 0.61 ✅
  • cambio_signal 0.73 ⚠️ (motor ≠ gearbox, but model is uncertain)

Text: "tô com febre"

  • febre 1.000 ✅
  • condicao_medica 1.000 ✅
  • servico_saude 0.59 (borderline)

The model gets the right entities with high confidence but has residual label confusion (predicting multiple plausible labels for the same span). This is the next challenge to address in v0.19+.

What is OntoEvidence-BR?

Operational text in Brazilian Portuguese — atendimento, suporte técnico, educação — is noisy, domain-specific, and full of hard negatives (everyday words that look like entities but aren't):

TextSurface formWhy it's a hard negative
"dê um passo pra frente""frente"Not a "front" entity; it's a movement direction
"o motor falhou""motor"Not a "car part" entity; it's a generic device
"a marcha foi longa""marcha"Could be "gear" (auto), "march" (protest), or "stride" (walking)
"tô com febre""febre"Medical symptom, not a "condition code"

Standard NER models trained on HAREM (journalistic) collapse on operational text because they learned to predict "local" for any capitalized word, "pessoa" for any first name, etc. OntoEvidence-BR trains models to discriminate between entity and non-entity in noisy domains.

The yes-man problem (and how we fixed it)

Earlier attempts to fine-tune GLiNER2 on OntoEvidence-BR caused a structural failure mode we call "yes-man" — the model learns to predict ALL ontology labels with confidence 1.0, regardless of input. We tried:

  • ❌ Curriculum learning (hard → easy)
  • ❌ Hard-negative mining (Wikipedia)
  • ❌ Decoy injection
  • ❌ Increasing weight of rare labels

What worked:

  • ✅ Mix OE positives with diverse HAREM-style samples (31% OE / 63% HAREM / 6% anti-yes)
  • ✅ Train from HAREM-specialized checkpoint (not from raw base)
  • ✅ Conservative LR (5e-7) and 1 epoch to prevent collapse

The HAREM-style mix teaches the model that most real text has few or no OE entities, breaking the "predict everything" bias.

Usage

from gliner2 import GLiNER2

model = GLiNER2.from_pretrained("ottema/gliner2-ptbr-ontoevidence")

text = "a marcha do carro n esta funcionando"
labels = [
    "marcha", "motor", "cambio_signal", "pane_mecanica_signal",
    "motor_signal", "pane_eletrica_signal",
]
entities = model.extract_entities(text, labels, threshold=0.3, include_confidence=True)
for label, spans in entities["entities"].items():
    for span_info in spans:
        if isinstance(span_info, dict):
            print(f"{label}: '{span_info['text']}' ({span_info['confidence']:.3f})")

Recommended threshold: 0.3 for high recall, 0.5+ for high precision.

Try the schema today

ottema/gliner2-ptbr-demo — interactive Gradio demo. Select the HAREM-specialized model and the OntoEvidence label presets to test hard-negative discrimination. For production use, this v0.18 model is preferred.

Future work (v0.19+)

The model is functional but not great. Known limitations:

  • Label confusion: predicts multiple plausible labels for the same span
  • Domain shift: trained mostly on synthetic; real text may degrade
  • Coverage: ontology has 58 labels, dataset has 62

Planned improvements:

  • Focal loss for hard-negative emphasis
  • Span-level negative sampling during training
  • Real operational data (without PII) — needed to break the F1=0.32 ceiling
  • Active learning with model predictions to find edge cases
  • Per-domain specialization (separate models for assistance vs technical_support vs education)

Training

  • Base: ottema/gliner2-ptbr-harem (HAREM-specialized)
  • Data: 2041 OE positives + 4082 HAREM-style mixed + 408 anti-yes-man = 6531 samples
  • Hyperparams: 1 epoch, encoder_lr=5e-7, task_lr=1e-5, batch_size=4, accum=4
  • Total time: ~2 min on RTX A4500

Credits

  • Base architecture: GLiNER2 (Urchade Zaratiana et al.)
  • Base weights: fastino/gliner2-multi-v1 (Fastino)
  • HAREM base: ottema/gliner2-ptbr-harem
  • Dataset + research: Ottema

License

Apache-2.0

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

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

GPU в ailist

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

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

Модели GLiNER требуют отдельного рантайма.

Ревизия весов
7150efe

0 моделей