EleutherAI/gpt-neo

The model should return just the generated text, not the prompt text + generated text.

monsieurpooh opened this issue · 2 comments

There is no reason we would want the prompted text + generated text since we already know the prompted text because we fed it to the input of the program. Returning prompted text + generated text can lead to some unexpected issues. For example, in my program I say that the generated text is the returnedText.substring(prompt.length). But this can fail if there are single quote chars "'" which get escaped and appear as "\'" in the output, meaning the start of the returned text will be later than expected.

in my program I say that the generated text is the returnedText.substring(prompt.length). But this can fail if there are single quote chars "'" which get escaped and appear as "'" in the output, meaning the start of the returned text will be later than expected.

Can you provide an example showing how this is problematic? I don't feel like I am understanding.

I typed slash + single-quote but github corrected it to just single-quote; I have updated my comment to fix it.

For example If prompt is "I'm good" the returned text would be "I\'m good blah blah etc", and I am not sure if the cause is a bug in my code or transformers code. It would be more useful to just receive " blah blah etc"; I don't know why I would need to know the text I already provided to the program. However, I've implemented a workaround which is to replace all instances of backslash with empty string