Emmet Halm Profile picture
full stack human. building https://t.co/I6IDvQops6 | prev @dao_hq (acq), https://t.co/iGpVzzEArV (acq), cs + history @harvard, @ZFellows_

Apr 29, 2023, 8 tweets

TopGPT got over 100k users in < 24 hours and broke my OpenAI account.

Here’s a short guide to fine tune a chatbot:

There are three main ways to create a chatbot:

🤖 Prompt engineer chatGPT3.5-turbo / 4

🧮 Use chatGPT + vector embedding

🪛 Fine tune a base model like DaVinci

Fine tuning is the best for initiating speech patterns. Let’s dive in.

Step 1: scrape your data

Your model is only as good as the data that goes into it.

👉Use the YouTube API, Whisper, or simple find a transcript of the content you want to imitate.

You’ll probably need a short Python script for this.

Step 2: clean & format your data

I learned this the hard way. To get good results, you need your data to be immaculate.

But not just grammatically clean.

‼️You need to put your data in “prompt completion pair.”

Here’s the chatGPT prompt I used to generate prompt completion questions:

👉“I have the following text transcript that in need to put in JSONL format for fune tuning.

Example format, {"prompt": "Who is Elon Musk?", "completion": "Elon Musk is a business magnate and investor."}… twitter.com/i/web/status/1…

Step 3: run the fine tune

This is the easy part!

👉 Just call the fine tune endpoint in your terminal, specify which model you want to tune, and name your .jsonl file.

Wait a few minutes and you’re done.

You can now use your fine tune directly from the OpenAI playground.

To recap:

- 💻 scape text data
- 🧼 clean data
- 🙋🏻‍♂️ generate prompt-completion questions
-🏃‍♂️ run the fine tune

Who am I?

I had close to zero coding skills two months ago as a non-technical founder 🤐

But now I’m on a journey to become a 10x dev & sharing my AI learnings along the way.

If you enjoyed this guide or any of my previous AI projects consider following @ehalm_.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling