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

Questions about Beam search algorithim #90

Open
gabbyzyk opened this issue Oct 1, 2024 · 1 comment
Open

Questions about Beam search algorithim #90

gabbyzyk opened this issue Oct 1, 2024 · 1 comment

Comments

@gabbyzyk
Copy link

gabbyzyk commented Oct 1, 2024

Thansk for your great work,
how ever I have a question about the use of beam search
During the inference , the generative model M sequentially generates textual outputs y, which consist of multiple segments y = [y1, ..., yT]. At each time step t, I want to understand if beam search generates b candidate sequences [y1, y2, ..., yt] based on their scores. After the generation is complete, the sequence with the highest score is selected.
I would greatly appreciate it if you could find the time to answer my question.

@fate-ubw
Copy link

fate-ubw commented Oct 6, 2024

First of all, if you want to understand the logic of beam search in the selfrag algorithm, then you need to first understand the beam search algorithm based on tokens.
The difference between the beam search algorithm used in the long form is that sentence is used as the basic unit.
For your question, I have to admit that it is still very difficult to understand the longform beam search in the selfrag algorithm, I think the best way is to compare the code and the paper at the same time, and use debug to understand the reasoning process of the beam search step by step, it is really difficult to explain accurately by language and can be easily understood.
There are some bugs in the official selfrag code longform reasoning that can confuse beginners. I fixed some bugs in the selfrag code in raglab, and rewrote this part of the algorithm according to the algorithm proposed in the paper, and implemented the real sentence level beam search, selfrag longform beam search
Hopefully, the above answers can help you ~

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

No branches or pull requests

2 participants