DoLa
DoLa copied to clipboard
two questions about get_relative_top_filter?
Thank you for your excellent work.
-
I think "scores_normalized = scores.log_softmax(dim=-1)" is redundant because “scores” has already been passed through log_softmax (i.e., "final_logits = final_logits.log_softmax(dim=-1)").
-
When you fix min_tokens_to_keep=1, probs_max is equal to min_thresh, so you can also omit "sorted_logits, sorted_indices = torch.sort(scores_normalized, descending=True)".
After debugging, I verified that the results are the same. Perhaps I missed other details.