LLaDA icon indicating copy to clipboard operation
LLaDA copied to clipboard

Does it support beam search generation strategy?

Open colinzhaoxp opened this issue 1 year ago • 2 comments

I have a question about beam search as the title described. In other words, Does LLaDA support Beam search, Top-K, Top-p generation strategy that supported by AR models ?

colinzhaoxp avatar Apr 30 '25 09:04 colinzhaoxp

LLaDA supports it, but the details are different from those of ARMs. In our code, you can see the option to set the temperature, which you can replace with top-p or TOP-K accordingly.

nieshenx avatar May 02 '25 02:05 nieshenx

thanks for your replay!

As for the beam search, do you mean this line of code? https://github.com/ML-GSAI/LLaDA/blob/4aa0dd2402fb9fec1137648cf768b56103a4a849/generate.py#L84

I also find that LLaDA supports two remasking strategies: low_confidence and random. If I want to support beam search, do i need to change them? https://github.com/ML-GSAI/LLaDA/blob/4aa0dd2402fb9fec1137648cf768b56103a4a849/generate.py#L87-L94

colinzhaoxp avatar May 02 '25 02:05 colinzhaoxp