Trained the data on kaggle as this:
- I started with a export of about 81,000 lines of WhatsApp messages! I had to write a script to clean out the junk (like “message deleted” or system alerts) and ended up with 12,613 dialogue samples. I grouped consecutive messages together so the AI would learn how to text like a real person, using paragraphs and slang instead of just short, robotic answers.
-Next I used a Llama-3 8B model as the base. To make the training actually possible on a Kaggle, I used a library called Unsloth. It makes the training so eazy and faster.
-Then ran the training on Kaggle’s T2x2 GPUs. I set it for 1,000 steps and watched the lost (which is basically how many mistakes the AI makes) drop from 2.5 all the way down to 0.3. It took a lot of trial and error to get the settings just right - Once it was done, I exported the model in a special format (GGUF) so it could run efficiently on the web. It was a long process.
(I’ve actually put so many days on this part as it was so different and I’m also just a beginner to ML/AI. I hope I’ve explained things here better for beginners. If you guys don’t understand any part of the cell on kaggle just do a comment )
I’ve also shared the link to the kaggle , due to privacy issues (of WhatsApp chats) I created a separate notebook where everything is the same, except the input WhatsApp file has been removed. You can explore here and use your own exported chats and train your own model :)
https://www.kaggle.com/code/hamnamubarak/amadeus
(Click on the “copy & edit” to see the code )
Log in to leave a comment