Installing Tinker
Install the Tinker SDK with:
pip install tinkerInstallation makes two components available: the python SDK and the tinker CLI.
Python SDK
The python SDK provides low-level operations like forward_backward, sample, optim_step, and save_state.
Tinker CLI
The tinker CLI is available as tinker or through python -m tinker. The CLI provides management functionality similar to that of the web console.
Run tinker --help to see which functionality is available.
Tinker Cookbook
We also release tinker-cookbook (opens in a new tab), which is a collection of training code and experiment tools built on top of Tinker. For the Cookbook, we'd recommend doing a local editable install, as you'll probably want to browse and edit the code:
git clone https://github.com/thinking-machines-lab/tinker-cookbook.git
cd tinker-cookbook
# Switch to your virtual environment
pip install -e .Getting an API key
To get your Tinker API key, sign up through the waitlist (opens in a new tab), and once you have access, create an API key from the console (opens in a new tab). You'll then want to set the TINKER_API_KEY environment variable to your newly generated API key.