NetMind Power Documentation
  • NetMind Account
  • Inference
    • Model APIs
    • Dedicated Endpoints
  • Fine-tuning
  • Rent GPUs
    • Cloud Sync
    • Use Ngrok as Ingress Service
  • Rent Cluster (Comming soon)
  • API
    • API token
    • Files
    • Fine-tuning
      • List Models
      • Preparing your dataset
      • Create Job
      • Retrieve job
      • Download model
      • Cancel job
      • Deploy Checkpoint (coming soon)
    • Inference
      • Chat
      • Images
      • Haiper Inference
      • Asynchronous Inference
      • Dedicated Endpoints
      • Batch Processing
      • Embedding API
      • Deprecated Models
    • Rent GPU
      • SSH Authentication
      • List Available images
      • List Available GPU Instances
      • Create Your First Environment
      • Stop GPU instace
    • API Reference
      • Files
      • Fine-tuning
      • Rent GPU
Powered by GitBook
On this page
  • Step 1: List All Checkpoints
  • Step 2: Get Download Url

Was this helpful?

  1. API
  2. Fine-tuning

Download model

You can download the final checkpoint of a successfully completed fine-tuning job.

Replace {{API_TOKEN}} with your actual token.

Step 1: List All Checkpoints

Example Request:

curl --location 'https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests

url = "https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response:

[
    {
        "id": "ftckpt-a91...",
        "checkpoint": "checkpoint-30",
        "step": 30,
        "metrics": {
            "loss": 0.0001
        },
        "created_at": 1730977618
    }
]

Step 2: Get Download Url

Example Request:

curl --location 'https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint/{{CHECKPOINT_ID}}/download' \
--header 'Authorization: Bearer {{API_TOKEN}}'
import requests

url = "https://api.netmind.ai/v1/fine-tuning/job/{{JOB_ID}}/checkpoint/{{CHECKPOINT_ID}}/download"

payload = {}
headers = {
  'Authorization': 'Bearer {{API_TOKEN}}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Example Response:

{
    "presigned_url": "https://...."
}

The returned presigned download URL can be used to download the checkpoint. The presigned URL is valid for 2 hours. You can use command like "wget" to download the checkpoint file.

wget {{PRESIGNED_URL}} -O checkpoint.tar

PreviousRetrieve jobNextCancel job

Last updated 6 months ago

Was this helpful?