Skip to content

Fine-tuning runs

A FinetuningRun is the core object that controls kicking off, monitoring, and managing fine-tuning runs.

Before fine-tuning a model, make sure your local setup is complete.


If you already have a fine-tuning run that's running, or has run, you can grab the ID from the Blueprint Web UI (or from FinetuningRun.list()) and instantiate it as such:

from import FinetuningRun 

finetuning_run = FinetuningRun(id="my_id")

With your FinetuningRun, you can now manage your fine-tuning run, deploy a fine-tuned model or view logs.

Kicking off a run

To kick off a fine-tuning run, FinetuningRun expects 2 things:

  1. A FinetuningConfig (which also contains a pointer to a Dataset)
  2. A name, which applies to the run and the eventual deployed model
from import FinetuningRun

finetuning_run = FinetuningRun.create(
    trained_model_name="My model", 

See details for:

Stream logs from a run

You can stream logs during or after fine-tuning using the Blueprint SDK:

from import FinetuningRun 

finetuning_run = FinetuningRun(id="my_id")

To view all of the functionality of FinetuningRun, visit the reference doc.

Deploying the fine-tuned model

Once the fine-tuning run is complete, your model will be automatically deployed. You'll receive an email when the deployment is finished and the model is ready to invoke.

You can turn off this behavior by setting auto_deploy=False in FinetuningRun.create() and instead deploy your model manually.