Clone an existing job
Start a new job
.jsonl shards, or a Google Cloud Storage path (gs://<BUCKET>/train.jsonl). It can’t read datasets stored in Fireworks (accounts/<ACCOUNT_ID>/datasets/<DATASET_ID>). Use the same file you uploaded for the managed job, and its evaluation file if it had one. The row format doesn’t change. For data in Amazon S3 or Azure Blob Storage, copy it to a local file or to Cloud Storage first.Clone an existing job
migrate_managed_job.py in the Fireworks cookbook. It reads your old job’s settings, maps them onto the matching training recipe, runs it, and promotes the result to a new model. See the tool README for how each setting maps.Run it with the Python API instead
Run it with the Python API instead
- Create an API key in the account that owns the job, in the dashboard or with
firectl api-key create. The Training API rejects keys that can reach more than one account. If you belong to several Fireworks accounts, use a service account key created in the job’s account. - Install Python 3.11 or newer and uv.
- For a DPO or ORPO job, pass
accounts/<ACCOUNT_ID>/dpoJobs/<JOB_ID>. MigrationInputsalso takeseval_dataset_path,mode("auto","serverless"or"dedicated"),tokenizer_modelandmax_seq_len.plan.configis the recipeConfigthe run uses. The tool saves a resumable checkpoint every 20 steps, as managed training did.
- The training loop runs in your Python process for the whole job, not on Fireworks. If the process stops, training stops. For long runs, use a machine that stays on, such as a cloud VM, and keep the output in a log file:
nohup python train.py > train.log 2>&1 &. - Watch the loss in the log, in Weights & Biases, or on the training dashboard.
- If the run stops early, the tool prints how to continue it from its newest checkpoint, with the same
log_path. Lost the output? See “My run stopped. How do I resume it?” in the FAQ. - A dedicated trainer stops after 60 minutes without activity. If your process dies, the trainer keeps billing until then.
Start a new job
sft_loop.py and dpo_loop.py in the Fireworks cookbook. Each one runs the whole job from your data to a deployable model. For step-by-step guides, see Cookbook: SFT and Cookbook: DPO.[default] to let the agent choose it and show you its choice in the plan.
Run it with the Python API instead
Run it with the Python API instead
Config and run it. These examples train a LoRA adapter on serverless training, which needs no provisioning and bills per token. Every setting is a field on the recipe’s Config.serverless=Trueworks only on the serverless models. For any other base model, remove it to train on a dedicated trainer; see “Should I use Serverless or Dedicated Training?” in the FAQ.- Always set
lora_rank. The recipe default of0means full-parameter training, which needs a dedicated trainer. tokenizer_modelis the Hugging Face repo of the base model, such asQwen/Qwen3-8B. A mismatch corrupts training.- For a
gs://dataset, also setdataset_loading_mode="stream", installgoogle-cloud-storage, and sign in withgcloud auth application-default login. - For Weights & Biases charts, pass
wandb=WandBConfig(entity="<WANDB_ENTITY>")(fromtraining.utils) and setWANDB_API_KEY.
- The training loop runs in your Python process for the whole job, not on Fireworks. If the process stops, training stops. For long runs, use a machine that stays on, such as a cloud VM, and keep the output in a log file:
nohup python train.py > train.log 2>&1 &. - Watch the loss in the log, in Weights & Biases, or on the training dashboard. For SFT the loss should fall over the first epoch. For DPO,
dpo_lossstarts near 0.69 and should fall whileaccuracyrises. - If a serverless run stops, rerun it with the same
log_pathandinit_from_checkpoint="<ACCOUNT_ID>/<RUN_ID>/<CHECKPOINT>". “My run stopped. How do I resume it?” in the FAQ shows where to find each value. - On a dedicated trainer, reattach with
trainer=TrainerConfig(job_id="<TRAINER_JOB_ID>")while the trainer is still running, or start a new trainer from the checkpoint. A dedicated trainer stops after 60 minutes without activity, and keeps billing until then if your process dies.
Deploy the new model
The run promotes its final checkpoint toaccounts/<ACCOUNT_ID>/models/<NEW_MODEL_ID>. Deploy it from Models in the Fireworks app, or run:
What keeps working
For managed SFT, DPO and ORPO jobs created before November 9, 2026:- Jobs that are queued or running finish normally.
- You can get, list, cancel and delete them in the dashboard, with
firectl, and through the API. - You can export DPO job metrics (
firectl dpo-job export-metrics) and promote the checkpoints of existing jobs. - The models they produced stay in your account and deploy as before.
Troubleshooting
FAQ
Where do I find my job name and account ID?
Where do I find my job name and account ID?
accounts/<ACCOUNT_ID>/supervisedFineTuningJobs/<JOB_ID>.- Account ID: run
firectl whoami, which printsAccount ID: <ACCOUNT_ID>. - SFT job names: run
firectl sftj list. - DPO and ORPO job names: run
firectl dpoj list.
firectl sftj get <JOB_ID> or firectl dpoj get <JOB_ID>.How do I keep my API key safe with a coding agent?
How do I keep my API key safe with a coding agent?
- Never paste the key into the agent chat. Chat messages can be logged and sent to the agent’s model provider.
- The agent prompts on this page tell the agent the key is already set, and not to ask for it or print it.
- If you pasted a key into a chat by mistake, delete it in the dashboard and create a new one.
Should I use Serverless or Dedicated Training?
Should I use Serverless or Dedicated Training?
serverless=True works only on these base models. On any other model it fails with no eligible shared trainer found for base model:Train on a dedicated trainer instead. Remove serverless=True from the Config. The recipe then provisions a dedicated trainer on a validated training shape for the base model. Everything else in the examples stays the same:My managed job's base model isn't available. What should I train instead?
My managed job's base model isn't available. What should I train instead?
My run stopped. How do I resume it?
My run stopped. How do I resume it?
-
For runs longer than a few minutes, use a machine that stays on, such as a cloud VM. Run under
tmux, or withnohupand a log file, so the output survives a closed terminal: -
Save checkpoints regularly: set
dcp_save_interval=20, andcheckpoint_interval_minutes=30for LoRA SFT and DPO. The migration tool sets both. Without them, a stopped run has nothing to resume from.
dataloader.json inside the run’s log_path. The checkpoint names are its keys, newest last:- Serverless: find the run ID in the log line
Serverless training session <SESSION_ID>, run <RUN_ID>(for example,grep "Serverless training session" train.log). Rerun with the samelog_pathandinit_from_checkpoint="<ACCOUNT_ID>/<RUN_ID>/<CHECKPOINT>". - Dedicated, trainer still running: find the trainer job ID in the log (
Created trainer job: <TRAINER_JOB_ID>). Rerun with the samelog_pathandtrainer=TrainerConfig(job_id="<TRAINER_JOB_ID>")(fromtraining.utils). The trainer stops after 60 minutes without activity. - Dedicated, trainer gone: rerun with the same
log_pathandinit_from_checkpoint="<TRAINER_JOB_ID>:<CHECKPOINT>". This starts a new trainer from that checkpoint’s weights, and the dataset starts again from its first row. - Migration tool: pass the same
log_path, plusinit_from_checkpointortrainer_job_id, toMigrationInputs.
What happens to my evaluation settings?
What happens to my evaluation settings?
- Evaluation dataset. Pass your own copy:
evaluation_dataseton the recipeConfig, oreval_dataset_pathin the migration tool. The run reports evaluation loss on it. - Automatic carve-out.
eval_auto_carveout=Trueholds out part of the training data for evaluation: by default 10% of the rows, at most 20 examples. Change the size witheval_carve_ratioandmax_eval_seqs. The migration tool turns it on for jobs that used it. - ORPO has no held-out evaluation in the cookbook, so its evaluation settings are ignored.
accounts/<ACCOUNT_ID>/models/<NEW_MODEL_ID>. Evaluate that model on your own prompts before you move traffic, and compare it with your managed model. Evaluating Trained Models covers sampling serverless checkpoints, loading a promoted LoRA onto serverless, and preemptible deployments.The migration tool refused my job or warned me. What do I do?
The migration tool refused my job or warned me. What do I do?
Which managed job settings carry over?
Which managed job settings carry over?
dcp_save_interval=20, and checkpoint_interval_minutes=30 for LoRA SFT and DPO.Which managed job settings have no equivalent?
Which managed job settings have no equivalent?
- A token-based
batch_sizefrom older jobs. Recipes batch by rows; usebatch_size_samples→batch_size. lora_target_modules,lora_dropoutandtune_vision_encoder.- Datasets in Amazon S3 or Azure Blob Storage. Copy the data to a local file or to Cloud Storage first.
- Region, accelerator and training shape. You don’t set these; the recipe picks a validated training shape.