/ Модель

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

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

deberta-v2-large-japanese

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

Японская модель DeBERTa V2 Large предсказывает пропущенные токены и подходит как основа для дообучения на задачах понимания японского языка.

835скачиваний за 30 дней9лайковвеса обновлены12 мая 2023

Бенчмарки

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

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

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

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

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

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

Языковая модель DeBERTa V2 Large для японского языка, разработанная командой KU-NLP и предварительно обученная на японской Википедии, японской части CC-100 и японской части OSCAR. Это трансформерная модель с архитектурой DebertaV2ForMaskedLM и 435,4 млн параметров; она принимает текст с пропущенными токенами и предсказывает вероятные заполнения. Контекстное окно — 512 токенов.

Модель предназначена прежде всего для восстановления пропусков в японском тексте и может служить основой для дообучения на задачах понимания японского языка. До подачи текста его необходимо сегментировать на слова с помощью Juman++; далее применяется токенизация SentencePiece. Для перечисленных в карточке задач NLU приведены результаты дообученных вариантов, поэтому их не следует считать оценкой этой исходной модели без дополнительного дообучения.

Весовые файлы доступны в форматах PyTorch и safetensors. Лицензия — CC BY-SA 4.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for Japanese DeBERTa V2 large

Model description

This is a Japanese DeBERTa V2 large 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-large-japanese')
model = AutoModelForMaskedLM.from_pretrained('ku-nlp/deberta-v2-large-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 36 days using 8 NVIDIA A100-SXM4-40GB GPUs.

The following hyperparameters were used during pre-training:

  • learning_rate: 1e-4
  • per_device_train_batch_size: 18
  • distributed_type: multi-GPU
  • num_devices: 8
  • gradient_accumulation_steps: 16
  • total_train_batch_size: 2,304
  • 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: 300,000
  • warmup_steps: 10,000

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

Fine-tuning on NLU tasks

We fine-tuned the following models and evaluated them on the dev set of JGLUE. We tuned learning rate and training epochs for each model and task following the JGLUE paper.

ModelMARC-ja/accJSTS/pearsonJSTS/spearmanJNLI/accJSQuAD/EMJSQuAD/F1JComQA/acc
Waseda RoBERTa base0.9650.9130.8760.9050.8530.9160.853
Waseda RoBERTa large (seq512)0.9690.9250.8900.9280.9100.9550.900
LUKE Japanese base*0.9650.9160.8770.912--0.842
LUKE Japanese large*0.9650.9320.9020.927--0.893
DeBERTaV2 base0.9700.9220.8860.9220.8990.9510.873
DeBERTaV2 large0.9680.9250.8920.9240.9120.9590.890

*The scores of LUKE are from the official repository.

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
Ревизия весов
c250815

0 моделей