/ Модель

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

Контекст
512 токенов
Лицензия
CC BY-SA 4.0
Архитектура
span-marker · dense
Базовая модель
roberta-large
Библиотека
span-marker
Опубликована
30 мар 2023

span-marker-roberta-large-fewnerd-fine-super

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

Модель на базе roberta-large распознаёт и классифицирует именованные сущности в английском тексте.

75скачиваний за 30 дней14лайковвеса обновлены22 мар 2024

Бенчмарки

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

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

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

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

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

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

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

Максимальная длина последовательности составляет 256 токенов, а максимальная длина распознаваемой сущности — 8 слов. Модель можно применять для извлечения сущностей из текста и дообучать на собственных данных. Она принимает текст и выдаёт метки сущностей для его фрагментов. Лицензия — CC BY-SA 4.0.

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

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

Ограничения

Модель рассчитана на английский язык, распознаёт сущности длиной до 8 слов и принимает последовательности длиной до 256 токенов.

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

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

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

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

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

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

Открыть на Hugging Face

SpanMarker with roberta-large on FewNERD

This is a SpanMarker model trained on the FewNERD dataset that can be used for Named Entity Recognition. This SpanMarker model uses roberta-large as the underlying encoder. See train.py for the training script.

Model Details

Model Description

  • Model Type: SpanMarker
  • Encoder: roberta-large
  • Maximum Sequence Length: 256 tokens
  • Maximum Entity Length: 8 words
  • Training Dataset: FewNERD
  • Language: en
  • License: cc-by-sa-4.0

Model Sources

Model Labels

LabelExamples
art-broadcastprogram"Street Cents", "The Gale Storm Show : Oh , Susanna", "Corazones"
art-film"Shawshank Redemption", "Bosch", "L'Atlantide"
art-music"Hollywood Studio Symphony", "Champion Lover", "Atkinson , Danko and Ford ( with Brockie and Hilton )"
art-other"Aphrodite of Milos", "Venus de Milo", "The Today Show"
art-painting"Production/Reproduction", "Cofiwch Dryweryn", "Touit"
art-writtenart"Imelda de ' Lambertazzi", "Time", "The Seven Year Itch"
building-airport"Sheremetyevo International Airport", "Newark Liberty International Airport", "Luton Airport"
building-hospital"Memorial Sloan-Kettering Cancer Center", "Hokkaido University Hospital", "Yeungnam University Hospital"
building-hotel"Flamingo Hotel", "The Standard Hotel", "Radisson Blu Sea Plaza Hotel"
building-library"British Library", "Berlin State Library", "Bayerische Staatsbibliothek"
building-other"Alpha Recording Studios", "Henry Ford Museum", "Communiplex"
building-restaurant"Fatburger", "Carnegie Deli", "Trumbull"
building-sportsfacility"Sports Center", "Glenn Warner Soccer Facility", "Boston Garden"
building-theater"Pittsburgh Civic Light Opera", "National Paris Opera", "Sanders Theatre"
event-attack/battle/war/militaryconflict"Jurist", "Vietnam War", "Easter Offensive"
event-disaster"the 1912 North Mount Lyell Disaster", "1990s North Korean famine", "1693 Sicily earthquake"
event-election"March 1898 elections", "Elections to the European Parliament", "1982 Mitcham and Morden by-election"
event-other"Eastwood Scoring Stage", "Union for a Popular Movement", "Masaryk Democratic Movement"
event-protest"Russian Revolution", "French Revolution", "Iranian Constitutional Revolution"
event-sportsevent"World Cup", "Stanley Cup", "National Champions"
location-GPE"Croatian", "the Republic of Croatia", "Mediterranean Basin"
location-bodiesofwater"Arthur Kill", "Norfolk coast", "Atatürk Dam Lake"
location-island"new Samsat district", "Staten Island", "Laccadives"
location-mountain"Ruweisat Ridge", "Salamander Glacier", "Miteirya Ridge"
location-other"Northern City Line", "Victoria line", "Cartuther"
location-park"Gramercy Park", "Shenandoah National Park", "Painted Desert Community Complex Historic District"
location-road/railway/highway/transit"NJT", "Friern Barnet Road", "Newark-Elizabeth Rail Link"
organization-company"Church 's Chicken", "Dixy Chicken", "Texas Chicken"
organization-education"MIT", "Barnard College", "Belfast Royal Academy and the Ulster College of Physical Education"
organization-government/governmentagency"Supreme Court", "Congregazione dei Nobili", "Diet"
organization-media/newspaper"Al Jazeera", "Clash", "TimeOut Melbourne"
organization-other"IAEA", "4th Army", "Defence Sector C"
organization-politicalparty"Al Wafa ' Islamic", "Kenseitō", "Shimpotō"
organization-religion"Jewish", "UPCUSA", "Christian"
organization-showorganization"Mr. Mister", "Lizzy", "Bochumer Symphoniker"
organization-sportsleague"China League One", "NHL", "First Division"
organization-sportsteam"Arsenal", "Luc Alphand Aventures", "Tottenham"
other-astronomything"Algol", "`` Caput Larvae ''", "Zodiac"
other-award"GCON", "Grand Commander of the Order of the Niger", "Order of the Republic of Guinea and Nigeria"
other-biologything"BAR", "N-terminal lipid", "Amphiphysin"
other-chemicalthing"carbon dioxide", "sulfur", "uranium"
other-currency"$", "Travancore Rupee", "lac crore"
other-disease"bladder cancer", "French Dysentery Epidemic of 1779", "hypothyroidism"
other-educationaldegree"Bachelor", "Master", "BSc ( Hons ) in physics"
other-god"El", "Fujin", "Raijin"
other-language"Latin", "Breton-speaking", "English"
other-law"Leahy–Smith America Invents Act ( AIA", "Thirty Years ' Peace", "United States Freedom Support Act"
other-livingthing"monkeys", "patchouli", "insects"
other-medical"Pediatrics", "pediatrician", "amitriptyline"
person-actor"Tchéky Karyo", "Ellaline Terriss", "Edmund Payne"
person-artist/author"George Axelrod", "Gaetano Donizett", "Hicks"
person-athlete"Jaguar", "Tozawa", "Neville"
person-director"Bob Swaim", "Frank Darabont", "Richard Quine"
person-other"Richard Benson", "Holden", "Campbell"
person-politician"Emeric", "Rivière", "William"
person-scholar"Stalmine", "Stedman", "Wurdack"
person-soldier"Helmuth Weidling", "Joachim Ziegler", "Krukenberg"
product-airplane"Luton", "Spey-equipped FGR.2s", "EC135T2 CPDS"
product-car"100EX", "Phantom", "Corvettes - GT1 C6R"
product-food"red grape", "yakiniku", "V. labrusca"
product-game"Airforce Delta", "Splinter Cell", "Hardcore RPG"
product-other"Fairbottom Bobs", "X11", "PDP-1"
product-ship"HMS `` Chinkara ''", "Congress", "Essex"
product-software"Wikipedia", "Apdf", "AmiPDF"
product-train"Royal Scots Grey", "High Speed Trains", "55022"
product-weapon"AR-15 's", "ZU-23-2M Wróbel", "ZU-23-2MR Wróbel II"

Uses

Direct Use

from span_marker import SpanMarkerModel

# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-roberta-large-fewnerd-fine-super")
# Run inference
entities = model.predict("Most of the Steven Seagal movie ``Under Siege`` (co-starring Tommy Lee Jones) was filmed aboard the Battleship USS Alabama, which is docked on Mobile Bay at Battleship Memorial Park and open to the public.")

Downstream Use

You can finetune this model on your own dataset.

from span_marker import SpanMarkerModel, Trainer

# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-roberta-large-fewnerd-fine-super")

# Specify a Dataset with "tokens" and "ner_tag" columns
dataset = load_dataset("conll2003") # For example CoNLL2003

# Initialize a Trainer using the pretrained model & dataset
trainer = Trainer(
    model=model,
    train_dataset=dataset["train"],
    eval_dataset=dataset["validation"],
)
trainer.train()
trainer.save_model("tomaarsen/span-marker-roberta-large-fewnerd-fine-super-finetuned")

Training Details

Training Set Metrics

Training setMinMedianMax
Sentence length124.4945267
Entities per sentence02.583288

Training Hyperparameters

  • learning_rate: 1e-05
  • train_batch_size: 8
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 3

Training Hardware

  • On Cloud: No
  • GPU Model: 1 x NVIDIA GeForce RTX 3090
  • CPU Model: 13th Gen Intel(R) Core(TM) i7-13700K
  • RAM Size: 31.78 GB

Framework Versions

  • Python: 3.9.16
  • SpanMarker: 1.3.1.dev
  • Transformers : 4.29.2
  • PyTorch: 2.0.1+cu118
  • Datasets: 2.14.3
  • Tokenizers: 0.13.2

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

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

GPU в ailist

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

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

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

Класс архитектуры
SpanMarkerModel
Ревизия весов
2f90753

0 моделей