Multi-Modal Humor Generation for Reddit Posts
In this repository, I will be fine-tuning LLaMA 2 13B on top comments from submissions on the subreddit, r/funny.
Humor is a complex and subjective domain, and while language models can generate amusing content, their attempts often fall into the realm of predictably corny. Prompting can improve this, but it's difficult to emulate the level of wittiness of comments on r/funny that are so ridiculous they'll have you spewing your morning cup of coffee all over your keyboard. This project aims to bridge that gap, leveraging the unique humor of r/funny to bring a new level of comedic intelligence to Llama 2 13B.
This is the most crucial part of the project and makes up for the bulk of the effort. In order to procure a high quality dataset that results in a good fine-tuned model the following steps are taken:
- Scrape r/funny using PRAW (Python Reddit API Wrapper)
- Generate image descriptions with BLIP Image Captioning Model
- Augment image descriptions with celebrity and text detection using Amazon Rekognition
- Impute missing image descriptions with few-shot learning using GPT-4
Use QLoRA to fine-tune LLaMA 2 13B on the curated Reddit dataset.
For this initial phase, I will deploy this system where users can submit the URL of a post from any subreddit and a witty comment will be returned.
For this second phase, I will release a Reddit bot into the wild to make humorous comments on posts for numerous communities.