huggingface / huggingface/transformers
Better documentation for generation parameter defaults
- Dominant language
- Python
- Stars
- 166k
- Forks
- 34.6k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 276
Description
# Generation default params documentation
It's very hard to follow how the generation parameters are set when running generation. When looking at the official function: https://github.com/huggingface/transformers/blob/700cee344691afc41f68aa18fedea463b22f95f1/src/transformers/generation_utils.py#L644 all parameters default to `None`, but are then later overwritten by the config's default parameters, *e.g.* here: https://github.com/huggingface/transformers/blob/700cee344691afc41f68aa18fedea463b22f95f1/src/transformers/generation_utils.py#L878 . This is very hard to trace or follow. We should at least put a warning or note that clearly states that all generation parameters (and actually all forward) parameters **always** default to the config.
What do you think @LysandreJik @patil-suraj @sgugger ?
If you agree, I'll open a PR for it :-)
Contributor guide
Assessment
This issue has not been assessed yet.