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

[Feature Request] Add Beam Search as decoding strategy #109

Closed
1 task done
LTluttmann opened this issue Jan 19, 2024 · 1 comment · Fixed by #110
Closed
1 task done

[Feature Request] Add Beam Search as decoding strategy #109

LTluttmann opened this issue Jan 19, 2024 · 1 comment · Fixed by #110
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@LTluttmann
Copy link
Contributor

Hey there,

first, big thanks for making this awesome library open source. I wish I would have discovered it earlier, would have probably saved me several hours of work ;)

One thing I was missing though is the beam search decoding strategy. Do you already plan on adding it in the future? Otherwise I would be happy to help with that

Motivation

Beam search can lead to significant improvements of the solution quality of the trained model (e.g. Kool et al., 2018)

Solution

This would probably require a base decoding strategy class, where the different strategies (greedy, sampling, beam search) would define a step function, called in every iteration of the autoregressive decoder. Also, something like a post_decoder_hook, where the backtracking of the beam search (and the concatenation of the actions in the other sampling strategies) takes place, would be required.

Checklist

  • I have checked that there is no similar issue in the repo (required)
@LTluttmann LTluttmann added the enhancement New feature or request label Jan 19, 2024
@fedebotu
Copy link
Member

fedebotu commented Jan 22, 2024

Hi @LTluttmann !
I definitely agree; beam search would be great to have. We haven't had a defined plan in mind for it so far due to the many things to do, including features that will be added in the near future in RL4CO. It would be awesome if you could help us implement the beam search! 🚀

We will gladly assign the feature to you - feel free to contact us any time if you have any questions or issues. Looking forward to the new beam search implementation ~

@fedebotu fedebotu added help wanted Extra attention is needed good first issue Good for newcomers labels Jan 22, 2024
@fedebotu fedebotu removed their assignment Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants