completers

Generate tokens or structured messages via SamplingClient wrappers for RL rollouts.

4.0k|507|Updated Jul 14, 2025
One-click install
npx skills add https://github.com/thinking-machines-lab/tinker-cookbook --skill completers
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: completers
Source: https://github.com/thinking-machines-lab/tinker-cookbook/tree/main/.claude/skills/completers
Command: npx skills add https://github.com/thinking-machines-lab/tinker-cookbook --skill completers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Completers provide convenient, structured interfaces for text generation by wrapping a SamplingClient, enabling both low-level token access and high-level message handling during RL rollouts and evaluation.

Core Features & Use Cases

  • TokenCompleter: low-level interface that returns tokens and optional logprobs for precise control during RL training.
  • MessageCompleter: high-level interface that accepts and returns Message objects for multi-turn conversations and evaluation.
  • Flexible usage: supports integration in RL rollouts, tool-using environments, and evaluation workflows; ideal when you need either raw tokens or structured messages.

Quick Start

Instantiate a TokenCompleter or MessageCompleter with a SamplingClient and run a simple prompt to generate either tokens or a parsed Message.

Frequently Asked Questions about completers

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I streamline text generation for RL rollouts with token-level control?▼

You can streamline text generation for RL rollouts by using a TokenCompleter interface, which wraps a SamplingClient to return raw tokens and optional logprobs for precise control during training and evaluation.

What is the difference between token-level and message-level text generation interfaces?▼

Token-level interfaces return raw tokens and logprobs for low-level RL training control, while message-level interfaces accept and return structured Message objects for high-level multi-turn conversations and evaluation workflows.

Do I need a SamplingClient to generate structured messages for multi-turn conversations?▼

Yes, you need a SamplingClient to generate structured messages. Both the MessageCompleter and TokenCompleter abstractions require a SamplingClient instance to manage rendering, stop conditions, and error handling during text generation.

Can I use completers for both RL evaluation and conversational tooling environments?▼

Yes, you can use completers for both RL evaluation and conversational tooling. They provide flexible interfaces supporting both precise token access for RL training and structured message handling for multi-turn conversations.

How do I get logprobs from a token completer during RL training rollouts?▼

To get logprobs during RL training rollouts, use the TokenCompleter interface which returns optional logprobs alongside generated tokens, enabling precise probability tracking for policy gradient updates and evaluation.