tinker-nomics

Abstraction Design

Per-token pricing, four primitives, and why the right abstraction layer changes the economics.

The four primitives

Tinker exposes four API operations — enough algorithmic control for most RL workflows, with the infrastructure complexity abstracted away:

sample()

Generate rollout completions from the current policy. Autoregressive decoding, memory-bandwidth-bound.

Billed as Sample tokens

forward_backward()

Compute loss and gradients on a batch of (prompt, completion, reward) tuples. Compute-bound.

Billed as Train tokens

optim_step()

Update LoRA weights using accumulated gradients. Only touches small adapter matrices — doesn't need base model.

Minimal cost

save_state()

Checkpoint LoRA adapter weights. Small files (10-100MB), sub-second operations.

Storage cost

These four operations map directly to RLVR's three phases. sample() handles rollout generation, forward_backward() handles the policy gradient update, and optim_step() applies the update to LoRA weights. Reward scoring (Phase 2) happens in your own code — for RLVR it's just checking math correctness or running unit tests.

Per-token pricing makes cost transparent

Three token types, three prices:

Token typeOperationPhaseExample (Qwen3-8B)
PrefillProcess prompt tokens (parallel)Before rollout$0.13/M
SampleGenerate completion tokens (sequential)Rollout$0.40/M
TrainForward-backward on completionsPolicy update$0.40/M

This separation is powerful: you can see exactly how much you're spending on rollout vs training. On GPU-hours, those costs are entangled in a single bill where idle time during phase transitions is invisible overhead.

What the abstraction absorbs

Behind these four API calls, Tinker handles an enormous amount of infrastructure complexity that you'd otherwise build yourself:

  • Inference engine — vLLM/SGLang-style continuous batching, prefix caching, KV cache management
  • Multi-GPU parallelism — FSDP, tensor parallelism, expert parallelism for MoE models
  • LoRA adapter management — loading, swapping, batching across users via SGMV kernels
  • Async RL scheduling — overlapping rollout with training via configurable off-policy tolerance
  • Hardware optimization — FP4/FP8 quantization, speculative decoding, hardware-specific tuning

Setting this up from scratch takes 2-4 weeks of ML engineering time. At $75/hr, that's ~$6,000 before you generate a single training token. If you expect to run many training iterations, you can amortize this setup cost — but ongoing maintenance (keeping up with framework changes, debugging distributed training issues, tuning for new model sizes) means the engineering overhead never fully goes to zero. This is the hidden cost that makes Tinker competitive even when its per-token price exceeds raw GPU-hour costs.

Built-in loss functions

Tinker provides several loss functions out of the box, plus a custom loss interface for arbitrary differentiable objectives:

importance_samplingREINFORCE / GRPO-style
ppoPPO
cispoCISPO
droDRO
cross_entropyCross-entropy (SL)
forward_backward_customCustom (any differentiable)

GRPO is not a separate loss function — it's importance_sampling (or ppo) with group rollouts and per-group advantage normalization in your own code. The Tinker cookbook training scripts do exactly this.

RL framework landscape

Your choice of framework determines the abstraction level and what you manage yourself:

