From fireworks-training
Trains and fine-tunes models on Fireworks via firectl CLI and Training API. Covers SFT, DPO, ORPO, RFT, dataset prep, deployment, 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/renderer-verification.mdreferences/renderer.mdreferences/rl-async.mdreferences/rl-concurrency.mdreferences/rl-custom-loss.mdreferences/rl-dynamic-filter.mdreferences/rl-gradient-accumulation.mdreferences/rl-hotload.mdreferences/rl-loss-paths.mdreferences/rl-sampling-timeouts.mdreferences/run-state-and-reporting.mdreferences/sdk-checkpoints.mdreferences/sdk-distillation.mdreferences/sdk-examples.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.
When a higher-priority source is unreachable (locked-down network, docs or pricing site blocked, GitHub blocked), do not fall back to hardcoded values — degrade explicitly:
firectl catalog reads
(model get, training-shape list) and a --dry-run -o json to resolve
shapes and defaults; label anything still unresolved as unknown.The skill attributes Fireworks API calls to an observable skill run by sending
two bounded request headers: fireworks-training-skill/2.0.0 as the client
source and one random UUID as the run session. Fireworks uses these identifiers
with its existing authenticated API event and training-job records to measure
aggregate adoption and job outcomes. This instrumentation adds no prompts,
datasets, local paths, environment dumps, or raw errors, and it does not write a
telemetry file or send a standalone beacon. Qualitative issue collection is not
implemented.
The UUID is random attribution metadata, not a credential. Record it in the private run manifest and include it only in Fireworks API calls or the exact one-time manual handoff command; that command may remain in local shell history. Do not print it in the final report or copy it into datasets, shared feedback, or escalation messages. Run manifests must not contain keys, raw environment dumps, or secret-bearing output. Share feedback or manifests only when the user explicitly chooses to do so.
If a user pastes a secret (API key, token) into the conversation, do not repeat it back, treat the transcript itself as an exposure, and advise the user to rotate or revoke that key and re-issue a scoped service-account key.
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.--dry-run form of a mutating command (it is
classified as mutating). The confirmation-gate step "resolve config via
--dry-run -o json" must therefore also be run by the user, not the agent;
ask them to paste the dry-run output.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/rl-loss-paths.md |
| Async or agentic RL | Not applicable | training/recipes/async_rl_loop.py | references/rl-async.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 |
| Custom RL loss or research algorithm | Not applicable | Fork the closest maintained RL recipe and replace its documented loss call | references/rl-custom-loss.md |
| New or changed renderer | Not applicable | training/renderer/ | references/renderer.md, references/renderer-verification.md |
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.
At the start of each skill run, generate exactly one random UUID and keep it for the entire run, including retries, resumes, monitoring, and any blocked manual terminal handoff:
export FIREWORKS_SESSION_ID="$(python -c 'import uuid; print(uuid.uuid4())')"
export FIREWORKS_CLIENT_SOURCE="fireworks-training-skill/2.0.0"
Record the UUID only as skill_session_id in the private run manifest. Record
the source as skill_client_source. Do not create a separate telemetry file.
Preserve both values on every Fireworks interaction:
firectl inherits both environment variables.X-Fireworks-Client-Source and
X-Fireworks-Session-Id to the same values.If a client does not support these headers, continue the run without a beacon or
other fallback. Never use PURPOSE_PILOT; it controls scheduling semantics.
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/rl-loss-paths.md, references/rl-custom-loss.md, references/rl-gradient-accumulation.md |
| Async RL, concurrency, and filtering | references/rl-async.md, references/rl-concurrency.md, references/rl-dynamic-filter.md |
| Hotload and sampler failures | references/rl-hotload.md, references/rl-sampling-timeouts.md |
| Renderer implementation and training-token invariants | references/renderer.md |
| Renderer parity, live probes, and verifier UI | references/renderer-verification.md |
npx claudepluginhub fw-ai/cookbookFine-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.
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.