Skip to main content
Fireworks supports the familiar forward, forward_backward, forward_backward_custom, and optim_step training pattern. You can keep your dataset logic, rewards, and algorithm while adapting client setup, data types, sampling, and checkpoints. The Fireworks SDK is independent of the Tinker SDK. Migration requires more than changing an API key or endpoint: the two SDKs have different Python classes and some different interfaces and behavior.
Use a coding agent to migrate your loop. The cookbook’s Tinker migration skill contains the detailed API mappings, data conversion guidance, compatibility limitations, and validation workflow.Install it alongside the shared training references:
Then ask your agent: “Migrate this Tinker training loop to Fireworks, preserving its objective and token masks.”

Choose your training infrastructure

Check the model catalog for the exact model and training mode you need. For long RL rollouts, compare the full iteration cost, including trainer idle time and weight publication.

What changes

Most changes happen around the training loop: how you connect, build data objects, and make updated weights available for sampling. Your objective, rewards, and backward/optimizer sequence can stay the same. Newer Tinker features and arguments may need additional changes. The migration skill covers these differences, including sparse tensors, sequence metadata, exception handling, concurrency, and resource lifecycle.

Migration in pseudocode

This serverless sketch shows the main substitutions. build_fireworks_batch represents your own data conversion, returning native SDK datums with the same targets and masks as your Tinker loop. The model, tokenizer, examples, and optimizer settings come from your application.
For dedicated training, client setup also provisions or attaches to a trainer and, for sampling, a rollout deployment. Follow the dedicated setup guide for that resource lifecycle.

Validate before scaling up

Start with a small batch and one optimizer update. Check the loss inputs, returned metrics, sampler publication, checkpoint restore, and cleanup before running your full experiment. Interface compatibility does not establish numerical parity between providers.
Some older models may not support per-token logprobs for cross_entropy backward calls. Contact us if you need this feature.

Next steps