FrameworkAbstractionTrainingInferenceAlgorithmsKey differentiator
TinkerManaged APIManaged (multi-tenant)Managed (vLLM-based)importance_sampling (REINFORCE/GRPO), PPO, CISPO, DRO, cross_entropy, customPer-token pricing. You write reward functions, Tinker handles everything else.
SLiMEFrameworkMegatronSGLangGRPO, on-policy distillationPowers GLM-5/4.7. Async rollout with Megatron+SGLang. Production-proven at scale.
veRLFrameworkFSDP / Megatron-LMvLLM / SGLang / HFPPO, GRPO, RLOO, ReMax, DAPO, PRIMEHybrid-controller model. 3D-HybridEngine eliminates memory redundancy. Up to 671B.
OpenRLHFFrameworkDeepSpeedvLLMPPO, GRPO, REINFORCE++, RLOO, DPO, KTORay-based scheduling. Agent paradigm unifies single/multi-turn. 70B+ support.
PRIME-RLFrameworkFSDP2vLLMGRPOAsync decentralized RL across 1000+ heterogeneous GPUs globally. Trained INTELLECT-2 (32B) across volunteer nodes. TOPLOC verifies rollouts; Shardcast broadcasts weights.
SkyRL-AgentFrameworkFSDPvLLMGRPOMulti-turn, long-horizon agent RL building on DeepSWE's approach. Async dispatcher gives 1.55x speedup. SA-SWE-32B: 39.4% SWE-Bench Verified (from 24.4% baseline) with 2x cost reduction.
rLLMFrameworkveRL / TinkerAny OpenAI-compatibleGRPO, REINFORCE, RLOO, rejection samplingAgentic-first: wrap any agent framework (LangGraph, SmolAgent, Strands, OpenAI Agents SDK) with @rllm.rollout decorator. Auto-traces LLM calls. 50+ built-in benchmarks. 4B beats 235B on finance tasks.
torchforgeFrameworkTorchTitanvLLMGRPO, PPO, SFTPyTorch-native (Meta). Monarch actor-based distributed coordination, TorchStore weight sync. 96% goodput at 512 H100s. Experimental (v0.1, Oct 2025).
UnslothLibraryCustom Triton kernelsBuilt-in (custom)GRPO, GSPO, DrGRPO, DAPO2x faster, 70% less VRAM. Runs GRPO on consumer GPUs (5GB). FP8 support.
TRLLibraryHF Transformers + AccelerateHF generate / vLLMPPO, DPO, GRPO, KTO, ORPO, CPOHuggingFace ecosystem. Easiest on-ramp. Large community. Reference implementations.

How they actually feel to use

Feature tables hide the real difference: what does the code look like? Click a framework to see the programming model.

DimensionTRL / UnslothveRLOpenRLHFSLiMEPRIME-RLtorchforge
InterfacePython APIPython + YAMLCLI scriptsBash + pluginsTOML + processesYAML + actors
Lines to start~8~15 CLI args~30 CLI args~50 bash varsTOML + 4 processesYAML + 2 GPUs min
Reward definitionPython fn → float[]RewardManagerRM / HTTP / fn pathAsync fn on SampleRubric + verifiersPluggable / Weaver
Multi-turnVia tools APICustom workersagent_func_pathFirst-class (loss_mask)verifiers envsOpenEnv / actors
Proven scale~8 GPUs100s GPUs70B+ models355B MoE1000+ GPUs512 H100s
Best forPrototypingAlgorithm researchProduction pipelinesLarge MoE modelsDistributed asyncPyTorch-native scale

The trade-off across all of these is the same: ease of use vs. control at scale. TRL gets you running in 8 lines but won't scale past a few GPUs. PRIME-RL scales to 1000+ heterogeneous GPUs across datacenters but requires operating 4 independent processes. Tinker's bet is that a managed API can give you TRL-level simplicity with PRIME-RL-level scale — you write reward functions, Tinker handles the distributed infrastructure.

The abstraction spectrum

Managed APITinker, OpenAI RFT

You manage:

Reward functions, data, hyperparameters

They manage:

GPUs, inference engine, scheduling, parallelism, LoRA serving, fault tolerance

FrameworkSLiME, veRL, OpenRLHF

You manage:

GPU cluster, config, data pipeline, reward impl, monitoring

They manage:

Distributed RL loop, engine integration, memory optimization

LibraryUnsloth, TRL

You manage:

Everything above + distributed setup, inference engine choice

They manage:

Algorithm implementations, training loop, kernel optimizations

The trade-off is control vs. operational burden. Frameworks like veRL and SLiME give you full control over the RL loop but require managing GPU clusters, tuning parallelism, and debugging distributed failures. Managed APIs abstract all of that away at the cost of less flexibility.

GPU-hours hide the real cost

