AkariAsai / self-rag

This includes the original implementation of SELF-RAG: Learning to Retrieve, Generate and Critique through self-reflection by Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi.
https://selfrag.github.io/
MIT License
1.76k stars 162 forks source link

Where does the retrieval done? #59

Open sutakori opened 6 months ago

sutakori commented 6 months ago

Hi author, thanks for the great work. I have a problem about retrieval.

屏幕截图 2024-03-18 174745

In paper, the retrieval is done in the every tree decoding step when needed. But if I'm not mistaken, in code, ctxs are passed before tree decoding. I wonder where the code realize this retrieval?