/ Модель

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

Контекст
512 токенов
Параметры
136 млн
Лицензия
MIT
Архитектура
bert · dense
Опубликована
23 авг 2024

BERT-case-german-tng

Заполнение пропусковТекст → текст

Производная модели google-bert/bert-base-german-cased. Немецкоязычная BERT-модель для восстановления замаскированных слов и адаптации к задачам классификации и распознавания сущностей.

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

Бенчмарки

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

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

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

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

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

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

Карточка модели Nico97/BERT-case-german-tng на Hugging Face совпадает с карточкой google-bert/bert-base-german-cased, поэтому описание составлено по ней.

bert-base-german-cased — немецкоязычная модель BERT, разработанная авторами из deepset и обученная с нуля на немецкой Википедии, материалах OpenLegalData и новостных статьях. Она предназначена прежде всего для восстановления замаскированных слов в немецком тексте и может служить основой для последующей настройки под задачи обработки немецкого языка.

Модель имеет архитектуру BERT для masked language modeling, содержит 136,3 млн параметров и принимает текстовые последовательности длиной до 512 токенов. В репозитории доступны варианты для PyTorch, TensorFlow, JAX/Flax и ONNX. В карточке приведены оценки на немецких наборах для распознавания именованных сущностей и классификации текстов, включая тональность и классификацию документов.

Лицензия модели — MIT. Она рассчитана на немецкий язык; качество и применимость к конкретной задаче зависят от предметной области и необходимости дополнительной настройки.

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

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

Ограничения

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

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

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

Открыть на Hugging Face

German BERT

bert_image

Overview

Language model: bert-base-cased
Language: German
Training data: Wiki, OpenLegalData, News (~ 12GB)
Eval data: Conll03 (NER), GermEval14 (NER), GermEval18 (Classification), GNAD (Classification)
Infrastructure: 1x TPU v2
Published: Jun 14th, 2019

Update April 3rd, 2020: we updated the vocabulary file on deepset's s3 to conform with the default tokenization of punctuation tokens. For details see the related FARM issue. If you want to use the old vocab we have also uploaded a "deepset/bert-base-german-cased-oldvocab" model.

Details

  • We trained using Google's Tensorflow code on a single cloud TPU v2 with standard settings.
  • We trained 810k steps with a batch size of 1024 for sequence length 128 and 30k steps with sequence length 512. Training took about 9 days.
  • As training data we used the latest German Wikipedia dump (6GB of raw txt files), the OpenLegalData dump (2.4 GB) and news articles (3.6 GB).
  • We cleaned the data dumps with tailored scripts and segmented sentences with spacy v2.1. To create tensorflow records we used the recommended sentencepiece library for creating the word piece vocabulary and tensorflow scripts to convert the text to data usable by BERT.

See https://deepset.ai/german-bert for more details

Hyperparameters

batch_size = 1024
n_steps = 810_000
max_seq_len = 128 (and 512 later)
learning_rate = 1e-4
lr_schedule = LinearWarmup
num_warmup_steps = 10_000

Performance

During training we monitored the loss and evaluated different model checkpoints on the following German datasets:

  • germEval18Fine: Macro f1 score for multiclass sentiment classification
  • germEval18coarse: Macro f1 score for binary sentiment classification
  • germEval14: Seq f1 score for NER (file names deuutf.*)
  • CONLL03: Seq f1 score for NER
  • 10kGNAD: Accuracy for document classification

Even without thorough hyperparameter tuning, we observed quite stable learning especially for our German model. Multiple restarts with different seeds produced quite similar results.

performancetable

We further evaluated different points during the 9 days of pre-training and were astonished how fast the model converges to the maximally reachable performance. We ran all 5 downstream tasks on 7 different model checkpoints - taken at 0 up to 840k training steps (x-axis in figure below). Most checkpoints are taken from early training where we expected most performance changes. Surprisingly, even a randomly initialized BERT can be trained only on labeled downstream datasets and reach good performance (blue line, GermEval 2018 Coarse task, 795 kB trainset size).

checkpointseval

Authors

  • Branden Chan: branden.chan [at] deepset.ai
  • Timo Möller: timo.moeller [at] deepset.ai
  • Malte Pietsch: malte.pietsch [at] deepset.ai
  • Tanay Soni: tanay.soni [at] deepset.ai

About us

deepset logo

We bring NLP to the industry via open source!
Our focus: Industry specific language models & large scale QA systems.

Some of our work:

Get in touch: Twitter | LinkedIn | Website

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
BertForMaskedLM
Ревизия весов
6f65452

0 моделей