Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TAPAS script to convert TAPAS-NQ weights (re-attempt #11907) #15592

Closed
wants to merge 3 commits into from

Conversation

xhluca
Copy link
Contributor

@xhluca xhluca commented Feb 10, 2022

Closes #14494

This is a reattempt of #11907, as it became stall and was closed. I had to use the latest version and copy the code over.

Instructions:

# Medium model
python src/transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py --task RETRIEVAL --tf_checkpoint_path tapas_nq_hn_retriever_medium/model.ckpt --tapas_config_file tapas_nq_hn_retriever_medium/bert_config.json --pytorch_dump_path tapas_od/ --vocab_file tapas_nq_hn_retriever_medium/vocab.txt 

# lareg model
python src/transformers/models/tapas/convert_tapas_original_tf_checkpoint_to_pytorch.py --task RETRIEVAL --tf_checkpoint_path tapas_nq_hn_retriever_large/model.ckpt --tapas_config_file tapas_nq_hn_retriever_large/bert_config.json --pytorch_dump_path tapas_nq_large/ --vocab_file tapas_nq_hn_retriever_large/vocab.txt 

Results

https://huggingface.co/xhlu/tapas-nq-hn-retriever-medium-1
https://huggingface.co/xhlu/tapas-nq-hn-retriever-medium-0

https://huggingface.co/xhlu/tapas-nq-hn-retriever-large-1
https://huggingface.co/xhlu/tapas-nq-hn-retriever-large-0

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@HuggingFaceDocBuilder
Copy link

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@xhluca xhluca changed the title Re-attempt #11907 Update TAPAS script to convert TAPAS-NQ weights (re-attempt #11907) Mar 2, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot closed this Apr 25, 2022
@yashgupta-7
Copy link

@xhluca Thanks for this contribution! Can you elaborate how to use this for inference?

@xhluca
Copy link
Contributor Author

xhluca commented Jun 27, 2022

This script isn't meant for inference. You should use load the regular TAPAS model. I have uploaded them to Huggingface already so you can find my name and use them if you don't want to run this script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add TAPAS trained on NQ
3 participants