Overview
tinker backend features:- Async-First Design: Native async/await support throughout the training pipeline
- Unified Architecture: Single codebase for agent and workflow training
- Service-Based: Uses tinker service for model serving and training
- Simplified API: Cleaner configuration and easier setup
Python Version: Requires Python >= 3.11 for tinker backend
Installation
Install rLLM with the tinker backend:Dependencies
The tinker backend includes (frompyproject.toml):
Basic Usage
Agent Training
Train a math agent with tinker backend. The recommended path is to use thecookbooks/math cookbook,
which already wires an AgentFlow + Evaluator against the unified trainer:
train.py
Workflow Training
For legacyWorkflow-based training on tinker, use the unified trainer
(rllm.trainer.unified_trainer.AgentTrainer) — the old
rllm.trainer.AgentTrainer(backend="tinker") path has been removed.
See cookbooks/workflow/solver_judge/
for a runnable example:
train_workflow_tinker.py
Configuration
The tinker backend usestinker_rl_trainer.yaml configuration:
Model Configuration
string
default:"Qwen/Qwen3-8B"
Model path (HuggingFace or local)
integer
default:"32"
LoRA rank (parameter-efficient fine-tuning)
boolean
default:"true"
Train LoRA on output embedding layer
boolean
default:"true"
Train LoRA on attention layers
boolean
default:"true"
Train LoRA on MLP layers
Training Configuration
integer
default:"16"
Number of rollouts per prompt (for GRPO)
integer
default:"1"
Number of rollouts per validation prompt
float
default:"2e-5"
Learning rate for optimizer
integer
default:"32768"
Maximum sequence length (prompt + response)
integer
default:"1"
Number of minibatches per update (currently only 1 is fully tested)
Algorithm Configuration
string
default:"grpo"
Advantage estimator: “grpo”, “reinforce”, or “distill”
float
default:"1.0"
Discount factor for rewards
string
default:"trajectory"
Grouping level: “trajectory” or “step”
boolean
default:"false"
Normalize advantages by standard deviation in GRPO
Data Configuration
integer
default:"64"
Training batch size
integer
default:"32"
Validation batch size
integer
default:"2048"
Maximum prompt length in tokens
integer
default:"2048"
Maximum response length in tokens
Trainer Configuration
integer
default:"10"
Number of training epochs
integer
default:"5"
Validation frequency (in steps)
integer
default:"20"
Checkpoint save frequency (in steps)
string
default:"/tmp/rllm-tinker-checkpoints"
Checkpoint directory
LoRA Training
tinker backend has native LoRA support built-in:Tinker Service
Local Service
By default, tinker backend uses a local service:Remote Service
Connect to a remote tinker service:Sampling Configuration
Configure sampling parameters:float
default:"1.0"
Sampling temperature
float
default:"1.0"
Top-p (nucleus) sampling parameter
Rollout Engine Configuration
string
default:"medium"
Reasoning effort level: “low”, “medium”, “high”
boolean
default:"false"
Accumulate reasoning tokens across steps
boolean
default:"false"
Disable thinking tokens in responses
boolean
default:"false"
Bypass renderer and use parser directly
Checkpointing
tinker backend provides flexible checkpointing:Automatic Checkpointing
Resume from Checkpoint
Resume from a tinker checkpoint:Manual Checkpoint Loading
Distillation Support
tinker backend supports knowledge distillation from teacher models:Advanced Features
Fused Forward-Backward and Optimizer Step
For better performance, tinker can fuse forward-backward pass with optimizer step:This optimization reduces overhead by combining gradient computation and parameter updates into a single operation.
Multi-Step Agents
For multi-turn agent interactions:Workflow Parallel Tasks
Control parallelism in workflow execution:Monitoring
Configure logging backends:Example Configuration
Complete configuration for MATH dataset training:config.yaml
Performance Optimization
Increase Batch Size
Tune
data.train_batch_size and training.group_size for better GPU utilizationUse LoRA
Enable LoRA for faster training and lower memory usage
Fuse Operations
Set
fuse_forward_backward_and_optim_step=true for reduced overheadParallel Workflows
Increase
workflow.n_parallel_tasks for workflow-based trainingTroubleshooting
Python Version Error
Python Version Error
tinker requires Python >= 3.11. Upgrade your Python version:
Sampling Parameter Warning
Sampling Parameter Warning
If you see warnings about Setting these away from 1.0 can cause logprob issues.
temperature or top_p:Minibatch Warning
Minibatch Warning
Currently only
num_minibatches=1 is fully tested:Checkpoint Not Found
Checkpoint Not Found
Ensure the checkpoint directory exists:
Tinker Service Connection Failed
Tinker Service Connection Failed
If using remote service, verify the URL:
Comparison with verl
Key differences from verl backend:
See Backend Comparison for detailed feature comparison.
See Also
verl Backend
Distributed training with verl
Backend Comparison
Compare tinker vs verl features
tinker Cookbook
Official tinker cookbook repository
Agent Trainer
Learn about AgentTrainer API

