Creating a generative chatbot
After our previous short journey on language modeling, let’s focus on the second type of conversational agent and implement a generative chatbot. To make the interaction more enjoyable, we will use a pre-trained model that has been specifically designed for this task. Additionally, we will wrap the implementation around two graphical user interfaces (GUIs) that facilitate the interaction with the model. Finally, we will discuss the steps for tuning the pre-trained model on a different dataset.
Using a pre-trained model
The lack of sufficiently large datasets, processing power, and time are often decisive factors in resorting to a pre-trained model. More importantly, tweaking language models is far from a modest task and requires much expertise. Thus, to create the chatbot, we will utilize DialoGPT (https://huggingface.co/docs/transformers/model_doc/dialogpt), a tunable neural conversational response generation model for multiturn conversations...