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

Was this helpful?

  1. API
  2. Fine-tuning

Create Job

Now you can create a fine-tuning job using a previously uploaded file and one of the supported models. Use "id" from the reponse of "/v1/files" and "name" from the reponse of "/v1/fine-tuning/template"

Replace {{API_TOKEN}} with your actual token.

Example Request:

curl --location 'https://api.netmind.ai/v1/fine-tuning/job' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{API_TOKEN}}' \
--data '{
    "model": "llama-3-8b",
    "training_file_id": "file-KVvi...",
    "hyperparameters": {
        "per_device_train_batch_size": 1,
        "learning_rate": 0.0001,
        "num_train_epochs": 30
    }
}'
import requests
import json

url = "https://api.netmind.ai/v1/fine-tuning/job"

payload = json.dumps({
  "model": "llama-3-8b",
  "training_file_id": "file-KVvi...",
  "hyperparameters": {
    "per_device_train_batch_size": 1,
    "learning_rate": 0.0001,
    "num_train_epochs": 30
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {{API_TOKEN}}'
}

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

print(response.text)

Example Response:

{
    "id": "ftjob-0mlf..."
}
PreviousPreparing your datasetNextRetrieve job

Last updated 6 months ago

Was this helpful?