Alina Kolesnikova commited on
Commit
da6f3a9
1 Parent(s): 8fc22c8

Conversational DistilRuBERT-tiny added

Browse files
README.md ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ru
4
+ ---
5
+ # distilrubert-tiny-cased-conversational
6
+ Conversational DistilRuBERT-tiny \(Russian, cased, 2‑layer, 768‑hidden, 12‑heads, 107M parameters\) was trained on OpenSubtitles\[1\], [Dirty](https://d3.ru/), [Pikabu](https://pikabu.ru/), and a Social Media segment of Taiga corpus\[2\] (as [Conversational RuBERT](https://huggingface.co/DeepPavlov/rubert-base-cased-conversational)). It can be considered as tiny copy of our [Conversational DistilRuBERT-base](https://huggingface.co/DeepPavlov/distilrubert-base-cased-conversational)
7
+
8
+ Our DistilRuBERT-tiny was highly inspired by \[3\], \[4\]. Namely, we used
9
+ * KL loss (between teacher and student output logits)
10
+ * MLM loss (between tokens labels and student output logits)
11
+ * Cosine embedding loss (between mean of six consecutive hidden states from teacher's encoder and one hidden state of the student)
12
+ * MSE loss (between six consecutive attention maps from teacher's encoder and one attention map of the student)
13
+
14
+ \[1\]: P. Lison and J. Tiedemann, 2016, OpenSubtitles2016: Extracting Large Parallel Corpora from Movie and TV Subtitles. In Proceedings of the 10th International Conference on Language Resources and Evaluation \(LREC 2016\)
15
+
16
+ \[2\]: Shavrina T., Shapovalova O. \(2017\) TO THE METHODOLOGY OF CORPUS CONSTRUCTION FOR MACHINE LEARNING: «TAIGA» SYNTAX TREE CORPUS AND PARSER. in proc. of “CORPORA2017”, international conference , Saint-Petersbourg, 2017.
17
+
18
+ \[3\]: Sanh, V., Debut, L., Chaumond, J., & Wolf, T. \(2019\). DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.
19
+
20
+ \[4\]: <https://github.com/huggingface/transformers/tree/master/examples/research_projects/distillation>
config.json ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilrubert-tiny-cased-conversational.pth",
3
+ "activation": "gelu",
4
+ "attention_dropout": 0.1,
5
+ "dim": 768,
6
+ "dropout": 0.1,
7
+ "hidden_dim": 3072,
8
+ "initializer_range": 0.02,
9
+ "max_position_embeddings": 512,
10
+ "model_type": "distilbert",
11
+ "n_heads": 12,
12
+ "n_layers": 2,
13
+ "output_attentions": true,
14
+ "output_hidden_states": true,
15
+ "output_past": true,
16
+ "pad_token_id": 0,
17
+ "qa_dropout": 0.1,
18
+ "seq_classif_dropout": 0.2,
19
+ "sinusoidal_pos_embds": false,
20
+ "tie_weights_": true,
21
+ "vocab_size": 119547
22
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f7fbfb3a6ba2f23bab10f77bf6dc326625fdaa2a448eef51b89faae53eb95e62
3
+ size 428393440
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"do_lower_case": false}
vocab.txt ADDED
The diff for this file is too large to render. See raw diff