/ Модель

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

Лицензия
Apache 2.0
Библиотека
gliner
Опубликована
21 сен 2026

barb-2-ie-vi

Разметка токеновТекст → label5 профессий
19скачиваний за 30 дней0лайковвеса обновлены21 сен 2026

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

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

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

belumind/barb-2-ie-vi — модель GLiNER для совместного извлечения именованных сущностей и отношений из вьетнамского текста. Она дообучена на базе knowledgator/gliner-relex-large-v1.0; при обучении в 30% примеров убирались метки отношений, чтобы модель лучше находила сущности даже без списка отношений в запросе. Вызов только для извлечения сущностей показывает F1 72,60 против 68,63 у barb-1 на тесте из 450 предложений.

Модель предназначена для разметки сущностей и связей в вьетнамской прозе, похожей на тексты Википедии. Полный вызов с отношениями даёт F1 74,87 для сущностей; извлечение отношений — F1 62,14. Лицензия Apache-2.0. В карточке указаны библиотека GLiNER и веса в форматах PyTorch и safetensors.

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

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

Ограничения

Слабо извлекает редкие типы сущностей, особенно длинные упоминания; на тексте без диакритики и в извлечении отношений немного уступает barb-1. Проверена на вьетнамской прозе в стиле Википедии; качество на юридических, медицинских и разговорных текстах не измерялось.

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

barb-2-ie-vi

Joint entity and relation extraction for Vietnamese. It no longer needs the relation labels to do good entity extraction - which is what separates it from barb-1.

The problem it fixes

GLiNER encodes the relation labels you pass alongside the entity labels, and the entity head learns to lean on them. On barb-1 that dependence costs you 6.2 F1 if you only want entities and pass a placeholder relation:

entity-only callfull call (18 relations)gap
barb-168.6374.806.17
barb-272.6074.872.27

Paired bootstrap, barb-2 minus barb-1 on 450 sentences:

measurementdelta95% CIresamples positive
entity-only NER+3.96[+2.66, +5.43]100%
full-call NER+0.08[-0.86, +1.02]57%
relations (strict)-1.32[-3.93, +1.36]17%

So: a real, certain gain when you skip the relations, no loss when you do not, and a small relation cost that the data cannot distinguish from zero.

That also buys throughput. Passing 18 relation labels costs 35% of it (71.3 vs 46.0 sentences/s on one A100, fp32, batch 16). With barb-2 you can skip them for 2.3 F1 instead of 6.2.

How it was trained

Same recipe as barb-1 - fine-tuned from knowledgator/gliner-relex-large-v1.0, 8,910 steps, clean sentences kept and degraded copies added alongside - with one change: the relations were stripped from 30% of the training examples, so the model had to learn to find entities without that prompt some of the time.

30% is tuned, not arbitrary. At 50% the entity-only gain is larger (73.97) but relations drop to 60.53, past what we were willing to pay. The trade is continuous and the mix ratio is the dial.

Results

450 sentences / 1,328 spans, hand-audited. Each row at its own best threshold.

barb-1barb-2
Clean text74.80 (0.65)74.87 (0.65)
Entity-only call68.6372.60 (0.60)
Diacritics stripped63.2562.34 (0.60)
ALL CAPS56.0654.65 (0.60)
Relations, strict63.4162.14 (0.50/0.60)
Job-title boundaries (55 spans)16 exact, F1 23.3617 exact, F1 27.64

barb-2 gives up about a point on degraded text and on relations, and takes 3.96 on the entity-only call. If your pipeline always passes the full relation list and you care most about no-diacritics input, barb-1 is still the better pick.

Per entity type, threshold 0.65

typePRF1
ngay95.397.896.6
dia diem84.279.381.7
van ban92.370.680.0
to chuc83.763.672.3
nguoi69.870.069.9
tac pham70.637.549.0
giai thuong41.225.031.1
san pham46.223.130.8
chuc vu71.415.225.0
su kien22.211.114.8

The five rare types are weak on RECALL, not precision, and they are the longest-spanned types in the schema while having the fewest training examples. We tested six cheap fixes for this and all six failed; see Known limitations.

Usage

pip install gliner==0.2.29
import os, sys
from gliner import GLiNER
from huggingface_hub import hf_hub_download

model = GLiNER.from_pretrained("belumind/barb-2-ie-vi").to("cuda")

sys.path.insert(0, os.path.dirname(
    hf_hub_download("belumind/barb-2-ie-vi", "barb_labels.py")))
from barb_labels import extract, ENTITY_LABELS

# entities + relations
ents, rels = extract(model, [text], threshold=0.5, relation_threshold=0.6, json_keys=True)

# entities only - now cheap
ents, _ = extract(model, [text], labels=ENTITY_LABELS, relations=["x"], threshold=0.6)

Operating points, measured

what you wantentity thresholdrelation_threshold
Entities only0.60-
Entities + relations0.500.60
Maximum entity precision0.70-
Degraded input (no diacritics / ALL CAPS)0.60-

Labels must keep their Vietnamese diacritics

GLiNER encodes the label STRING with the same text encoder as the input, so the label you pass is itself a piece of Vietnamese text. Measured on barb-1 at threshold 0.65:

labels passed to the modelNER F1cost
with diacritics, spaces74.8-
ASCII, spaces (to chuc)39.8-35.0
snake_case ASCII (to_chuc)29.6-45.2

Two separate penalties, and both are silent. We also checked whether the gain from real relation labels is just prompt length: 18 meaningless labels score 69.1 and 18 scrambled ones 68.6, against 74.8 for the real list. It is the meaning, not the count.

barb_labels.check_labels() raises on a de-accented known label and warns on underscores. snake_case is fine as an OUTPUT key - extract(..., json_keys=True) maps it for you - it just must never be what you hand the model.

Weights ship as both model.safetensors and pytorch_model.bin, byte-identical.

Known limitations

  • The five rare types are weak: su kien 14.8, chuc vu 25.0, san pham 30.8, giai thuong 31.1, tac pham 49.0. The failure is recall, and the cause is measured: 96% of training spans belong to the four common types, which average 2.2-3.4 tokens, while the weak types are the longest in the schema. The model learned a short-span prior. We tested and rejected six cheap fixes for this - per-type thresholds, two kinds of boundary post-processing, an initialization change, a false-negative hypothesis, and 8x oversampling - none survived a held-out test. What is left is roughly 3,000 new annotated spans or a length-aware loss.
  • Job titles: 17 of 55 on the correctly-bounded benchmark. Better than barb-1 (16) and than the base model (16 at the same threshold), but still low in absolute terms.
  • Slightly behind barb-1 on degraded text (62.34 vs 63.25 stripped, 54.65 vs 56.06 ALL CAPS) and on relations (62.14 vs 63.41).
  • Benchmark gold is still missing entities, so absolute F1 understates every model on it. Comparisons between models are unaffected.
  • Vietnamese Wikipedia-style prose. Legal, medical and conversational text are out of distribution and have not been measured.

Related

Citation

@misc{barb2ievi2026,
  title   = {barb-2-ie-vi: relation-independent joint IE for Vietnamese},
  author  = {Belumind},
  year    = {2026},
  howpublished = {https://huggingface.co/belumind/barb-2-ie-vi}
}

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

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

GPU в ailist

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

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

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

Ревизия весов
228dc29

0 моделей