Skip to content

Commit 2942bf4

Browse files
Update README.md with fine-tuning examples (#583)
* Update README.md with fine-tuning examples * Update README.md
1 parent df8b0ba commit 2942bf4

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,20 +219,26 @@ For more information on embeddings and the types of embeddings OpenAI offers, re
219219

220220
### Fine-tuning
221221

222-
Fine-tuning a model on training data can both improve the results (by giving the model more examples to learn from) and reduce the cost/latency of API calls (chiefly through reducing the need to include training examples in prompts).
222+
Fine-tuning a model on training data can both improve the results (by giving the model more examples to learn from) and lower the cost/latency of API calls by reducing the need to include training examples in prompts.
223223

224-
Examples of fine-tuning are shared in the following Jupyter notebooks:
224+
```python
225+
# Create a fine-tuning job with an already uploaded file
226+
openai.FineTuningJob.create(training_file="file-abc123", model="gpt-3.5-turbo")
225227

226-
- [Classification with fine-tuning](https://github.com/openai/openai-cookbook/blob/main/examples/Fine-tuned_classification.ipynb) (a simple notebook that shows the steps required for fine-tuning)
227-
- Fine-tuning a model that answers questions about the 2020 Olympics
228-
- [Step 1: Collecting data](https://github.com/openai/openai-cookbook/blob/main/examples/fine-tuned_qa/olympics-1-collect-data.ipynb)
229-
- [Step 2: Creating a synthetic Q&A dataset](https://github.com/openai/openai-cookbook/blob/main/examples/fine-tuned_qa/olympics-2-create-qa.ipynb)
230-
- [Step 3: Train a fine-tuning model specialized for Q&A](https://github.com/openai/openai-cookbook/blob/main/examples/fine-tuned_qa/olympics-3-train-qa.ipynb)
228+
# List 10 fine-tuning jobs
229+
openai.FineTuningJob.list(limit=10)
231230

232-
Sync your fine-tunes to [Weights & Biases](https://wandb.me/openai-docs) to track experiments, models, and datasets in your central dashboard with:
231+
# Retrieve the state of a fine-tune
232+
openai.FineTuningJob.retrieve("ft-abc123")
233233

234-
```bash
235-
openai wandb sync
234+
# Cancel a job
235+
openai.FineTuningJob.cancel("ft-abc123")
236+
237+
# List up to 10 events from a fine-tuning job
238+
openai.FineTuningJob.list_events(id="ft-abc123", limit=10)
239+
240+
# Delete a fine-tuned model (must be an owner of the org the model was created in)
241+
openai.Model.delete("ft-abc123")
236242
```
237243

238244
For more information on fine-tuning, read the [fine-tuning guide](https://platform.openai.com/docs/guides/fine-tuning) in the OpenAI documentation.

0 commit comments

Comments
 (0)