qiangsiwei / bert_distill Goto Github PK
View Code? Open in Web Editor NEWBERT distillation(基于BERT的蒸馏实验 )
BERT distillation(基于BERT的蒸馏实验 )
作者,你好,我想问一下,你使用的数据集是什么数据集?
" np.random.rand() > p_mask" 而不是 " np.random.rand() < p_mask"
首先感谢分享代码,我看distill.py有个疑问,最后输出的准确率是dev集上的结果,而默认teach_on_dev = True,这样相当于用dev集合在训练,这会导致测试效果虚高吧?
论文中提高的是使用logits,但是提交的代码是softmax后的结果,请问这里是由什么原因吗?
您好,能请教一个问题吗?我在运行python ptbert.py的时候报了上面的错,显示错误在pooled_output = self.dropout(pooled_output)这一行,打印出pooled_output是'pooler_output'这个东西,是个str不是tensor,这就很奇怪了,_, pooled_output = self.bert(input_ids, None, input_mask),为什么bert出来的pooled_output就是'pooler_output'呢?我不知道是哪里错了,还望能指点下吗?非常感谢大佬!
运行test.py时报错,No such file or directory: 'data/cache/word2vec'
找了一个200维的明文词向量改了名字算是糊弄过去了。utils里还改了一下维度。
然后运行distll、small时报错, No such file or directory: 'data/cache/t_tr'
这个又是什么文件?能否提供下载?
测试的时候用的是验证集的数据,而验证集的数据也用来训练了,这里有问题吧
您好,
非常感谢分享代码!
我有一个疑问,在distill.py蒸馏训练后,test.py的run_distill()里只用到了bert模型预测的标签作为数据的训练标签,并没有使用distill.py蒸馏的模型,这是什么原理呢?
还望解答,谢谢!
Line 103 in ceed9c9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.