模型:
DeepPavlov/distilrubert-tiny-cased-conversational-v1
DistilRuBERT-tiny对话模型(俄语,大小写敏感,3层,264隐藏层,12个注意力头,10.4M参数)是在OpenSubtitles[1]、 Dirty 、 Pikabu 和Taiga语料库的社交媒体部分[2](作为 Conversational RuBERT )上进行训练的。可以将其视为 Conversational DistilRuBERT-small 的小型副本。
我们的DistilRuBERT-tiny受到[3]、[4]的很大启发,并且架构非常接近[5]。具体来说,我们使用了以下方式:
其主要特点包括:
以下是教师模型(对话RuBERT)与其他蒸馏模型的比较。
Model name | # params, M | # vocab, K | Mem., MB |
---|---|---|---|
rubert-base-cased-conversational | 177.9 | 120 | 679 |
distilrubert-base-cased-conversational | 135.5 | 120 | 517 |
distilrubert-small-cased-conversational | 107.1 | 120 | 409 |
cointegrated/rubert-tiny | 11.8 | 30 | 46 |
distilrubert-tiny-cased-conversational | 10.4 | 31 | 41 |
DistilRuBERT-tiny在7个nVIDIA Tesla P100-SXM2.0 16Gb上进行了约100小时的训练。
我们使用transformers的PyTorchBenchmark来评估模型的性能,并与其他预训练的俄语语言模型进行比较。所有测试都在Intel(R) Xeon(R) CPU E5-2698 v4 @ 2.20GHz和nVIDIA Tesla P100-SXM2.0 16Gb上进行。
|模型名称|批次大小|序列长度|时间,秒||内存,MB|||---|---|---|------||------||| | | | CPU | GPU | CPU | GPU ||rubert-base-cased-conversational|1|512|0.147|0.014|897|1531||distilrubert-base-cased-conversational|1|512|0.083|0.006|766|1423||distilrubert-small-cased-conversational|1|512|0.03|0.002|600|1243||cointegrated/rubert-tiny|1|512|0.041|0.003|272|919||distilrubert-tiny-cased-conversational|1|512|0.023|0.003|206|855||rubert-base-cased-conversational|16|512|2.839|0.182|1499|2071||distilrubert-base-cased-conversational|16|512|1.065|0.055|2541|2927||distilrubert-small-cased-conversational|16|512|0.373|0.003|1360|1943||cointegrated/rubert-tiny|16|512|0.628|0.004|1293|2221||distilrubert-tiny-cased-conversational|16|512|0.219|0.003|633|1291|
为了评估模型质量,我们在俄语分类(RuSentiment,ParaPhraser)、NER和问答数据集上对DistilRuBERT-tiny进行了微调,并获得了与 Conversational DistilRuBERT-small 非常相似的分数。
如果您发现该模型对您的研究有用,请引用 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:从电影和电视字幕中提取大型平行语料库。在第10届语言资源和评估国际会议(LREC 2016)的论文集中
[2]:Shavrina T., Shapovalova O.(2017)关于机器学习语料库构建方法论:“TAIGA”句法树语料库和解析器。在“CORPORA2017”国际会议上的论文中,圣彼得堡,2017年。
[3]:Sanh, V., Debut, L., Chaumond, J., & Wolf, T. (2019). DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv预印本arXiv:1910.01108。
[4]: https://github.com/huggingface/transformers/tree/master/examples/research_projects/distillation
[5]: https://habr.com/ru/post/562064/ , https://huggingface.co/cointegrated/rubert-tiny