How to use tapas-large-nq-hn-reader as a table retriever? #2666
Replies: 1 comment
-
HI @sbhttchryy! The model you linked to is the conversion of this model from the original Tapas repository. It is not suitable for retrieval. The model might be used as a re-ranker, but for this you would need to do some adaptions. As an The retrieval models described in the paper can be found here. However, we didn't convert them to PyTorch and therefore don't support them in Haystack. For retrieving tables (+ text) in Haystack, I would recommend using our Let me know if you have any further questions :) |
Beta Was this translation helpful? Give feedback.
-
Hello there. I came across this model. According to the description, it can be used in the Haystack framework as a TableReader.
from haystack.nodes import TableReader table_reader = TableReader(model_name_or_path="deepset/tapas-large-nq-hn-reader")
In the original paper, if I am not mistaken, this model was also used as a retriever by encoding the table and the query together. If I use this as a TableReader, is there a way to use it only to retrieve tables? From what I understand from checking out the code, TableReader.predict() returns answers sorted by the table score. If I am to use it only as a retriever, is getting the document_id from the TableReader.predict() is the way to do it?
Additionally, if one is to try to replicate the results of this is calling the TableReader.predict() sufficient?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions