/ Модель

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

Контекст
514 токенов
Параметры
305 млн
Архитектура
xlm-roberta · dense
Базовая модель
xlm-roberta-base
Библиотека
transformers
Опубликована
2 авг 2026

ner-model

Разметка токеновТекст → label7 профессий

Модель на базе XLM-RoBERTa извлекает восемь типов именованных сущностей из англоязычных текстов.

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

Бенчмарки

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

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

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

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

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

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

Maarif Sariyev разработал англоязычную модель распознавания именованных сущностей на основе XLM-RoBERTa, дообученной для классификации токенов. Модель размечает восемь типов сущностей: PERSON, ORGANIZATION, LOCATION, JOB, PRODUCT, WORKOFART, TIMEDATE и AMOUNT. Она предназначена для извлечения сущностей из английских текстов, в том числе новостных. Модель содержит 305,2 млн параметров и поддерживает контекст до 514 токенов.

По описанию проекта, на небольшом наборе новостных текстов с ручной разметкой модель достигла F1 0,84. Её слабые места — распознавание должностей, границы денежных сумм, дат и измерений, а также ложные срабатывания на названия организаций. Обучающие данные для категории JOB преимущественно синтетические, а проверочный набор невелик. Модель основана на многоязычной XLM-RoBERTa, но обучающие данные и заявленные результаты относятся только к английскому языку; качество на азербайджанском не проверено. Лицензия в предоставленных сведениях не указана.

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Author: Maarif Sariyev


1. Project Overview

This project builds an English Named Entity Recognition (NER) system across a custom 8-label schema, following a four-stage methodology: (1) clean a small starter dataset, (2) expand and balance the training data, (3) train a first model and run quality assurance, and (4) diagnose weaknesses, relabel, and retrain.

The guiding philosophy throughout was small but clean, honestly evaluated data over large but noisy data. Every dataset went through structural validation, policy linting, and balance analysis before training. A key methodological decision was to build a real, hand-annotated benchmark to measure true generalization, rather than trusting metrics from synthetic-influenced test sets.

The 8-Label Schema

LabelDefinition
PERSONNames of real or fictional people
ORGANIZATIONInstitutions, companies, agencies, unions, galleries, museums, teams
LOCATIONCountries, cities, regions, landmarks, address components
JOBOccupations, professions, job titles, positions
PRODUCTProducts, software, hardware, AI products, named manufactured items
WORKOFARTBooks, films, songs, paintings, and other named creative works
TIMEDATEDates, times, durations, relative temporal references
AMOUNTMoney, percentages, quantities, measurements

2. Labeling Rules Per Label

Each label was governed by explicit annotation rules. These rules were encoded into an automated linter and applied consistently across all datasets and synthetic generation.

General Rules (all labels)

  • Offsets are the single source of truth. The surface value is always text[start:end]; no separate value field is stored, eliminating a whole class of drift bugs.
  • The end offset is exclusive (Python slice convention), aligning with HuggingFace tokenizer offset mapping.
  • Spans must not overlap (flat NER, single-label per token).
  • Only the 8 schema labels are valid; the invalid COMPANY label is context-mapped to ORGANIZATION.

PERSON

  • Annotate only the person name; drop titles and honorifics (Dr., Mr., President → dropped).
  • Keep the full name; never split (Kim Jong-Un stays as one entity).
  • A job title next to a name is a separate JOB entity (CEO Tim Cook → CEO=JOB, Tim Cook=PERSON).

JOB (most rule-intensive)

  • Annotate the full multi-word title including seniority and specialization (Senior Machine Learning Engineer, Chief Executive Officer).
  • Organization is a separate entity, never inside JOB (Director at Microsoft → Director=JOB, Microsoft=ORGANIZATION).
  • No articles, prepositions, or honorifics inside the span (the CEO → CEO).
  • Coordinated roles are separate JOB entities (Doctors and nurses → two JOB entities).
  • Generic role words that describe a profession are JOB (doctor, researcher, administrator), but purely situational roles are NOT (winner, victim, customer, employer → not labeled).

ORGANIZATION

  • Keep the official name including a leading "The" when official (The World Bank).
  • Departments, unions, galleries, and museums are organizations (Public and Commercial Services Union, Boesky Gallery, Inhotim museum).

