Git Product home page Git Product logo

fine-tuning-chat-gpt's Introduction

๐Ÿ› ๏ธ Fine Tuning Workshop ๐ŸŽฏ

Hello, world! ๐ŸŒ Let's talk about the magic of fine-tuning! Ever wanted GPT-3.5 to give you code, precisely how you like it? You're in the right place! We're diving deep into how to fine-tune our friend, GPT-3, to get more precise code outputs. ๐Ÿš€

๐Ÿ“Œ Table of Contents

  1. What's the Goal?
  2. Setting Things Up
  3. The OG Prompt
  4. Gathering Our Training Data
  5. Model Upload Time!
  6. The Moment of Truth: Testing!

What's the Goal? ๐ŸŽฏ

We've got a mission! ๐Ÿ•ต๏ธโ€โ™‚๏ธ Instead of long, windy prompts, we want to shoot GPT-3 a concise one and get back sweet, sweet code in this format:

[filename.ext]
```code
CODE HERE

Sounds cool, right? ๐Ÿคฉ Let's get started!

<a name="setting-things-up"></a>
## Setting Things Up ๐Ÿ› ๏ธ

First things first, let's make sure we've got all our tools ready. 

Install the magic potion with:
```bash
pip install --upgrade openai

And then, let's summon our trusty sidekicks:

import json
import openai
import os
import glob

The OG Prompt ๐Ÿ“œ

Remember the OG (original) prompt? Yep, it was a bit of a chatty one! ๐Ÿ™Š We're on a mission to make it shorter, sweeter, and more to the point!

Gathering Our Training Data ๐ŸŽ’

Alright, time to gather our training data! It's like prepping ingredients for a delightful recipe. ๐Ÿฒ Our example_data folder has got the goodies. We'll use this as our base for training GPT-3.

Quick magic spell to grab all our data files:

files = glob.glob("example_data/*")

And then, it's transformation time! ๐Ÿฆ‹ We'll get these files ready for training.

Model Upload Time! ๐Ÿš€

Alright, fam! Once we have our data ready, it's time to give GPT-3 a little training session. Imagine it as a mini bootcamp! ๐Ÿ‹๏ธโ€โ™‚๏ธ We'll do this at OpenAI's platform: https://platform.openai.com/finetune

The Moment of Truth: Testing! ๐ŸŽ‰

Alright! Moment of truth! After that mini bootcamp, it's time to see how well GPT-3's been trained! Let's test our fine-tuned model and see the magic happen! ๐ŸŒŸ


Happy coding and fine-tuning! Remember, with every iteration, we get closer to perfection! ๐ŸŒˆ๐ŸŽˆ๐ŸŽ‰

Need data?

Checkout hugging face, they have over 70,000 datasets that you can use for fine-tuning.

https://huggingface.co/datasets

fine-tuning-chat-gpt's People

Contributors

kuczmama avatar

Stargazers

Aronima Dass avatar

Watchers

Aronima Dass avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.