文件名称:KnowledgeDistillation:Knowledge distillation in text classification with pytorch. 知识蒸馏,中文文本分类,教师模型BERT、XLNET,学生模型biLSTM
文件大小:1.11MB
文件格式:ZIP
更新时间:2024-05-24 08:37:29
pytorch knowledge-distillation bert Python
知识蒸馏在文本方向上的应用 模型相关等内容在有具体介绍。 目录 更新日志 2020.08.28 整理代码结构,抛弃借鉴的Bert模型,增加xlnet模型,预训练xlnet模型效果较差,可以在模型基础上再进行预训练,因此添加了模型预训练代码。 2020.07.15 修复bug,添加textGCN模型(单独训练,模型效果较差)。 2020.07.06 移除模型介绍&部分模型实现,增加使用说明及运行环境。 2020.05.28 增加了直接使用学生模型训练代码,并使用公开测试集完成测试。 运行环境 python 3.7 pytorch 1.1 (BERT模型参考Bert-Chinese-Text-Classification-Pytorch,有较多改动) transformers 3.0.2 torch 1.5.0 使用说明 下载Wikipedia_zh 中文* 预训练词向量放入Knowl
【文件预览】:
KnowledgeDistillation-master
----bert_pretrain()
--------bert_config.json(518B)
--------README.md(191B)
--------vocab.txt(107KB)
----models()
--------fullyConnect.py(606B)
--------biLSTM.py(868B)
--------__init__.py(168B)
--------bert.py(2KB)
--------__pycache__()
--------xlnet.py(2KB)
----dev.csv(243KB)
----label.csv(227KB)
----train.csv(1003KB)
----utils.py(388B)
----stopwords.txt(9KB)
----.idea()
--------misc.xml(299B)
--------inspectionProfiles()
--------knowledgeDistillation.iml(284B)
--------modules.xml(294B)
--------.gitignore(176B)
--------vcs.xml(180B)
----README.md(7KB)
----__pycache__()
--------utils.cpython-37.pyc(577B)
--------teacher.cpython-37.pyc(7KB)
--------student.cpython-37.pyc(6KB)
----data()
--------class_multi1.txt(28B)
----preLM.py(11KB)
----xlnet_pretrain()
--------spiece.model(675KB)
--------config.json(641B)
----teacher.py(7KB)
----student.py(6KB)
----distill.py(2KB)