Comments (5)
这是因为预训练使用的模型不同。由于BERT和RoBERTa的模型结构类似,所以他们的RoBERTA还是基于BERT模型训练的。而我们的训练方法是,直接使用RoBERTa模型训练,所以载入时也需要用RobertaModel。
from guwenbert.
这是因为预训练使用的模型不同。由于BERT和RoBERTa的模型结构类似,所以他们的RoBERTA还是基于BERT模型训练的。而我们的训练方法是,直接使用RoBERTa模型训练,所以载入时也需要用RobertaModel。
感谢您的回答。roberta和bert的差别应该只是在预训练过程中去掉了nsp和动态mask吧,模型结构应该是一样的。
如果是用HuggingFace脚本训练的,官方是已经去掉的NSP且MLM是动态的。我刚重新看了结构,区别只在token_type_embeddings
,bert2个、roberta1个。因为token_type_embeddings
在QA过程中的效果目前尚不明确,所以我觉得可以考虑用BertModel,否则在QA类型的任务会无法对query额外编码。
以上个人建议供参考哈~
from guwenbert.
from guwenbert.
Thanks for your interest @renjunxiang .
The type embedding is not a necessary component in pre-trained LMs (see the RoBERTa paper). The huggingface implementation reserves the type embedding just for compatibility.
You can directly concatenate the passage-query pair without type embedding for the QA task.
from guwenbert.
Thanks for your interest @renjunxiang .
The type embedding is not a necessary component in pre-trained LMs (see the RoBERTa paper). The huggingface implementation reserves the type embedding just for compatibility.
You can directly concatenate the passage-query pair without type embedding for the QA task.
Thank you for your answer!
from guwenbert.
Related Issues (20)
- 预训练语料 HOT 1
- 想请教一下模型结构的问题,为什么模型权重从pooler层之后就没有了 HOT 4
- 请问古文的训练数据方便公开吗? HOT 1
- 请问评估指标是如何确定的呢? HOT 3
- 关于新建词表 HOT 2
- 输入两个句子导致索引越界 HOT 26
- 请问能否公开一下古联杯的训练数据呢 HOT 1
- 运行时报错:输入两个句子导致索引越界 HOT 5
- 预训练代码 HOT 3
- Mask值 HOT 5
- 请问从huggingface下载的模型怎么使用 HOT 6
- 预训练模型的问题 HOT 5
- 添加新的标签 HOT 1
- sequence大小问题 HOT 1
- 请问可以分享一下残缺古诗语句预测的下游代码吗?为什么我这里显示的是随机的文字呢 HOT 1
- 古联杯数据集发邮件询问官方人员,没回复怎么办呢 HOT 2
- 去停用词的问题 HOT 2
- Tokenizer 工作异常 HOT 1
- 断句如何实现 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from guwenbert.