hao-ai-lab / LookaheadDecoding

Apache License 2.0
1.04k stars 63 forks source link

Bug in Greedy Search #62

Open david-wei-01001 opened 1 month ago

david-wei-01001 commented 1 month ago

in lade/decoding/py line1175 the original code:

else:
                all_old_tokens.append(hits[max_hit])

should be changed to

else:
                all_old_tokens.append(hits[hit_idx])

Otherwise it is just appending the same thing