namin / llm-verified-with-monte-carlo-tree-search

LLM verified with Monte Carlo Tree Search
https://arxiv.org/abs/2402.08147
MIT License
215 stars 26 forks source link

fix bug in feature indexing #21

Closed davidbrandfonbrener closed 7 months ago

davidbrandfonbrener commented 7 months ago

This pull request fixes a bug where we were selecting the wrong index for features to use in run_diversity.

Before we were just selecting the features associated with the last token, but the last token was often a padding token yielding incorrect features.

Now we correctly select the feature from the index corresponding to the end of the actual generated text.