PRODUCT / WORKOFART / TIMEDATE / AMOUNT

  • PRODUCT: keep the complete product name including brand and model (iPhone 15 Pro Max); AI products count (ChatGPT, Gemini, Siri). Brand splits off only when grammatically separate (Dell's Alienware 18 → Dell=ORG, Alienware 18=PRODUCT).
  • WORKOFART: keep the official title including a leading "The" (The Origin of the World); film franchise prefixes stay (Avengers: Doomsday).
  • TIMEDATE: keep articles/demonstratives (this month, the following day); drop approximation modifiers (about 3 hours → 3 hours) and leading prepositions.
  • AMOUNT: money, percent, quantity, and measurements; drop approximators (nearly $9bn → $9bn).

3. Datasets Used

Because no single public dataset covers all 8 labels — and none contains a JOB-title label — the training data was assembled from multiple sources, each converted to our schema and used for the labels it covers well:

DatasetRole / Labels ContributedNotes
Starter (100 rows)All 8 labels; hand-corrected goldCleaned in Stage 1; 763 spans, 43 rows fixed
MultiNERDPERSON, ORGANIZATION, LOCATION, WORKOFART, TIMEDATEStrong PER/LOC; weak TIMEDATE coverage; no JOB/PRODUCT/AMOUNT
OntoNotes 5.0AMOUNT (MONEY/PERCENT/QTY), PRODUCT, + othersMain source of AMOUNT and PRODUCT; no JOB
Synthetic JOBJOB (+ context labels)Generated to fill the JOB gap absent from all public sources
Synthetic multi-tokenPRODUCT, JOB (multi-word)Built to fix I-PRODUCT/I-JOB (multi-token spans)
Synthetic realisticJOB, WORKOFART, PRODUCTLonger real-style sentences to reduce template overfitting
Real benchmarkAll 8 labelsHand-annotated real news; split into train + held-out test

Label-to-source mapping was handled by dedicated converters:

  • MultiNERD: PER→PERSON, ORG→ORGANIZATION, LOC→LOCATION, MEDIA→WORKOFART, TIME→TIMEDATE (all other types dropped).
  • OntoNotes: MONEY/PERCENT/QUANTITY→AMOUNT, PRODUCT→PRODUCT, plus PERSON/ORG/GPE/LOC/WORK_OF_ART/DATE/TIME mapped through; rows kept only if they contained AMOUNT or PRODUCT.

4. Core Analysis & Processing Scripts

The pipeline is built from a set of reusable Python scripts. The core ones essential to the methodology:

ScriptPurpose
ner_lint.pyPolicy linter — validates every span against all labeling rules (offsets, boundaries, type-words, honorifics, label set, overlaps). Exits non-zero on structural errors.
ner_analyze.pyComprehensive dataset analyzer — 8 sections: overview, structural integrity, policy checks, recall-gap scan, label balance, label×source, length/density, duplication, plus a PASS/FAIL verdict.
recover_time_amount.pyHigh-precision regex recovery of unlabeled TIMEDATE/AMOUNT (fixes partial-annotation gaps from MultiNERD/OntoNotes).
balance_strict.pyAggressive quality gate + per-label quota with a hard cap — produces a small, balanced dataset; rare-labels-first selection stops PERSON/LOCATION from dominating.
split_and_bio.pyTrain/test split (test = real rows only, all synthetic sources excluded) + char-offset → BIO token conversion for the model.
train_ner.pyFine-tunes xlm-roberta-base with seqeval per-label metrics; logs all hyperparameters.
eval_benchmark.pyEvaluates the trained model on the real hand-annotated benchmark — the honest test.

Supporting generators (make_job_samples.py, make_multitoken_samples.py, make_realistic_jobs.py) produced the synthetic data; merge_dedup.py combined sources and removed duplicates.

Recommended pipeline order:

convert sources → merge/dedup → recover TIMEDATE/AMOUNT → balance → split + BIO → train → evaluate on benchmark

5. Iterations: Problems Encountered and How They Were Solved

Model 1 — Baseline

The first model reached macro-F1 0.73 (accuracy 0.89) on the internal test set. Per-label analysis exposed severe weaknesses:

  • B-JOB F1 = 0.08 — synthetic→real transfer failure.
  • I-PRODUCT F1 = 0.00 — the model could not tag any multi-word product.
  • ORGANIZATION precision 0.62 — heavy over-prediction of ORG.

Fix 1 — Multi-token synthetic samples

The root cause of the I-PRODUCT / I-JOB failure was too few multi-token examples. We generated synthetic samples deliberately rich in multi-word PRODUCT and JOB spans. Result on the internal test set: I-PRODUCT 0.00 → 0.93, B-JOB 0.08 → 0.90, macro-F1 0.73 → 0.93.

Problem discovered — inflated metrics (test leakage)

Some scores were suspiciously perfect (PERSON 1.00, I-JOB 1.00). Investigation revealed that the train/test split only excluded one synthetic source; newer synthetic sources were leaking into the test set, so the model was being evaluated partly on template data it had memorized. The split script was fixed to exclude ALL synthetic sources from the test set.

The decisive step — a real benchmark

Even with a clean split, the internal test set contained almost no real JOB examples. We hand-annotated a 44-sentence benchmark from real news text, resolving every ambiguous case by explicit rule decisions (galleries → ORGANIZATION, museums → ORGANIZATION, 'employers' → not JOB, ages → not TIMEDATE, film titles → WORKOFART). Evaluating Model 2 on this real benchmark told the true story:

MetricSynthetic-influenced testReal benchmark
Overall F10.930.66
JOB F10.900.22
WORKOFART F10.940.47
AMOUNT F10.920.56

This confirmed the classic risk of synthetic data: the model had memorized templates. Real news uses very different structures — JOB as a sentence subject ("Data scientists use..."), coordinated lists, and ORG+title+PERSON without an 'at' connector — none of which the template-based synthetic data contained.

Fix 2 — Real data + real-structure synthetic

Two combined actions: (1) half the real benchmark rows were moved into training so the model finally saw real job/work structures; (2) a new synthetic generator (make_realistic_jobs.py) mimicked the real structures observed in the benchmark — subject+verb, definition, coordinated lists, 'the JOB of', ORG+title+PERSON, and mid-sentence titles.


6. Final Results

The final model was evaluated on the held-out real benchmark — the honest measure of real-world performance.

LabelPrecisionRecallF1Support
PERSON1.0001.0001.00029
ORGANIZATION0.7200.7830.75023
LOCATION0.7500.9000.81810
JOB0.8670.6840.76519
PRODUCT0.8181.0000.9009
WORKOFART0.9231.0000.96012
TIMEDATE0.6670.8570.75014
AMOUNT0.6250.8330.71412
OVERALL0.8060.8750.839128

The trajectory of JOB F1 on the real benchmark tells the whole methodology story:

StageJOB F1 (real benchmark)Overall F1
Model 2 (synthetic-only JOB)0.220.66
Final (real + real-structure synthetic)0.7650.839

Adding real data and real-structure synthetic samples raised JOB F1 from 0.22 to 0.765 and overall real-world F1 from 0.66 to 0.84 — a decisive validation that the diagnosis (structural mismatch, not just data volume) was correct.


7. Remaining Weaknesses & Honest Limitations

  • JOB recall (0.684) is still the softest spot: real JOB data is scarce (only ~28 real examples total), so the model leans on synthetic structure. More real, lexically diverse job mentions would help most.
  • AMOUNT (0.71) and TIMEDATE (0.75) show boundary errors — e.g. attaching a year to a work title, or splitting multi-token measurements.
  • ORGANIZATION precision (0.72) — the model still over-predicts ORG on capitalized non-entities (nationalities, movement names).
  • Benchmark size (44 sentences) is small; several labels have <15 support, so their F1 has wide confidence intervals. A larger real benchmark would give more reliable numbers.
  • Synthetic dependence: JOB is ~98% synthetic in training. The realistic generator narrowed the gap, but this remains the primary structural risk.
  • Language: the data and model are English-only. The choice of xlm-roberta-base leaves the door open for future Azerbaijani extension, but performance on Azerbaijani is untested and expected to be weak until Azerbaijani data is added.

8. Summary

Starting from a messy 100-row starter set, the project produced a balanced 8-label NER dataset and a fine-tuned model reaching 0.84 F1 on real, hand-annotated news text. The central lesson — surfaced by building an honest benchmark — was that synthetic data must match real-world structure, not just supply volume. The iterative diagnose-fix-retrain loop, driven by per-label analysis and a real benchmark, turned a JOB F1 of 0.08 into 0.765 and a memorization-inflated 0.93 into a trustworthy 0.84.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
XLMRobertaForTokenClassification
Ревизия весов
1740c56

0 моделей