/ Модель

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

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

deberta-v2-base-japanese

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

Производная модели ku-nlp/deberta-v2-base-japanese-with-auto-jumanpp. Японская DeBERTa V2 с токенизацией Juman++ для предсказания скрытых токенов и дообучения на задачах понимания японского языка.

100скачиваний за 30 дней0лайковвеса обновлены14 сен 2023

Бенчмарки

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

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

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

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

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

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

Карточка модели G-Root/deberta-v2-base-japanese на Hugging Face совпадает с карточкой ku-nlp/deberta-v2-base-japanese-with-auto-jumanpp, поэтому описание составлено по ней.

Японская базовая модель DeBERTa V2 от исследовательской группы KU-NLP, предварительно обученная для восстановления скрытых токенов в тексте. Она предназначена для masked language modeling и может служить основой для дообучения на задачах понимания японского языка. Обучение проводилось на японских частях Wikipedia, CC-100 и OSCAR; модель содержит 137,8 млн параметров и поддерживает контекст до 512 токенов.

Токенизатор автоматически сегментирует японский текст с помощью Juman++. Для его работы требуются Juman++ 2.0.0-rc3 и rhoknp; сегментировать текст заранее не нужно. Модель распространяется в форматах PyTorch и safetensors по лицензии CC BY-SA 4.0. В карточке также описана оценка дообученных вариантов на задачах JGLUE, но эта базовая модель сама по себе не является специализированной моделью для этих задач.

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

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

Ограничения

Токенизатор требует установленного Juman++ 2.0.0-rc3 и rhoknp. Контекст ограничен 512 токенами; для прикладных задач NLU модель потребуется дообучить.

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

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

Открыть на Hugging Face

Model Card for Japanese DeBERTa V2 base

Model description

This is a Japanese DeBERTa V2 base 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-base-japanese-with-auto-jumanpp', trust_remote_code=True)
model = AutoModelForMaskedLM.from_pretrained('ku-nlp/deberta-v2-base-japanese-with-auto-jumanpp')

sentence = '京都大学で自然言語処理を[MASK]する。'
encoding = tokenizer(sentence, return_tensors='pt')
...

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

Tokenization

The input text is internally segmented by Juman++ within DebertaV2JumanppTokenizer or DebertaV2JumanppTokenizerFast, so there's no need to segment it in advance. To use DebertaV2JumanppTokenizer or DebertaV2JumanppTokenizerFast, you need to install Juman++ 2.0.0-rc3 and rhoknp.

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 three weeks using 8 NVIDIA A100-SXM4-40GB GPUs.

The following hyperparameters were used during pre-training:

  • learning_rate: 2e-4
  • per_device_train_batch_size: 44
  • distributed_type: multi-GPU
  • num_devices: 8
  • gradient_accumulation_steps: 6
  • total_train_batch_size: 2,112
  • 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: 500,000
  • warmup_steps: 10,000

The accuracy of the trained model on the masked language modeling task was 0.779. 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
Ревизия весов
2692c78

0 моделей