Show HN: WhatsApp-Llama: A clone of yourself from your WhatsApp conversations (github.com)
I've been thinking about the idea of a LLM thats a clone of me - instead of generating replies to be a helpful assistant, it generates replies that are exactly like mine. The concept's appeared in fiction numerous times (the talking paintings in Harry Potter that mimic the person painted, the clones in The Prestige), and I think with LLMs, there might actually be a possibility of us doing something like this!
I've just released a fork of the facebookresearch/llama-recipes which allows you to fine-tune a Llama model on your personal WhatsApp conversations. This adaptation can train the model (using QLoRA) to respond in a way that's eerily similar to your own texting style.
What I've figured out so far:
Quick Learning: The model quickly adapts to personal nuances, emoji usage, and phrases that you use. I've trained just 1 epoch on a P100 GPU using QLoRA and 4 bit quantization, and its already captured my mannerisms
Turing Tests: As an experiment, I asked my friends to ask me 3 questions, and responded with 2 candidate responses (one from me and one from llama). My friends then had to guess which candidate response was mine and which one was Llama's. Llama managed to fool 10% of my friends, but with more compute, I think it can do way better.
Here's the GitHub repository: https://github.com/Ads-cmu/WhatsApp-Llama/
Would love to hear feedback, suggestions, and any cool experiences if you decide to give it a try! I'd love to see how far we can push this by training bigger models for more epochs (I ran out of compute credits)
51 comments
[ 4.2 ms ] story [ 141 ms ] threadI wonder how well would chatGPT | llama2 do given just the last 5 messages of each and asking to generate the next reply pre tending to be you…
Somehow I don’t think it would be worse?
I am imaging some nerds actively changing their real behaviour to become closer to ChatGPT so that others will more likely believe it when they take a break and handover their work/comms to AI tools :)
I expect there will be profitable businesses based on training LLMs to simulate eminent people & celebrities – on both their public utterances and their private correspondence – then charging for access to the best models.
How is your most notable example not when Gilfoyle does exactly this so he doesn’t have to talk to Dinesh in Silicon Valley??
edit: I actually started a little work on this. If you wanna export more messages than the limited 40k, you can use [0]. I did and I have every text I've ever sent since I had WhatsApp.
[0]: https://github.com/YuvrajRaghuvanshiS/WhatsApp-Key-Database-...
Yeah, this can be extended to create a "simulation game" of us and our friends. This paper (Interactive Simulacra of Human Behaviour https://arxiv.org/abs/2304.03442 ) has a setup on how we could create a Sims game with us as the characters
The intent being to create digital avatars of lost loved ones to help people with the grieving process.
I know that there would be tremendous opportunity in such tech for malicious actors to do serious harm, but the stated goal is still a worthwhile endeavor.
Edit:
However, I also know that the average grieving person doesn't necessarily have the skills or desire to compile source, fine-tune a llm, etc..., so there would most likely be an opportunity for people to create a paid turnkey system wherein a digital archivist helps the grieving person create the avatar. In such a system, I would probably recommend that the product be tied with:
1) A Grief Counselor
2) a nag system for when interaction time reaches unhealthy levels
3) some method of alerting the grief counselor directly when certain thresholds of toxic interaction are met
So it would simulate conversations between us.
The result was hilarious yet at times uncomfortably accurate... like looking into a mirror...
There was some post-processing needed to get it in this format:
Edit: OP's GitHub README has instructions for exporting & preprocessing.---
For finetuning GPT-2 I think we used this thing. I ran it on Google Colab. My friend ran it on his GPU, it should be doable on most modern-ish GPUs.
https://github.com/minimaxir/gpt-2-simple
I tried doing something with this a few months ago though and it was a bit of a hassle to get running (needed to use a specific python version for some dependencies...), I forget the details sorry!
Yeah, GCP GPU prices are terrible. $150 for a short time on a P100 is highway robbery.
TPUs are better, but still kinda pricey.
I use axolotl for training, I didn't check your notebook but axolotl likely comes with more optimized defaults for speed and vram than what you're doing.
https://www.youtube.com/watch?v=IWIusSdn1e4
https://en.m.wikipedia.org/wiki/Be_Right_Back
I remember that the photos in the newspaper moving mimic the person.
But I thought the talking paintings were ghosts living in the paintings or something.
Let's say you need to buy a gift for a friend. If your LLM assistant is trained on all the WhatsApp chats you've had with that friend, it would understand your relationship well and would be able to recommend something accordingly
Or it could also just speed up the time taken to reply to messages by suggesting responses and therefore having you type less
Does anyone know a convenient way to access the kind of GPUs required for this?
Should I just pay for Google Colab?
Its very easy to connect your colab notebook to a GCP machine