Skip to main content
Tinker is a training API for fine-tuning open-weight models with LoRA. Sail can run the sampling side of your Tinker training loop: sail.SailTokenCompleter is a drop-in tinker-cookbook TokenCompleter that samples from your Tinker checkpoints on Sail, with no manual adapter upload step. Token IDs go in and token IDs come out. The completer sends your prompt token IDs to Sail verbatim and returns sampled token IDs with per-token logprobs, so there is no chat-template or re-tokenization drift between training and sampling. Each call creates a background Responses API request for the completion window you choose (balanced by default) and polls it to completion, retrying transient failures with exponential backoff. We also have a guide on how to use sail.SailTokenCompleter in a GRPO-style Tinker training loop.

Install

Sample on Sail

SailTokenCompleter works anywhere tinker-cookbook expects a TokenCompleter (i.e. RL rollouts, evals, or direct calls):

Parameters

The stop argument on the call itself accepts a string, a list of strings, or token IDs, matching the tinker-cookbook TokenCompleter contract.

Sample from a Tinker checkpoint

To sample from a LoRA you are training in Tinker, save sampler weights, resolve a signed archive URL, and pass both the URL and the adapter’s PEFT config to the completer. Sail downloads the checkpoint archive and loads the adapter for your requests.
adapter_config is the PEFT adapter config for the LoRA Tinker is training. The same compatibility rules apply as for uploaded LoRAs: the base model must match model, and the rank must be within the base model’s limit. When ttl_seconds is passed to get_tinker_checkpoint_signed_url_async, the helper sets the Tinker checkpoint’s TTL before resolving the URL, so per-step RL sampler checkpoints are cleaned up automatically instead of accumulating in your Tinker account.

Using an uploaded LoRA instead

If you have already uploaded a LoRA to Sail, pass its name or ID as lora instead of a signed URL:

Constraints

  • Tinker checkpoints only apply through SailTokenCompleter. The adapter is loaded on Sail’s raw-token sampling path. A plain text Responses or Chat Completions request that happens to carry Tinker checkpoint metadata is served by the base model. Sample from Tinker checkpoints only via SailTokenCompleter.
  • lora and tinker_lora_signed_url are mutually exclusive. Pass one LoRA source per completer.
  • adapter_config is required with tinker_lora_signed_url. Sail needs the PEFT config to load the checkpoint weights.
  • model must support LoRA serving when a LoRA source is set (see supported base models).
  • Kimi K2.6 LoRA requests use balanced by default. SailTokenCompleter selects it by default. flex is available for background LoRA and Tinker work. The asap completion window is not available for LoRA requests.
  • Signed checkpoint URLs expire. Resolve a fresh URL for each new checkpoint, and re-resolve if a long-running loop reuses an old one.
  • tinker-cookbook must be installed. Constructing a SailTokenCompleter without it raises an error; the rest of the sail SDK works without Tinker packages.