Installation
Install from Source
Clone the repository and install in development mode:
git clone https://github.com/MindLab-Research/mindlab-toolkit.git
cd mindlab-toolkit
pip install -e .What’s Included
The MinT Python SDK provides low-level operations including forward_backward, sample, optim_step, and save_state functionality.
Authentication
API access requires setting up credentials:
- Obtain an API key from the Mind Lab team
- Set the
MINT_API_KEYenvironment variable
export MINT_API_KEY=sk-mint-your-key-hereTinker Compatibility
MinT targets API compatibility with Tinker (baseline: tinker 0.6.3). If you already have the tinker package installed, you can use it with MinT by setting environment variables:
export TINKER_BASE_URL=https://mint.macaron.im/
export TINKER_API_KEY=<your-mint-api-key>Most code using import tinker will work with MinT without modification. For known gaps and planned updates, see Tinker Compatibility.
SDK Version Requirement
MinT API keys (sk-mint-*) require tinker SDK version 0.6.3:
pip install tinker==0.6.3Newer SDK versions (0.8.0+) use a different key format (tml-*) and are not compatible with MinT API keys. If you see the error The api_key must start with the 'tml-' prefix, downgrade to tinker 0.6.3.
Note: The zero_grad_async() method does not exist in tinker 0.6.3. This is expected - gradient zeroing is handled automatically by the server.
Quickstart
For a hands-on tutorial, see the mint-quickstart repository which demonstrates SFT and RL training workflows.