-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
stat:contributions welcomeAdd this label to feature request issues so they are separated out from bug reporting issuesAdd this label to feature request issues so they are separated out from bug reporting issues
Description
We would like our samplers to support a temperature argument that allows tightening or loosening the probability distribution.
We can add this pretty simply in the base class by dividing our logits by a temperature parameter here before applying the softmax.
Checklist:
- Sampler takes in a
temperature
argument in__init__
, adds it toself
, and populates it inget_config()
. - In
__call__
, useself.temperature
to scale the logits. - Beam sampler will need to do the same (as it overrides call).
- Add unit tests. E.g. this test could be adapted to run with a very low temperature, and assert that all output ids are zero.
Metadata
Metadata
Assignees
Labels
stat:contributions welcomeAdd this label to feature request issues so they are separated out from bug reporting issuesAdd this label to feature request issues so they are separated out from bug reporting issues