Multi-turn dialogue using dialoGPT with Hosted Inference API
I am looking to use dialoGPT-large on the Hosted Inference API for a chatbot demo but am having trouble generating decent multi-turn dialogue.As an example, when I post the following to the API endpoint:I heard you won the cricket match. <|endoftext|> I did! <|endoftext|> Awesome. Who did you play against? <|endoftext|> I played against the Aussies. <|endoftext|> Wow ! Was it a tough game? <|endoftext|> It was a tough game. It went on till the last over. They almost won. <|endoftext|> Where was the match? <|endoftext|>It seems to just spit it back out at me:I heard you won the cricket match. <|endoftext|> I did! <|endoftext|> Awesome. Who did you play against? <|endoftext|> I played against the Aussies. <|endoftext|> Wow ! Was it a tough game? <|endoftext|> It was a tough game. It went on till the last over. They almost won. <|endoftext|> Where was the match? <|endoftext|>This blog post has an example of someone getting meaningful results from exactly the above prompt:A simple contextual chatbot to predict a reply with pre-trained DialoGPT model from Huggingface | by Ramsri Goutham | DataDrivenInvestor.Any guidance as to where I’m going wrong would be really appreciated.
2020-07-30T05:30:48Z
Try without the spaces. Works for me.
2020-07-30T22:07:33Z
Hmm, gave that a go but no luck. Assuming you mean no spaces between the end of text tokens and the text itself?
2020-07-31T05:04:01Z
Hi@anthonyralston, from thedialo-gpt paper, section 3.1We first concatenate all dialog turns within a dialogue session into a long text x1, · · · , xN (N is the sequence length), ended by the end-of-text token.So I think you won’t need to addeostokens. Just concatenate your history and feed it to the model. That is how the model is trained.