Skip to content

Support for negative n_best when sampling #73

@LaurentMazare

Description

@LaurentMazare

Thanks for these bindings, we've been using them a lot to train our models and have been very happy with them.
One thing though is that negative values for n_best when using sampling doesn't seem to be supported, e.g. here the parameter is a size_t that got cast to an int.
However on the C++ side it seems that negative values can be used to sample across all possibilities, see this documentation. Is there already a way to do this on the rust side? If not do you think it would be possible to allow negative values to match the C++ api? Happy to make a PR if that helps.

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