download - Tinker Documentation

tinker_cookbook.weights.download

tinker_cookbook.weights.download( tinker_path, output_dir, base_url)

Download a checkpoint from Tinker storage to local disk.

Fetches a signed URL via the Tinker SDK, downloads the archive, and extracts it with security validation (rejects symlinks and path traversal).

Parameters:

Returns: Path to the extracted checkpoint directory.

Raises:

from tinker_cookbook import weights
# Download from default Tinker service
adapter_dir = weights.download(
tinker_path="tinker://run-id/sampler_weights/final",
output_dir="./adapter",
)
# Download from a custom Tinker deployment
adapter_dir = weights.download(
tinker_path="tinker://run-id/sampler_weights/final",
output_dir="./adapter",
base_url="https://tinker.my-company.com",
)