Feature request
Support returning raw logits in generate by either:
- creating a new arg that enables return of raw logits
- or support callback that allow users to collect the raw logits
Motivation
- Raw logits "would be the most understandable & consistent across generation methods" (@patrickvonplaten)
- For testing, returning raw logits would help "identify which parts get wrong if any test failure occurs" (@ydshieh)
- There's concern about "rampant too many options" (@Narsil), thus I would prefer the second option to support this feature.
- However, the second option still needs code change to support it. As the user provided
logits_processor is appended to a new instance of LogitsProcessorList. As a result, users cannot get the raw logits using the current implementation even with a custom LogitsProcessor.
See further discussion in #17424
Your contribution
I could open a PR to reorder how logits_processor is merged with the predefined list of LogitsProcessorList.
Feature request
Support returning raw logits in
generateby either:Motivation
logits_processoris appended to a new instance ofLogitsProcessorList. As a result, users cannot get the raw logits using the current implementation even with a customLogitsProcessor.See further discussion in #17424
Your contribution
I could open a PR to reorder how
logits_processoris merged with the predefined list ofLogitsProcessorList.