When the first GUESS_SIZE elements of the correct list and the myguess list are consistent, it means that all guesses have been made. At this time, the last element of the correct list should also be the correct token, so it should be added to the hits list.
When the first
GUESS_SIZE
elements of thecorrect
list and themyguess
list are consistent, it means that all guesses have been made. At this time, the last element of thecorrect
list should also be the correct token, so it should be added to thehits
list.https://github.com/hao-ai-lab/LookaheadDecoding/blob/9d50de4a81d1b473bfce104ace18fbbbb6dc3255/lade/decoding.py#L1068C1-L1085C88
original code
Modified code