This is a guide for running supervised finetuning on Thinking Machine’s Tinker API!

Set up virtual env

Important so that dependencies between different repos don’t get mixed together

python3.11 -m venv .venv
source .venv/bin/activate

Set up the Cookbook repo

https://github.com/thinking-machines-lab/tinker-cookbook

Highly recommend running Tinker from the Cookbook repo. It supplies a lot of util functions like renderers for different base model types that you’d otherwise have to write as you try out different base models.

cd /Users/klyap/Dev/thinkingmachines/tinker-cookbook
pip install -U pip
pip install -e .

Load in Tinker API key

export TINKER_API_KEY=

Set up Weights and Biases

Optional step if you want to see training logs!

Sign up for an account and get API key to login on CLI

pip install wandb weave
wandb login

Example wandb logs from my Tinker runs

Example wandb logs from my Tinker runs

Let’s run the Chat Supervised Learning Recipe!

https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/recipes/chat_sl/README.md

Train the model