From fireworks-training
Fine-tunes and trains models on Fireworks using managed SFT/DPO/ORPO/RFT and custom Training API loops. Covers dataset preparation, cost confirmation, monitoring, deployment, resume, and troubleshooting.
How this skill is triggered — by the user, by Claude, or both
Slash command
/fireworks-training:fireworks-trainingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This is the single Fireworks training skill. The coding agent is the thin
references/choose-method.mdreferences/deploy-and-troubleshoot.mdreferences/error-reference.mdreferences/getting-started.mdreferences/models-shapes-and-cost.mdreferences/preference-data-and-evaluators.mdreferences/run-state-and-reporting.mdreferences/sdk/checkpoints.mdreferences/sdk/distillation.mdreferences/sdk/examples.mdreferences/sdk/migrate.mdreferences/sdk/recipes.mdreferences/sdk/rl/async-rl.mdreferences/sdk/rl/concurrency.mdreferences/sdk/rl/custom-loss.mdreferences/sdk/rl/dynamic-filter.mdreferences/sdk/rl/gradient-accumulation.mdreferences/sdk/rl/hotload.mdreferences/sdk/rl/loss-paths.mdreferences/sdk/rl/sampling-timeouts.mdThis is the single Fireworks training skill. The coding agent is the thin harness. This skill owns planning and orchestration, and the cookbook provides the executable recipes and tested runtime.
Use the most current source for each kind of fact:
firectl ... --help for available managed CLI commands and
flags..md URL.Never copy a volatile catalog or price into an answer when it can be read live. Record the docs URLs, cookbook commit, SDK version, and CLI version used in the run manifest and final report.
The public skill does not write or transmit usage telemetry and does not automatically collect issues. Run manifests are customer-private local files and must not contain keys, raw environment dumps, or secret-bearing output. Share feedback or manifests only when the user explicitly chooses to do so; no telemetry opt-out is required because collection is off.
The standalone skill package does not vendor the cookbook. For Training API work, clone the current public cookbook, record its commit, and pin that checkout for the run before opening a recipe:
git clone https://github.com/fw-ai/cookbook
cd cookbook
git rev-parse HEAD
pip install -e ./training
Read the SDK constraint from training/pyproject.toml. Install the cookbook
package rather than upgrading the SDK outside that constraint. Record the
actual commit and installed SDK version in the run manifest.
First choose the training workflow. Then, only for Training API work, choose the infrastructure.
| Need | Choose | Why |
|---|---|---|
| Standard SFT, DPO, ORPO, or RFT with supported configuration | Managed training | Declarative job, platform-managed lifecycle, least code |
| Custom loss, reward, rollout, trajectory, per-step logic, distillation, or research loop | Training API | Python control over the loop |
For Training API:
| Infrastructure | Use when | Key constraint |
|---|---|---|
| Serverless training | Fast LoRA SFT or RL experiments on supported models, shared pooled compute, per-token billing | Private preview, LoRA only, supported model set, no dedicated trainer/deployment lifecycle |
| Dedicated training | Full-parameter work, DPO, larger or unsupported serverless models, provisioned run resources, sustained high utilization, explicit checkpoint/resume/deployment control | Provisions trainer and deployment resources billed by time, subject to quota and availability |
The coding agent, UI, CLI, REST API, and Python SDK are interaction surfaces, not separate training products. The coding agent can drive managed, serverless, or dedicated workflows.
Live docs:
Before any dataset upload, evaluator registration, paid inference, trainer or job creation, checkpoint promotion, deployment, or other mutation:
--help;--dry-run -o json form when
supported;.md docs;Do not skip this gate because the run is small or because the user supplied some parameters. A prior “run it” counts only when it approved the same complete resolved plan. Any change to method, model, parameters, sweep breadth, or cost ceiling requires renewed confirmation. Promotion and deployment each require a separate confirmation.
Treat these as independent approval stages when present: paid pair generation or evaluation, evaluator registration, dataset upload plus training, expanded sweep breadth, promotion, and deployment. Approval for one stage does not authorize a later stage.
Read-only commands such as whoami, get, list, quota, catalog reads,
local parsing, and offline evaluator tests do not require confirmation.
firectl can block mutating commands when it detects Claude Code, Cursor,
Codex, or another AI-agent environment. This is a platform safety control, not
an authentication error.
firectl returns BLOCKED: mutating command ...,
surface the exact reconstructed command and ask the user to run it manually
in their terminal.get, list,
monitoring, evaluation, and reporting.This handoff is identical across Claude Code, Cursor, and Codex.
| Task | Managed path | Cookbook implementation | Read |
|---|---|---|---|
| Managed SFT | firectl sftj | Not applicable | references/choose-method.md |
| Managed DPO | firectl dpo-job create --loss-method DPO | Not applicable | references/choose-method.md |
| Managed ORPO | firectl dpo-job create --loss-method ORPO | Not applicable | references/choose-method.md |
| Managed RFT | firectl rftj create --evaluator <resource> | Not applicable | references/preference-data-and-evaluators.md, references/training-api.md |
| Training API SFT | Not applicable | training/recipes/sft_loop.py | references/sdk/recipes.md |
| Training API DPO | Not applicable | training/recipes/dpo_loop.py | references/sdk/recipes.md |
| Training API ORPO | Not applicable | training/recipes/orpo_loop.py | references/sdk/recipes.md |
| Training API RL | Not applicable | training/recipes/rl_loop.py | references/training-api.md, references/sdk/rl/loss-paths.md |
| Async or agentic RL | Not applicable | training/recipes/async_rl_loop.py | references/sdk/rl/async-rl.md |
| IGPO | Not applicable | training/recipes/igpo_loop.py | references/sdk/recipes.md |
| Distillation | Not applicable | training/recipes/distillation_loop.py | references/sdk/distillation.md |
| Serverless RL example | Not applicable | training/examples/serverless_rl/ | Live serverless docs |
Cookbook first. Inspect and fork the closest maintained recipe before writing a loop. Change the loss, reward, rollout, data, or config needed by the task. Do not reimplement trainer provisioning, weight sync, checkpoint, deployment, reconnect, or cleanup plumbing.
Confirm:
firectl version, firectl whoami, quota, billing readiness, and account;fireworks-ai[training] version satisfies
training/pyproject.toml for Training API work;Do not upload during preflight.
Use the mandatory gate above. Persist the approved plan and exact approval quote
in fireworks-training-runs/<run-id>/run.md. Read
references/run-state-and-reporting.md.
For managed jobs, upload the validated dataset and run only the selected method:
# SFT
firectl sftj create --job-id <run-id> \
--base-model accounts/fireworks/models/<model> \
--dataset <dataset-id> --output-model <output-model-id>
# DPO or ORPO
firectl dpo-job create --job-id <run-id> \
--loss-method <DPO-or-ORPO> \
--base-model accounts/fireworks/models/<model> \
--dataset <dataset-id> --output-model <output-model-id>
# Managed RFT
firectl rftj create --job-id <run-id> \
--base-model accounts/fireworks/models/<model> \
--dataset <dataset-id> --evaluator accounts/<acct>/evaluators/<id> \
--output-model <output-model-id>
Before launch, read the selected command's --help; the installed CLI is the
command contract.
If the approved create command is blocked by the agent guard, present it
verbatim for manual terminal execution and wait. Do not substitute another
mutation path. Resume with a read-only get on the stable ID.
For Training API work, record the cookbook commit and fork the routed recipe. Use the serverless endpoint only when the serverless choice criteria pass. Otherwise use dedicated provisioning through the recipe and SDK-managed service.
If a create response is lost or returns AlreadyExists, query the planned ID
and reuse only an exact config match. Never create a replacement ID before
reconciliation.
| Method | State | Progress |
|---|---|---|
| Managed SFT | firectl sftj get <id> -o json | Job fields and linked W&B when enabled |
| Managed DPO / ORPO | firectl dpo-job get <id> -o json | dpo-job export-metrics and linked W&B |
| Managed RFT | firectl rftj get <id> -o json | Job, evaluator, rollout, and linked W&B signals |
| Training API serverless | Session/run IDs and recipe metrics | Forward/backward, optimizer, reward, and snapshot progress |
| Training API dedicated | RLOR trainer, deployment, checkpoints, and recipe metrics | Steps, rollouts, snapshots, W&B, and runner artifacts |
State alone is not progress. Put a numeric no-progress timeout in the approved
plan: default to 10 minutes for a small smoke run unless live docs or the
selected shape justify a different startup window. On timeout, gather evidence
before classifying. Do not launch a replacement until the old job is cancelled
or terminal, its final state is confirmed, and the user approves replacement
spend. Use references/error-reference.md; do not poll indefinitely.
Compare base and tuned behavior on the same held-out set. Use the reviewed evaluator or rubric and record failures. For sweeps, show the candidate scoreboard and receive promotion confirmation before the full-data run or checkpoint promotion.
Deployment has its own approval. Fine-tuned LoRA serving uses an on-demand deployment; do not claim that a user's adapter is available through serverless per-token inference.
firectl deployment create accounts/<acct>/models/<output-model-id> \
--deployment-id <run-id>-deploy \
--deployment-shape accounts/fireworks/deploymentShapes/<resolved-shape>
READY is not serving proof. Send one real request and require a successful,
sensible response.
Delete or scale to zero all billable trainers and deployments according to the
approved plan. Read final resource state. Produce the report contract in
references/run-state-and-reporting.md.
Read only what the task requires:
| Need | Reference |
|---|---|
| Installation, auth, quota, first job | references/getting-started.md |
| Method choice, schemas, classification, LoRA/full parameter | references/choose-method.md |
| Preference generation and evaluator authoring | references/preference-data-and-evaluators.md |
| Managed versus Training API RFT | references/training-api.md |
| Models, contexts, shapes, and costs | references/models-shapes-and-cost.md |
| Deployment, evaluation, and teardown | references/deploy-and-troubleshoot.md |
| Failure classification and escalation | references/error-reference.md |
| Resume, idempotency, progress, and final report | references/run-state-and-reporting.md |
| Cookbook setup and examples | references/sdk/setup.md, references/sdk/examples.md |
| Cookbook recipes | references/sdk/recipes.md |
| Training API shapes and migration | references/sdk/shapes.md, references/sdk/migrate.md |
| Checkpoints and tools | references/sdk/checkpoints.md, references/sdk/tools.md |
| Distillation | references/sdk/distillation.md |
| RL built-in/client losses and normalization | references/sdk/rl/loss-paths.md, references/sdk/rl/custom-loss.md, references/sdk/rl/gradient-accumulation.md |
| Async RL, concurrency, and filtering | references/sdk/rl/async-rl.md, references/sdk/rl/concurrency.md, references/sdk/rl/dynamic-filter.md |
| Hotload and sampler failures | references/sdk/rl/hotload.md, references/sdk/rl/sampling-timeouts.md |
npx claudepluginhub fw-ai/cookbook --plugin fireworks-trainingTrains and fine-tunes models on Fireworks via firectl CLI and Training API. Covers SFT, DPO, ORPO, RFT, dataset prep, deployment, and troubleshooting.
Conducts post-training LLM research via the Tinker API — replicate papers, run experiments (SFT, RL, DPO, distillation), monitor metrics, and document findings.
Trains or fine-tunes LLMs/VLMs on Hugging Face cloud GPUs using TRL (SFT, DPO, GRPO, reward modeling) or Unsloth, with GGUF conversion for local deployment. No local GPU setup needed.