Show HN: Train a language model to talk like you
colab.research.google.com
colab.research.google.com
This notebook uses the exported chat logs to train a simple GPT/GPT2 conversational model! It uses Google Colab, a notebook platform that allows you to train complex models online for free.
The approach is super simple: it takes all your chat logs, turns them into this format:
> <speaker1> Hi
> <speaker2> Hey - how are you?
> <speaker1> Great, thanks!
> ...
...then simply trains a GPT model on this corpus. In practice, I found that the default parameters (including using GPT and not GPT2) give the best resources for this setup.
This notebook will be part of our workshop "Meet your Artificial Self" happening this Saturday at AMLD 2020 in Lausanne, Switzerland: https://appliedmldays.org/workshops/meet-your-artificial-sel...
Feedback is welcome! :D
And yes my problems with voice recognition are probably due to my Scottish accent.... ;-)
Coincidentally, today I was even planning to publish my last post and notebook for training gpt2-1.5b and then chatting to oneself with the model. I left it for tomorrow though.. Maybe a mistake.
There is quite a lot you can do and talking to my trained model which is responding to me as me can be real weird at times. It's definitely the most engaged Ive been with gpt while talking to myself.
Having said that you seem to train here on very little. Still - cool demo.
> Having said that you seem to train here on very little.
The datasets provided in the notebook are really meant to be fallbacks for people who are not willing to use their own chat log data. When training on my own data, I have about 500k messages, which starts being enough to get interesting results.
edit: wow, I see you're training on "14M facebook messages", that's impressive - do you actually chat that much?!
It's 14mb of data, not sure how many messages it actually comes down to but FB Messenger has been my main platform for talking to friends for the last decade.
We've published the third notebook: https://colab.research.google.com/drive/1XYNef9zcHhTjt6kM6yd...
We would gladly have your feedback on our approach
It's sometimes very lucid, sometimes insane, but most of all it's very entertaining.
As a complete aside, I also tried 'transfer learning' against a huge amount of Marxist literature and then a small amount of erotic fiction, but that experiment hasn't quite worked out. Sexy Robot Marx will have to wait.
But we will release the two other notebooks used during the workshop, and plan to write a blog post detailing the full content.
When I was a teenager I wrote a very graphic and very disturbing work of fiction that was archived on a popular erotica text website.. I have had anxiety for many years now that eventually someone will glue the authorship of that story to my identity.. If people in my real life discover my fantasies from years back because of my writing signature, I do not want to guess where that will leave me.. I am not looking forward to the future!!
I wanna be like you
I wanna walk like you, talk like you, too
You'll see it's true someone like me
Can learn to be like someone like you