Requirements
- Gateway. An 8-GPU node running the Miles Tinker gateway: 4 training and 4 sampling GPUs. The reference configuration serves Qwen3.6-35B-A3B on H200 with a 65536-token window (see Setup).
- Client. Python 3.12 or newer on the machine that runs the recipe.
- Sandboxes. An E2B account and API key; see Sandbox Providers. The sandboxes must be able to reach the client machine, which hosts the proxy.
Setup
1. Start the gateway
Download the checkpoint and serve it with the gateway launcher, overriding the model, LoRA layout and context window:--tinker-base-modelis the model name clients pass asconfig.model_name.--target-modules attn,mlp,unembedmatches the cookbook client’s default LoRA layout, which trains the output head (train_unembed=True). The client’s LoRA rank (16) must not exceed--lora-rank.--max-tokens-per-gpu 65536and--sglang-context-length 65536set the trainer and inference limits; with context-parallel size 1, the sampling window is 65529 tokens. See Context window. Tensor parallelism does not raise the per-sequence limit.- The gateway serves on port
10613.
2. Install the client
From a Miles checkout:harbor extra pins the tested Harbor revision; harbor[e2b] adds the E2B provider at the
same revision.
3. Download the dataset
TB2_TASKS_DIR that contains a task.toml, in sorted
order. Each task keeps its instruction, environment and verifier.
4. Write the trial configuration
trial.json is a Harbor TrialConfig without the task field; the recipe supplies each task.
The recipe substitutes two placeholders: {proxy_url}, the trajectory’s proxy URL, and
{proxy_api_key}, the proxy’s auth token. The reference configuration runs mini-swe-agent on
E2B:
claude-code, set agent.env.ANTHROPIC_BASE_URL to {proxy_url} and
agent.env.ANTHROPIC_API_KEY to {proxy_api_key}. All other fields, including sandbox
credentials, timeouts and verifier settings, follow Harbor’s schema.
Run
groups_per_batch × group_size trials: 4 tasks with 8 trajectories each.
Add config.max_steps=1 for a single-batch run. Omit config.base_url to train on the hosted
Tinker service instead of the Miles gateway.
Configuration
config is the cookbook’s tinker_cookbook.rl.train.Config, with its native field names and
defaults. Run python -m tinker_agent.train --help for the full list.
The recipe enforces the following:
config.rollout_error_toleranceis set by the recipe; setting it is rejected.config.temperaturemust remain1.0. The agent issues its own sampling requests, so the sampling temperature is set intrial.json.config.max_tokensis the proxy’s default for requests that do not setmax_tokens.config.renderer_name, if omitted, resolves to the cookbook’s recommended renderer forconfig.model_name. Qwen3.6 usesqwen3_5.config.ttl_seconds=Noneis required with the Miles gateway, which does not implement checkpoint expiry.
<log_path>/capture.
Limitations
- Trial outcomes. A completed trial, an agent timeout, a context-window overflow and an output-token limit are scored with the verifier’s reward. Any other Harbor failure, a missing or non-finite reward, a capture loss or a sample without log-probs raises: it cancels the group’s remaining trials and stops training. Infrastructure errors are never scored as zero.
- Failed requests. A failed model call produces no training sample; the agent and Harbor decide whether the trial continues.
- Algorithm. Training is Tinker LoRA with the cookbook’s PPO and group advantages. The agent, sandbox, batch size, sampling temperature, token limits and learning rate match the cloud Harbor example, but its full-parameter GRPO, optimizer defaults and KL behavior differ, so results are not directly comparable.
- Recovery. The recipe provides no partial-episode recovery.

