tinker-cookbook  by thinking-machines-lab

Advanced LLM fine-tuning SDK and example cookbook

Created 3 months ago
991 stars

Top 37.5% on SourcePulse

GitHubView on GitHub
Project Summary

<2-3 sentences summarising what the project addresses and solves, the target audience, and the benefit.> Tinker and its accompanying cookbook provide a managed service and a set of examples for researchers and developers to fine-tune large language models (LLMs). The core benefit is abstracting away the complexities of distributed training, allowing users to focus on model customization and experimentation through a straightforward API and practical recipes.

How It Works

The system leverages the Tinker API, which handles the underlying distributed training infrastructure. Users interact with primitives like ServiceClient to create training clients (e.g., create_lora_training_client) and execute training steps (forward_backward, optim_step). The tinker-cookbook repository builds upon this API, offering a collection of sophisticated examples and utilities. These recipes demonstrate common LLM customization tasks, providing common abstractions and guiding users through setup and execution for specific use cases.

Quick Start & Requirements

  1. Sign up for Tinker via the waitlist and obtain an API key, exporting it as TINKER_API_KEY.
  2. Install the Tinker Python client: pip install tinker.
  3. For cookbook examples, install the repository in editable mode: pip install -e . (recommended within a conda or uv virtual environment). Refer to the official Tinker documentation for detailed setup instructions.

Highlighted Details

  • Advanced Recipes: Includes examples for Chat supervised learning (e.g., Tulu3), Math reasoning, Preference learning (full RLHF pipeline), Tool use, Prompt distillation, and Multi-Agent simulations.
  • Utilities: Provides helpful tools for token rendering (renderers), hyperparameter calculation (hyperparam_utils), and model evaluation, including integration with InspectAI.
  • Model Download: Functionality to download model checkpoints directly from Tinker paths.

Maintenance & Community

The project is developed with an "open science and collaborative development" spirit. While currently in private beta, contributions via Pull Requests are planned to be welcomed post-beta. Feedback can be directed to tinker@thinkingmachines.ai.

Licensing & Compatibility

The provided README does not specify a software license. Compatibility for commercial use or integration with closed-source projects is undetermined without a defined license.

Limitations & Caveats

The project is currently in a private beta phase, meaning access is restricted and contributions are not yet open. Users must obtain access through the Tinker waitlist and secure an API key to utilize the service.

Health Check
Last Commit

7 hours ago

Responsiveness

Inactive

Pull Requests (30d)
18
Issues (30d)
11
Star History
1,004 stars in the last 30 days

Explore Similar Projects

Starred by Junyang Lin Junyang Lin(Core Maintainer at Alibaba Qwen), Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), and
1 more.

LMaaS-Papers by txsun1997

0%
548
Curated list of LMaaS research papers
Created 3 years ago
Updated 1 year ago
Feedback? Help us improve.