模型:

DeepPavlov/distilrubert-tiny-cased-conversational

英文

警告:这个模型上传的名称错误,实际上是与 distilrubert-small-cased-conversational 相同的模型,正确的distilrubert-tiny-cased-conversational模型可以在 distilrubert-tiny-cased-conversational-v1 中找到。

distilrubert-small-cased-conversational

DistilRuBERT-small是一个对话模型(俄文,大小写敏感,2层,768隐藏层,12个注意头,107M参数),在OpenSubtitles[1]、 Dirty Pikabu 和Taiga语料库的社交媒体部分[2](作为 Conversational RuBERT )上进行训练。可以将其视为 Conversational DistilRuBERT-base 的小型副本。

我们的DistilRuBERT-small受到了[3]、[4]的启发。具体来说,我们使用了以下方法:

  • KL loss(教师模型与学生模型输出logits之间的KL散度)
  • MLM loss(tokens标签与学生模型输出logits之间的最大似然损失)
  • 余弦嵌入损失(教师模型编码器中六个连续隐藏状态的平均值与学生模型的一个隐藏状态之间的余弦距离)
  • MSE loss(教师模型编码器中六个连续注意力图的平均值与学生模型的一个注意力图之间的均方误差)

模型的训练耗时约为80小时,使用8台nVIDIA Tesla P100-SXM2.0 16Gb进行训练。

为了评估推断速度的改进,我们在随机序列上运行了教师模型和学生模型,其中seq_len = 512,batch_size = 16(用于吞吐量测试),batch_size = 1(用于延迟测试)。所有测试均在Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz和nVIDIA Tesla P100-SXM2.0 16Gb上进行。

为了评估模型质量,我们对DistilRuBERT-small进行了分类、NER和问答任务的微调。得分和微调模型的存档可以在 DeepPavlov docs 中找到。

引用

如果您发现这个模型对您的研究有用,请引用 this 论文:

@misc{https://doi.org/10.48550/arxiv.2205.02340,
  doi = {10.48550/ARXIV.2205.02340},
  
  url = {https://arxiv.org/abs/2205.02340},
  
  author = {Kolesnikova, Alina and Kuratov, Yuri and Konovalov, Vasily and Burtsev, Mikhail},
  
  keywords = {Computation and Language (cs.CL), Machine Learning (cs.LG), FOS: Computer and information sciences, FOS: Computer and information sciences},
  
  title = {Knowledge Distillation of Russian Language Models with Reduction of Vocabulary},
  
  publisher = {arXiv},
  
  year = {2022},
  
  copyright = {arXiv.org perpetual, non-exclusive license}
}

[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)

[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.

[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.

[4]: https://github.com/huggingface/transformers/tree/master/examples/research_projects/distillation