CoolFace
Modelpublic

deepvk/deberta-v1-base

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
8likes758downloads
Model Card

DeBERTa-base

<!-- Provide a quick summary of what the model is/does. -->

Pretrained bidirectional encoder for russian language. The model was trained using standard MLM objective on large text corpora including open social data. See Training Details section for more information.

⚠️ This model contains only the encoder part without any pretrained head.

  • Developed by: deepvk
  • Model type: DeBERTa
  • Languages: Mostly russian and small fraction of other languages
  • License: Apache 2.0

How to Get Started with the Model

python
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("deepvk/deberta-v1-base")
model = AutoModel.from_pretrained("deepvk/deberta-v1-base")

text = "Привет, мир!"

inputs = tokenizer(text, return_tensors='pt')
predictions = model(**inputs)

Training Details

Training Data

400 GB of filtered and deduplicated texts in total. A mix of the following data: Wikipedia, Books, Twitter comments, Pikabu, Proza.ru, Film subtitles, News websites, and Social corpus.

Deduplication procedure
  1. 1.Calculate shingles with size of 5
  2. 2.Calculate MinHash with 100 seeds → for every sample (text) have a hash of size 100
  3. 3.Split every hash into 10 buckets → every bucket, which contains (100 / 10) = 10 numbers, get hashed into 1 hash → we have 10 hashes for every sample
  4. 4.For each bucket find duplicates: find samples which have the same hash → calculate pair-wise jaccard similarity → if the similarity is >0.7 than it's a duplicate
  5. 5.Gather duplicates from all the buckets and filter

Training Hyperparameters

ArgumentValue
Training regimefp16 mixed precision
OptimizerAdamW
Adam betas0.9,0.98
Adam eps1e-6
Weight decay1e-2
Batch size2240
Num training steps1kk
Num warm-up steps10k
LR schedulerLinear
LR2e-5
Gradient norm1.0

The model was trained on a machine with 8xA100 for approximately 30 days.

Architecture details

ArgumentValue
Encoder layers12
Encoder attention heads12
Encoder embed dim768
Encoder ffn embed dim3,072
Activation functionGeLU
Attention dropout0.1
Dropout0.1
Max positions512
Vocab size50266
Tokenizer typeByte-level BPE

Evaluation

We evaluated the model on Russian Super Glue dev set. The best result in each task is marked in bold. All models have the same size except the distilled version of DeBERTa.

ModelRCBPARusMuSeRCTERRaRUSSERWSDDaNetQAScore
vk-deberta-distill0.4330.560.6250.590.9430.5690.7260.635
vk-roberta-base0.460.560.6790.7690.9600.5690.6580.665
vk-deberta-base0.4500.610.7220.7040.9480.5780.760.682
vk-bert-base0.4670.570.5870.7040.9530.5830.7370.657
sber-bert-base0.4910.610.6630.7690.9620.5740.6780.678