Downloading Weights

Downloading weights

You can download any checkpoint saved on Tinker using the code below:

import tinker
sc = tinker.ServiceClient()
rc = sc.create_rest_client()
future = rc.download_checkpoint_archive_from_tinker_path("tinker://<unique_id>/sampler_weights/final")
archive_data = future.result()
with open(f"model-checkpoint.tar.gz", "wb") as f:
    f.write(archive_data)

Replace <unique_id> by your checkpoint ID. This will save the LoRA adapter weights and config inside the model-checkpoint.tar.gz file.