/ Модель

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

Контекст
512 токенов
Параметры
212 млн
Лицензия
CC BY-SA 4.0
Архитектура
bert · dense
Опубликована
17 июл 2024

Knesset-DictaBERT

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

BERT-модель для предсказания пропущенных слов в текстах на иврите, дообученная на стенограммах израильского парламента.

62скачиваний за 30 дней2лайкавеса обновлены28 дек 2024

Бенчмарки

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

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

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

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

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

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

Knesset-DictaBERT — ивритоязычная BERT-модель, дообученная GiliGold на корпусе стенограмм заседаний израильского парламента Knesset. Она предназначена для предсказания замаскированных слов и анализа контекста парламентской речи на иврите. Модель содержит 211,6 млн параметров, использует архитектуру BertForMaskedLM и принимает последовательности длиной до 512 токенов.

На тестовой части корпуса авторы сообщают perplexity 6,60 и точность предсказания правильного токена в top-1 52,55%, в top-2 63,07% и в top-5 73,59%; результаты выше показателей исходной DictaBERT на той же оценке. Модель может помочь при изучении и обработке парламентских текстов, но опубликованные метрики получены на Knesset Corpus и сами по себе не подтверждают качество на других жанрах или задачах. Лицензия — CC BY-SA 4.0.

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

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

Ограничения

Модель специализирована на парламентских текстах иврита; качество на других жанрах и задачах в карточке не оценивалось. Контекст ограничен 512 токенами.

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

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

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

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

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

Открыть на Hugging Face

Knesset-DictaBERT

Knesset-DictaBERT is a Hebrew language model fine-tuned on the Knesset Corpus, which comprises Israeli parliamentary proceedings.

This model is based on the Dicta-BERT architecture and is designed to understand and generate text in Hebrew, with a specific focus on parliamentary language and context.

Model Details

  • Model type: BERT-based (Bidirectional Encoder Representations from Transformers)
  • Language: Hebrew
  • Training Data: Knesset Corpus (Israeli parliamentary proceedings)
  • Base Model: Dicta-BERT

Training Procedure

The model was fine-tuned using the masked language modeling (MLM) task on the Knesset Corpus. The MLM task involves predicting masked words in a sentence, allowing the model to learn contextual representations of words.

Usage

from transformers import AutoModelForMaskedLM, AutoTokenizer
import torch

tokenizer = AutoTokenizer.from_pretrained("GiliGold/Knesset-DictaBERT")
model = AutoModelForMaskedLM.from_pretrained("GiliGold/Knesset-DictaBERT")
model.eval()
sentence = "יש לנו [MASK] על זה בשבוע הבא"

# Tokenize the input sentence and get predictions
inputs = tokenizer.encode(sentence, return_tensors='pt')
output = model(inputs)

mask_token_index = 3
top_2_tokens = torch.topk(output.logits[0, mask_token_index, :], 2)[1]

# Convert token IDs to tokens and print them
print('\n'.join(tokenizer.convert_ids_to_tokens(top_2_tokens)))

# Example output: ישיבה / דיון

Evaluation

The evaluation was conducted on a 10% test set of the Knesset Corpus, consisting of approximately 3.2 million sentences. The perplexity was calculated on this full test set. Due to time constraints, accuracy measures were calculated on a subset of this test set, consisting of approximately 300,000 sentences (approximately 3.5 million tokens).

Perplexity

The perplexity of the original DictaBERT on the full test set is 22.87.

The perplexity of Knesset-DictaBERT on the full test set is 6.60.

Accuracy

  • 1-accuracy results

Knesset-DictaBERT identified the correct token in the top-1 prediction in 52.55% of the cases.

The original DictaBERT model achieved a top-1 accuracy of 48.02%.

  • 2-accuracy results

Knesset-DictaBERT identified the correct token within the top-2 predictions in 63.07% of the cases.

The original DictaBERT model achieved a top-2 accuracy of 58.60%.

  • 5-accuracy results

Knesset-DictaBERT identified the correct token within the top-5 predictions in 73.59% of the cases.

The original DictaBERT model achieved a top-5 accuracy of 68.98%.

Acknowledgments

This model is built upon the work of the Dicta team, and their contributions are gratefully acknowledged.

Citation

If you use this model in your work, please cite:

@misc{goldin2024knessetdictaberthebrewlanguagemodel,
      title={Knesset-DictaBERT: A Hebrew Language Model for Parliamentary Proceedings}, 
      author={Gili Goldin and Shuly Wintner},
      year={2024},
      eprint={2407.20581},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2407.20581}, 
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей