Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Fix RAG generation for T5 FiD #3657

Merged
merged 1 commit into from
May 19, 2021
Merged

Fix RAG generation for T5 FiD #3657

merged 1 commit into from
May 19, 2021

Conversation

moyapchen
Copy link
Contributor

@moyapchen moyapchen commented May 19, 2021

I noticed a big discrepancy between exact_match and token_em after I switched to using T5 FiD in public ParlAI.
Per discussion with Kurt, it's cause the generate for T5 is supposed to call TorchGeneratorAgent, rather than using the T5 generation via Hugging Face. This was in the original itnernal implementation, but got lost at some point while open sourcing.

Verified by printing out forced decoding outputs and the output from eval_model. Verified that when token_em == 1 that the output of eval_model was also the same. Models trained with this also doing a lot better.

I noticed a big discrepency between exact_match and token_em after I switched to using T5 FiD in public ParlAI.
Per discussion with Kurt, it's cause the generate for T5 is supposed to call TorchGeneratorAgent, rather than using the T5 generation via Hugging Face. This was in the original itnernal implementation, but got lost at some point while open sourcing.

Verified by printing out forced decoding outputs and the output from eval_model. Verified that when `token_em == 1` that the output of eval_model was also the same.
Copy link
Contributor

@klshuster klshuster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for fixing this!

@moyapchen moyapchen merged commit 91e883b into master May 19, 2021
@moyapchen moyapchen deleted the fix_rag branch May 19, 2021 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants