Skip to content

top_p versus do_sample #32

@jerome-white

Description

@jerome-white

When running detect_frames in my environment PyTorch (version 2.5.1+cu124) produces the following warning:

[ 06:46:40 WARNING warnings.py ] /opt/conda/envs/pytorch/lib/python3.11/site-packages/transformers/generation/configuration_utils.py:634: UserWarning: `do_sample` is set to `False`. However, `top_p` is set to `0.95` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `top_p`.

I'm following the README, so the only parameter I'm passing to detect_frames is my sentence. I think the warning is coming because of the methods values:

top_p: float = 0.95,
do_sample: bool = False,

Are there any recommendations on parameter values that might alleviate this warning. I understand the difference with respect to how a transformer works. I'm more interested in thoughts based on domain insight. In particular, what values were used to produce the Sesame comparison results?

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