Skip to content

Add SFT optimization guide and example#5633

Merged
GabrielBianconi merged 6 commits intomainfrom
andrew/sft-docs
Feb 6, 2026
Merged

Add SFT optimization guide and example#5633
GabrielBianconi merged 6 commits intomainfrom
andrew/sft-docs

Conversation

@anndvision
Copy link
Member

@anndvision anndvision commented Jan 13, 2026

This pull request adds documentation and a runnable example for Supervised Fine-Tuning (SFT) optimization.

Changes

  • Documentation: Adds docs/optimization/supervised-fine-tuning.mdx guide explaining how to fine-tune LLMs using TensorZero, with updated navigation in docs.json and a link from docs/optimization/index.mdx

  • Runnable Example: Provides a complete example in examples/docs/guides/optimization/supervised-fine-tuning/ featuring a named entity recognition task, including main.py for execution

  • Configuration Files: Supplies tensorzero.toml, docker-compose.yml, pyproject.toml, system_template.minijinja, and output_schema.json for the example

  • Provider Reference: Documents configuration parameters for all four SFT providers (OpenAI, Fireworks, Together, GCP Vertex AI Gemini) including required provider_types settings


Important

Adds a guide and runnable example for Supervised Fine-Tuning (SFT) using TensorZero, including documentation, example code, and configuration files.

  • Documentation:
    • Adds supervised-fine-tuning.mdx guide for SFT in docs/optimization/.
    • Updates docs.json to include the new guide in navigation.
    • Links to the guide from index.mdx in docs/optimization/.
  • Example:
    • Provides a runnable example in examples/docs/guides/optimization/supervised-fine-tuning/ for named entity recognition.
    • Includes main.py for execution and docker-compose.yml for setup.
  • Configuration:
    • Adds tensorzero.toml, system_template.minijinja, and output_schema.json for example configuration.
    • Documents SFT provider configurations for OpenAI, Fireworks, Together, and GCP Vertex AI Gemini.

This description was created by Ellipsis for cdc84ca. You can customize this summary. It will automatically update as commits are pushed.


Note

Low Risk
Docs and example-only changes; no production runtime logic is modified beyond documentation/navigation content.

Overview
Adds a new Supervised Fine-Tuning (SFT) optimization guide (docs/optimization/supervised-fine-tuning-sft.mdx) describing the end-to-end workflow (curating demonstrations/metrics, rendering samples, launching and polling provider fine-tunes) plus a provider config reference for OpenAI, Vertex Gemini, Fireworks, and Together.

Updates the Optimization docs IA to surface SFT: docs/docs.json adds the page to the Optimization nav, and docs/optimization/index.mdx is rewritten to include an SFT section/link plus refreshed model/prompt/inference-time optimization descriptions; gateway/guides/inference-time-optimizations.mdx trims a DICL example callout.

Introduces a complete runnable SFT example under examples/docs/guides/optimization/supervised-fine-tuning/ (NER pipeline) including Docker Compose + tensorzero.toml config, prompt + schema files, and an async main.py that generates demonstrations, renders samples, launches an OpenAI SFT job, polls for completion, and prints the config snippet to use the fine-tuned model.

Written by Cursor Bugbot for commit 1443d8b. This will update automatically on new commits. Configure here.

GabrielBianconi
GabrielBianconi previously approved these changes Feb 5, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

virajmehta
virajmehta previously approved these changes Feb 5, 2026
@anndvision anndvision dismissed stale reviews from virajmehta and GabrielBianconi via 1443d8b February 6, 2026 00:41
@anndvision anndvision requested a review from virajmehta February 6, 2026 00:41
@anndvision anndvision assigned virajmehta and unassigned anndvision Feb 6, 2026
@GabrielBianconi GabrielBianconi added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit e62c6d2 Feb 6, 2026
70 checks passed
@GabrielBianconi GabrielBianconi deleted the andrew/sft-docs branch February 6, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants