A pleasant CLI tool for fine-tuning OpenAI models
- Confirm you have Go (version>=1.16) installed:
go version
- Install openai-tune:
go install github.com/rossheat/openai-tune@latest
- Confirm installation:
openai-tune
If you see "command not found" you may need to add $GOPATH/bin
to your PATH:
For bash:
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc && source ~/.bashrc
For zsh:
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc && source ~/.zshrc
- Add your OpenAI API key to your environment:
export OPENAI_API_KEY=<OPENAI_API_KEY>
Upload a JSONL file for fine-tuning:
openai-tune upload -file <path-to-jsonl-file>
List all uploaded files with the purpose 'fine-tune':
openai-tune upload -list
Create a fine-tuning job with default settings:
openai-tune create -file-id <file-id> -model <model-name>
See this list of models that can be fine-tuned.
Create a fine-tuning job with custom settings from a YAML config:
openai-tune create -config <path-to-yaml>
See config.example.yml for all available options.
List fine-tuning jobs:
openai-tune list [-limit <n>] [-after <job-id>]
Get information about a specific fine-tuning job:
openai-tune get <job-id>
Cancel a fine-tuning job:
openai-tune cancel <job-id>
In order to enable logging with W&B, first please follow these instructions to enable the W&B integration for your OpenAI account.
Once you've enabled the W&B integration on your OpenAI account, specified your W&B integration in your config file, and created your fine-tuning job, you can view the job in W&B by navigating to the W&B project you specified in the job creation request. Your run should be located at the URL:
https://wandb.ai/<WANDB-ENTITY>/<WANDB-PROJECT>/runs/ftjob-ABCDEF