Self-hosted RLVR is billed in GPU-hours — a unit that tells you almost nothing about what you're paying for. Your 8xH100 node spends 80-90% of its time doing inference (rollout generation), but you're paying training-tier prices for what is fundamentally an inference workload. Phase transitions waste cycles. Synchronization barriers waste cycles. The hourly bill doesn't distinguish any of this.

Tinker's bet: per-token pricing is the right abstraction for post-training, just as it was for inference. You stop paying for idle time. Cost becomes deterministic and proportional to actual work.

An important nuance: Tinker is fundamentally a general-purpose trainer and sampler, not an RL framework. It trades peak efficiency for generality. The four primitives (sample, forward_backward, optim_step, save_state) are building blocks for any ML training loop — the RL loop (rollout → reward → update) is a higher-level program you write on top of these primitives. This is by design: Tinker targets “PyTorch users” who think in terms of forward passes and gradient steps, rather than RL-specific concepts. The tradeoff is that a purpose-built RL system (like veRL or SLiME with tight Megatron integration) can achieve higher hardware utilization for specific RL workloads.

Managed RFT APIs: what you actually control

As of early 2026, only three managed services offer true RLVR (online RL with verifiable rewards). They differ significantly in pricing model, algorithm transparency, and how much control you retain.

ServiceTrue RLVRPricingModelsCustom reward fnHyperparameter controlTraining loop access
TinkerRLVR ✓Per token (prefill / sample / train)Qwen3, GPT-OSS, DeepSeek, Llama, Kimi K2Full Python — you score outputs, return a float, doneFull: group_size, batch_size, lr, LoRA rank, algorithm, KL beta, custom lossFull — you write the training loop using four primitives
OpenAI RFTRLVR ✓~$100/hr wall-clock (o4-mini)o-series reasoning models only (o4-mini, o3-mini, o1-mini)Python grader or JSON string_check + LLM-as-judge; validated via APILow: n_epochs, batch_size, reasoning_effort, compute_multiplier, seed (~6 params)None — black box. Algorithm name not disclosed.
Fireworks RFTRLVR ✓GPU-hour: $2.90 (A100) – $9.00/hr (B200). Free for models under 16B.Most major OSS models: Llama, Qwen, DeepSeek, Kimi K2 (MoE support)Arbitrary Python evaluator (0–1 float); reward-kit OSS tool; secrets injectionStandard: ~10 params (n, lr, LoRA rank, temperature). Training SDK: full control incl. kl_beta, custom loss (GRPO/DAPO/CISPO/GSPO)Standard: managed. Training SDK: custom PyTorch loss, any objective.
Together AISFT/DPO onlyPer token: $0.48–$7.25/M (SFT/DPO only)Most major OSS models incl. Llama 4, Qwen3, DeepSeek, Gemma-3, Kimi K2None — DPO uses offline preference pairs (chosen/rejected)~10 params: lr, batch_size, epochs, LoRA rank, DPO beta variants (SimPO, RPO)None — SFT/DPO only, no online RL

Key distinctions

  • Data upload vs. reward function: Together AI (and most SFT APIs) ask you to upload labeled data — the model learns from examples. RLVR asks for a reward function — the model learns by trying, failing, and improving. These are fundamentally different. A reward function can encode rules that are hard or impossible to demonstrate with data.
  • OpenAI RFT is the only other managed RLVR API, but it's locked to o-series: You can't run RLVR on open-weight models. You can't see the algorithm. You can't control group_size, KL penalty, or clip range. At $100/hr you're paying for convenience on a closed model.
  • Fireworks Training SDK is the closest open competitor: Arbitrary Python loss functions, full hyperparameter access, GRPO/DAPO/CISPO/GSPO variants — but billed per GPU-hour, so your cost depends on cluster utilization, not just tokens processed.
  • Tinker's unique position: The only service that gives you full training loop control (you write the RL loop using four primitives), arbitrary reward functions, and per-token pricing across frontier open-weight models including 400B+ MoE. No black box.