Skip to main content
For conceptual background on continued fine-tuning, including eligibility and how lineage works, see Continued fine-tuning.
Continued fine-tuning requires seekrai 0.37.0 or later. Upgrade with pip install --upgrade seekrai.

Start a continued fine-tune

Endpoint: POST /v1/flow/fine-tune To continue a fine-tune, set parent_finetune_id in your TrainingConfig to the ID of the completed fine-tune. The new run starts from the parent’s latest saved checkpoint and uses the training file and settings you provide. The parent must be a completed fine-tune that belongs to your team and has saved checkpoints. It can be a full fine-tune or a LoRA fine-tune. The model parameter is optional. If you include it, it must match the parent’s base model.
The response includes the parent’s base model in model and the parent’s ID in parent_finetune_id. You can continue with any supported training method. Set fine_tune_type and the method’s parameters in TrainingConfig as you would for a new fine-tune. For example, set fine_tune_type to PREFERENCE to refine a standard fine-tune with preference training. See Create a fine-tuning job for project setup, file upload, and monitoring.

Continue with LoRA

To continue a LoRA fine-tune, or to continue a full fine-tune with LoRA, set lora_config in your TrainingConfig. A LoRA parent requires a lora_config.
SeekrFlow chooses how to combine the new run with the parent, and the response reports the outcome when you create the job.
  • lora_adapter_merged is True when SeekrFlow merges the adapter into full model weights. The fine-tune then deploys as its own model. The value is False for every other run.
  • lora_total_rank is the total rank of the combined adapter the run ships. For example, continuing a rank 16 adapter with a rank 16 LoRA run produces a lora_total_rank of 32. The value is None when the run ships full model weights or a single adapter that wasn’t combined, in which case the run’s rank is its lora_config.r.
A full fine-tune continued with LoRA always ships full model weights, so lora_adapter_merged is True. For the full table of parent and run combinations, see Continue with LoRA. Follow these rules when you continue with LoRA:
  • Set r to 128 or lower. Each run’s rank has a maximum of 128.
  • Keep the combined rank at 256 or lower to get one adapter. The combined rank is the parent adapter’s rank plus the new run’s r. A higher combined rank produces full model weights.
  • Omit target_modules from extras to train the parent’s target modules. When the result is a combined adapter, the new run must train the parent’s target modules.
  • Use plain LoRA. The parent and the new run can’t use use_dora, modules_to_save, rank_pattern, alpha_pattern, layers_to_transform, a bias other than "none", or an init_lora_weights value other than the default or "gaussian".

View a fine-tune’s lineage

Endpoint: GET /v1/flow/fine-tunes/{fine_tune_id}/lineage Use lineage to retrieve the chain of fine-tunes a model descends from. The chain is ordered oldest first and ends with the fine-tune you request.
Sample output:
Generation 0 is the run trained from the base model. Each node also reports model, fine_tune_type, status, created_at, and completed_at. For LoRA runs, each node reports lora, which is True when the run trained LoRA, along with lora_adapter_merged and lora_total_rank. If the lineage includes deleted fine-tunes, they stay in the chain and report deleted_at. To retrieve the lineage of a fine-tune that you deleted, set include_deleted=True. If truncated is True, the chain stops before the run trained from the base model, and truncated_reason states why. Check truncated before you treat a depth of 0 as a fine-tune with no parent. Every fine-tune you retrieve with client.fine_tuning.retrieve or client.fine_tuning.list includes parent_finetune_id. The value is None for a run trained from a base model.

Errors

A LoRA request returns 422 when any of these apply:
  • You continue a LoRA fine-tune without a lora_config.
  • The parent or the new run uses a LoRA option outside plain LoRA.
  • The request sets target_modules that differ from the parent’s when the result is a combined adapter.
  • The LoRA parent has no recorded LoRA configuration.
  • The run’s r is over 128.
If you set neither model nor parent_finetune_id, TrainingConfig raises a ValueError before the request is sent.

Data attribution

Training data attribution for a continued model returns only examples from the training data of that model’s own training run. It never returns examples from the fine-tunes it builds on. Training data attribution isn’t available for continued fine-tunes that use preference or reinforcement tuning.
Last modified on November 16, 2026