Fine-tuning Instructions
Preparation:
- Download spreadsheet as CSV
- Put in a folder on your desktop titled “bot”
- Rename your CSV to “train.csv”
Fine-Tuning Instructions:
- Make sure csv file has as its first row columns for “prompt” and “completion”
- Cd into folder with training file CSV by typing and then pressing enter:
cd desktop/bot
- Convert csv to JSONL file by typing the following into the command prompt window and pressing enter:
openai tools fine_tunes.prepare_data -f train.csv
- Hit y to all (doc will be converted)
- Copy key from OpenAI website (login > Personal > View API Keys)
- MAC – enter the following line with your API key where it says KEY into the command prompt window and press enter:
export OPENAI_API_KEY=”KEY”
- Alternative to step 6 for Windows – enter the following line with your API key where it says KEY into the command prompt window and press enter:
setx OPENAI_API_KEY “KEY”
THEN, ON WINDOWS ONLY, CLOSE COMMAND PROMPT WINDOW AND START NEW WINDOW, CD BACK INTO THE FOLDER WITH YOUR CSV
- Enter the following line into the command prompt window and press enter:
openai api fine_tunes.create -t train_prepared.jsonl -m davinci