Skip to content

two questions about get_relative_top_filter? #20

@haiduo

Description

@haiduo

Thank you for your excellent work.

  1. 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)").

  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions