GitHub - NousResearch/tinker-atropos: Standalone repo for our Atropos integration with Thinking Machines Tinker API (https://thinkingmachines.ai/tinker/)
Paper

GitHub - NousResearch/tinker-atropos: Standalone repo for our Atropos integration with Thinking Machines Tinker API (https://thinkingmachines.ai/tinker/)

NousResearch
2026.06.08
·GitHub·by Mineru
#AI#API#ML#OpenAI#Python

Key Points

  • 1`tinker-atropos` integrates Atropos environments with the Thinking Machines Tinker API, streamlining model training.
  • 2This integration abstracts away compute management and infrastructure concerns, enabling seamless training from local machines.
  • 3It leverages a unified YAML configuration for both training and environment settings, allowing existing Atropos environments to be used with Tinker, including support for LORA and custom reward functions.

The tinker-atropos project serves as an integration layer connecting the Atropos framework, designed for Reinforcement Learning from Human Feedback (RLHF), with the Thinking Machines Tinker API. Its primary objective is to abstract away compute management and infrastructure complexities, enabling seamless RLHF model training from a local machine via the Tinker cloud platform.

The core methodology revolves around a coordinated execution of three components: an Atropos API server, an Atropos environment, and the tinker-atropos trainer.

  1. Atropos API Server: This component, typically started with run-api, acts as an inference server for the base large language model (LLM), facilitating the generation of responses during the RLHF process.
  2. Atropos Environment: This Python script (e.g., gsm8k_tinker.py or any existing Atropos environment like math_server.py) defines the interaction loop, data loading, and custom reward functions for the RLHF task. It exposes a serve endpoint, which the tinker-atropos trainer interacts with. Crucially, Atropos environments leverage a managed_server pattern, ensuring compatibility with the training process by handling tokenizer loading and allowing for the specification of stop sequences (e.g., stop=[self.tokenizer.eostokenid]stop = [self.tokenizer.eos_token_id]) in chat_completion calls.
  3. Tinker-Atropos Trainer: Launched via launch_training.py, this component orchestrates the training process by communicating with the Tinker API. It uses the Atropos environment to generate samples, collect rewards, and perform parameter updates on the LLM. The training typically involves Low-Rank Adaptation (LoRA) fine-tuning of the base model.

Configuration is central to the tinker-atropos pipeline and is managed via YAML files that adhere to a specific structure, extending the standard Atropos format with a dedicated tinker section.

  • The env section specifies parameters for the Atropos environment, such as group_size, batch_size, and tokenizer_name. These settings dictate how the environment generates and processes data.
  • The openai section configures the inference server, including model_name and base_url for communication.
  • The tinker section contains parameters specifically consumed by the tinker-atropos trainer and ignored by the Atropos environment. These include LoRA-specific settings like lora_rank, optimization parameters such as learning_rate, and training control parameters like max_token_trainer_length, checkpoint_dir, save_checkpoint_interval, and Weights & Biases (W&B) integration details (wandb_project, wandb_group, wandb_run_name).

During a training run, the launch_training.py script initializes a TinkerAtroposTrainer instance, providing it with the comprehensive configuration. The trainer then interacts with the Tinker API to provision compute and execute the training loop, which involves iterative calls to the Atropos environment for data and reward signals. The environment, in turn, interacts with the local or remote Atropos API server for model inference. Upon completion, the trained LoRA weights are made available via a Tinker path (e.g., tinker://<trainingrunid>/samplerweights/finaltinker://<training_run_id>/sampler_weights/final) for download.

The tinker-atropos project supports both CLI-based usage for quick starts and overrides, as well as programmatic access through TinkerAtroposConfig and TinkerAtroposTrainer classes, allowing for more granular control and integration into existing Python workflows. This architecture effectively decouples the RLHF logic defined in Atropos from the underlying compute infrastructure, leveraging the Tinker API for scalable and managed training.