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 type | Operation | Phase | Example (Qwen3-8B) |
|---|---|---|---|
| Prefill | Process prompt tokens (parallel) | Before rollout | $0.13/M |
| Sample | Generate completion tokens (sequential) | Rollout | $0.40/M |
| Train | Forward-backward on completions | Policy 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-styleppoPPOcispoCISPOdroDROcross_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:
| Framework | Abstraction | Training | Inference | Algorithms | Key differentiator |
|---|---|---|---|---|---|
| Tinker | Managed API | Managed (multi-tenant) | Managed (vLLM-based) | importance_sampling (REINFORCE/GRPO), PPO, CISPO, DRO, cross_entropy, custom | Per-token pricing. You write reward functions, Tinker handles everything else. |
| SLiME | Framework | Megatron | SGLang | GRPO, on-policy distillation | Powers GLM-5/4.7. Async rollout with Megatron+SGLang. Production-proven at scale. |
| veRL | Framework | FSDP / Megatron-LM | vLLM / SGLang / HF | PPO, GRPO, RLOO, ReMax, DAPO, PRIME | Hybrid-controller model. 3D-HybridEngine eliminates memory redundancy. Up to 671B. |
| OpenRLHF | Framework | DeepSpeed | vLLM | PPO, GRPO, REINFORCE++, RLOO, DPO, KTO | Ray-based scheduling. Agent paradigm unifies single/multi-turn. 70B+ support. |
| PRIME-RL | Framework | FSDP2 | vLLM | GRPO | Async decentralized RL across 1000+ heterogeneous GPUs globally. Trained INTELLECT-2 (32B) across volunteer nodes. TOPLOC verifies rollouts; Shardcast broadcasts weights. |
| SkyRL-Agent | Framework | FSDP | vLLM | GRPO | Multi-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. |
| rLLM | Framework | veRL / Tinker | Any OpenAI-compatible | GRPO, REINFORCE, RLOO, rejection sampling | Agentic-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. |
| torchforge | Framework | TorchTitan | vLLM | GRPO, PPO, SFT | PyTorch-native (Meta). Monarch actor-based distributed coordination, TorchStore weight sync. 96% goodput at 512 H100s. Experimental (v0.1, Oct 2025). |
| Unsloth | Library | Custom Triton kernels | Built-in (custom) | GRPO, GSPO, DrGRPO, DAPO | 2x faster, 70% less VRAM. Runs GRPO on consumer GPUs (5GB). FP8 support. |
| TRL | Library | HF Transformers + Accelerate | HF generate / vLLM | PPO, DPO, GRPO, KTO, ORPO, CPO | HuggingFace 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.
| Dimension | TRL / Unsloth | veRL | OpenRLHF | SLiME | PRIME-RL | torchforge |
|---|---|---|---|---|---|---|
| Interface | Python API | Python + YAML | CLI scripts | Bash + plugins | TOML + processes | YAML + actors |
| Lines to start | ~8 | ~15 CLI args | ~30 CLI args | ~50 bash vars | TOML + 4 processes | YAML + 2 GPUs min |
| Reward definition | Python fn → float[] | RewardManager | RM / HTTP / fn path | Async fn on Sample | Rubric + verifiers | Pluggable / Weaver |
| Multi-turn | Via tools API | Custom workers | agent_func_path | First-class (loss_mask) | verifiers envs | OpenEnv / actors |
| Proven scale | ~8 GPUs | 100s GPUs | 70B+ models | 355B MoE | 1000+ GPUs | 512 H100s |
| Best for | Prototyping | Algorithm research | Production pipelines | Large MoE models | Distributed async | PyTorch-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
You manage:
Reward functions, data, hyperparameters
They manage:
GPUs, inference engine, scheduling, parallelism, LoRA serving, fault tolerance
You manage:
GPU cluster, config, data pipeline, reward impl, monitoring
They manage:
Distributed RL loop, engine integration, memory optimization
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.
| Service | True RLVR | Pricing | Models | Custom reward fn | Hyperparameter control | Training loop access |
|---|---|---|---|---|---|---|
| Tinker | RLVR ✓ | Per token (prefill / sample / train) | Qwen3, GPT-OSS, DeepSeek, Llama, Kimi K2 | Full Python — you score outputs, return a float, done | Full: group_size, batch_size, lr, LoRA rank, algorithm, KL beta, custom loss | Full — you write the training loop using four primitives |
| OpenAI RFT | RLVR ✓ | ~$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 API | Low: n_epochs, batch_size, reasoning_effort, compute_multiplier, seed (~6 params) | None — black box. Algorithm name not disclosed. |
| Fireworks RFT | RLVR ✓ | 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 injection | Standard: ~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 AI | SFT/DPO only | Per token: $0.48–$7.25/M (SFT/DPO only) | Most major OSS models incl. Llama 4, Qwen3, DeepSeek, Gemma-3, Kimi K2 | None — 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.