The language model, ConversationalGPT-2, was built from scratch using PyTorch and follows a transformer architecture similar to modern language models.
Initially, the model was trained on the fineweb dataset to predict the most likely continuation of text. It was then fine-tuned on the DailyDialog dataset to enhance its ability to engage in natural, coherent conversations.
With over 100 million parameters, training was conducted on the Kaggle platform:
The trained model is also available on Kaggle and can be found here:
To run the project, follow these steps:
- Download the repository to your local machine.
- Run the Python script
chat_interface.py
.- If the necessary models are not already present, they will automatically be downloaded.
This section provides a demonstration of how the model responds in conversations. You can view a sample dialogue in action via the GIF below:
The dialogues presented here illustrate different aspects of the model's conversational abilities. Each interaction was generated by the model, and you can reproduce them by downloading the project and asking similar questions.
This dialogue highlights the model's ability to engage in casual, everyday conversations.
Dialog 1 |
---|
You: Hello. What's your name? |
AI: My name is Kate . |
You: Nice to meet you, Kate! Where are you from? |
AI: I'm from Texas . |
You: Oh, so you're from the US, right? |
AI: Yes , I am . |
You: Sounds great. What's your favorite fruit? |
AI: I love apples . |
You: Apples are yummy. |
AI: I love apples . |
You: Have you tried pineapples? |
AI: Yes , I have . |
You: What color are apples? |
AI: I don't know . |
You: What color is the sky? |
AI: It's blue . |
This dialogue demonstrates the model's ability to remember and recall information over multiple interactions.
Dialog 2 |
---|
You: Hello, how are you? |
AI: I'm fine . I'm just worried about my friends . |
You: Remember, the marble is blue. |
AI: Are you sure ? |
You: Yes |
AI: I'm sure . I'm just worried about my friends . I'm just worried about my friends . |
You: What color is the marble? |
AI: It's blue . |
You: Correct! Now, remember, the car is white. |
AI: But I'm not sure . |
You: How was your day? |
AI: I was fine . |
You: What's your name? |
AI: It's Mal . |
You: What color is the car? |
AI: It's white . |
This dialogue illustrates the model’s grasp of basic facts about the world, such as object speeds, languages spoken in different countries, and what scientists do.
Dialog 3 |
---|
You: What is faster: a car or a human? |
AI: A car is faster than a human . |
You: What do scientists do? |
AI: They study the environment . |
You: What language is spoken in the US? |
AI: We speak English . We study it . |