Comments (3)
Hello, I have a question about the BERT encoders. In the paper, it is said that "ANCE can be used to train any dense retrieval model. For simplicity, we use a simple set up in recent research (Luan et al., 2020) with BERT Siamese/Dual Encoder (shared between q and d), dot product similarity, and negative log likelihood (NLL) loss." So actually, only one encoder is used to encode queries and documents separately. However, in the "model.py", the "BiEncoder" is as follows:
class BiEncoder(nn.Module): """ Bi-Encoder model component. Encapsulates query/question and context/passage encoders. """ def __init__(self, args): super(BiEncoder, self).__init__() self.question_model = HFBertEncoder.init_encoder(args) self.ctx_model = HFBertEncoder.init_encoder(args)There are two encoders are defined.
Kudos! You asked the exact question I have. In the paper. it keeps using "BERT-Siamese". To my understanding, siamese here means a shared encoder between query and document.
In fact, if two encoders are used, Dense Retriever doubles the parameter size comparing to model like BERT Reranker or ColBERT.
from ance.
hhhhhh! Bingo!
Besides, the hyper parameters are two sensitive. See the table in Appendix, if you change lr from 1e-6 to 2e-6, the accuracy decreases significantly!
from ance.
from ance.
Related Issues (15)
- Issue during downloading "roberta-base-config.json"
- How long does inference take? HOT 1
- some confusion about msmarco_data.py
- CUDA nccl library issue
- where is bm25 introduced? HOT 3
- module 'transformers' has no attribute 'TFRobertaDot_NLL_LN'
- DPR checkpoint on MSMARCO?
- Can't reproduce the performance of warmup(60k)
- Cannot download ANCE(FirstP) checkpoint HOT 2
- Download link not working
- data preprocess and inference HOT 2
- PYTHONPATH should be set explicitly HOT 1
- Provide pretrained BM25 checkpoint for TREC Document
- Using testset to test NDCG while training
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 ance.