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.
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, setlora_config in your TrainingConfig. A LoRA parent requires a lora_config.
lora_adapter_mergedisTruewhen SeekrFlow merges the adapter into full model weights. The fine-tune then deploys as its own model. The value isFalsefor every other run.lora_total_rankis the total rank of the combined adapter the run ships. For example, continuing a rank 16 adapter with a rank 16 LoRA run produces alora_total_rankof 32. The value isNonewhen the run ships full model weights or a single adapter that wasn’t combined, in which case the run’s rank is itslora_config.r.
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
rto 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_modulesfromextrasto 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, abiasother than"none", or aninit_lora_weightsvalue 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.
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_modulesthat differ from the parent’s when the result is a combined adapter. - The LoRA parent has no recorded LoRA configuration.
- The run’s
ris over 128.
model nor parent_finetune_id, TrainingConfig raises a ValueError before the request is sent.