Find your recipe
Each recipe is one Python file that uses the OpenAI client. Follow it from sample data to jobs to printed results.
What you need: Python, a terminal, a Gridline token and credits. Each script waits for its jobs to finish; time estimates are not available. Job counts below show what you will run. Set up before you start.
- Fine-tuning
- Batch inference
Fine-tune a classifier
Build a support-ticket classifier and compare it with its base model.
- Comfort with
- Python and terminal basics
- Creates
- one fine-tuning job and one batch
- Distillation
- Fine-tuning
- Batch inference
Distill a large model into a small one
Train a smaller model on a teacher's answers, then check their agreement.
- Comfort with
- Python, JSON and terminal basics
- Creates
- two batches and one fine-tuning job
- Structured outputs
- Batch inference
Extract structured data in bulk
Turn order emails into JSON records and read any request errors.
- Comfort with
- Python, JSON and terminal basics
- Creates
- one batch
- Embeddings
- Batch inference
Embed text and search it
Find passages closest in meaning to your questions using text vectors.
- Comfort with
- Python and terminal basics
- Creates
- one batch
- Evals
- Batch inference
Evaluate a fine-tune
Compare your fine-tune with its base and inspect the tickets it missed.
Run Fine-tune a classifier first, in the same folder: it writes
test.jsonland prints your model. SetFT_MODELto that model's id.- Comfort with
- Python and terminal basics; classifier recipe first
- Creates
- two eval runs, each of them one batch
Before you start
You need a Gridline token and credits: the quickstart shows how to get both. Then install the OpenAI client and put the token in your shell:
python -m pip install -U openai
export GRIDLINE_TOKEN="gla_..."A recipe creates real jobs. Fine-tuning and batch jobs are paid for from your prepaid credits. A fine-tuning job prints its quote, the most it can cost, as soon as it is created.
What a credit is worth, the credit packs and each model's rates are on the pricing page.