Giter VIP home page Giter VIP logo

gpt-fine-tuning-with-nodejs's Introduction

GPT Fine-Tuning using Node.js

This project show how to easily fine-tune a GPT data model. This codebase goes along with the tutorial located here.

Prerequisites

To follow along with this tutorial, you’ll need to have the following installed on your machine:

  • Python
  • Node.js

You’ll also need an OpenAI API Key. You can get one at https://openai.com.

Getting started

First, clone the repo and install the dependencies:

git clone https://github.com/dabit3/gpt-fine-tuning-with-nodejs.git

cd gpt-fine-tuning-with-nodejs

npm install # or yarn

Next, set the environment variable for your OpenAI API Key

export OPENAI_KEY="your-api-key"

Running the app

First, upload the file with the example or custom data set to OpenAI:

node uploadFile.js

Next, use the File ID that is logged out to create a new fine tune based on davinci by updating the training_file in createFineTune.js.

Finally, create the fine tune:

node createFineTune.js

Listing your Fine Tunes

Once the fine tune is created, it will take some time to process. We can get the status of the fine tune, as well as the model ID, by calling the listFineTunes API method.

node listFineTunes.js

Testing it out

Now that the fine tune has processed and our. new model is ready, we can try it out.

Open createCompletion.js. Here, update the fine_tuned_model value with your model name.

Next, run the script:

node createCompletion.js

gpt-fine-tuning-with-nodejs's People

Contributors

dabit3 avatar

Watchers

Wooseok Yang 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.