/ Модель

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

Контекст
512 токенов
Параметры
7,9 млн
Лицензия
CC BY-SA 4.0
Архитектура
deberta-v2 · dense
Библиотека
transformers
Опубликована
18 янв 2023

deberta-v2-tiny-japanese

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

Компактная японская DeBERTa V2 для восстановления скрытых токенов в тексте.

9 897скачиваний за 30 дней5лайковвеса обновлены23 мар 2023

Бенчмарки

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

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

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

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

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

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

ku-nlp/deberta-v2-tiny-japanese — компактная модель семейства DeBERTa V2, разработанная KU NLP и предварительно обученная на японских текстах. Модель содержит 7,9 млн параметров, использует архитектуру DebertaV2ForMaskedLM и принимает контекст длиной до 512 токенов.

Основное назначение — восстановление скрытых токенов в японском тексте. Для работы входной текст необходимо предварительно сегментировать на слова с помощью Juman++; затем слова разбиваются на подсловные единицы SentencePiece. Предобучение проводилось на японской Википедии, японских частях CC-100 и OSCAR, общий объём корпуса составил 171 ГБ.

Модель подходит для японских сценариев masked language modeling и задач, построенных на заполнении пропусков. Она опубликована в форматах PyTorch и Safetensors под лицензией CC BY-SA 4.0; при использовании следует соблюдать условия атрибуции и распространения на тех же условиях.

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

  • восстановление пропущенных слов в японском тексте
  • оценка вариантов заполнения маски в японском предложении
  • подготовка японских текстовых признаков для экспериментов с masked language modeling

Ограничения

Модель рассчитана на японский текст, а перед токенизацией требует сегментации слов с помощью Juman++. Контекст ограничен 512 токенами.

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

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

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

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

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

Открыть на Hugging Face

Model Card for Japanese DeBERTa V2 tiny

Model description

This is a Japanese DeBERTa V2 tiny model pre-trained on Japanese Wikipedia, the Japanese portion of CC-100, and the Japanese portion of OSCAR.

How to use

You can use this model for masked language modeling as follows:

from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained('ku-nlp/deberta-v2-tiny-japanese')
model = AutoModelForMaskedLM.from_pretrained('ku-nlp/deberta-v2-tiny-japanese')

sentence = '京都 大学 で 自然 言語 処理 を [MASK] する 。'  # input should be segmented into words by Juman++ in advance
encoding = tokenizer(sentence, return_tensors='pt')
...

You can also fine-tune this model on downstream tasks.

Tokenization

The input text should be segmented into words by Juman++ in advance. Juman++ 2.0.0-rc3 was used for pre-training. Each word is tokenized into subwords by sentencepiece.

Training data

We used the following corpora for pre-training:

  • Japanese Wikipedia (as of 20221020, 3.2GB, 27M sentences, 1.3M documents)
  • Japanese portion of CC-100 (85GB, 619M sentences, 66M documents)
  • Japanese portion of OSCAR (54GB, 326M sentences, 25M documents)

Note that we filtered out documents annotated with "header", "footer", or "noisy" tags in OSCAR. Also note that Japanese Wikipedia was duplicated 10 times to make the total size of the corpus comparable to that of CC-100 and OSCAR. As a result, the total size of the training data is 171GB.

Training procedure

We first segmented texts in the corpora into words using Juman++. Then, we built a sentencepiece model with 32000 tokens including words (JumanDIC) and subwords induced by the unigram language model of sentencepiece.

We tokenized the segmented corpora into subwords using the sentencepiece model and trained the Japanese DeBERTa model using transformers library. The training took 33 hours using 8 NVIDIA A100-SXM4-40GB GPUs.

The following hyperparameters were used during pre-training:

  • learning_rate: 1e-3
  • per_device_train_batch_size: 128
  • distributed_type: multi-GPU
  • num_devices: 8
  • gradient_accumulation_steps: 6
  • total_train_batch_size: 6,144
  • max_seq_length: 512
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-06
  • lr_scheduler_type: linear schedule with warmup
  • training_steps: 100,000
  • warmup_steps: 10,000

The accuracy of the trained model on the masked language modeling task was 0.593. The evaluation set consists of 5,000 randomly sampled documents from each of the training corpora.

Acknowledgments

This work was supported by Joint Usage/Research Center for Interdisciplinary Large-scale Information Infrastructures (JHPCN) through General Collaboration Project no. jh221004, "Developing a Platform for Constructing and Sharing of Large-Scale Japanese Language Models". For training models, we used the mdx: a platform for the data-driven future.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
DebertaV2ForMaskedLM
Ревизия весов
0427645

0 моделей