Fine-Tuning API

Fine-Tuning API

Train custom AI models on decentralized GPUs. Powered by Bittensor Subnet 56 (Gradients).

Base URL: https://api.voltagegpu.com/api/volt/fine-tuning

Quick Start

Create your first fine-tuning job with a single API call:

curl -X POST "https://api.voltagegpu.com/api/volt/fine-tuning" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-llama-finetune",
    "taskType": "text",
    "model": "meta-llama/Llama-3.1-8B-Instruct",
    "dsRepo": "username/my-dataset",
    "hours": 2
  }'

Tip: Prepare your dataset on HuggingFace first. The API pulls directly from your HF repo.

Training Types

VoltageGPU supports four training methods, each suited to different use cases.

Text SFT (Supervised Fine-Tuning)

Train models on instruction/output pairs. Best for building custom instruction-following models.

Key Fields

taskTyperequiredSet to "text"
fieldInstructionoptionalColumn name for instruction field (default: "instruction")
fieldOutputoptionalColumn name for output field (default: "output")
// Dataset format (JSONL)
{"instruction": "Translate to French", "output": "Traduire en français"}
{"instruction": "Summarize this text", "output": "Here is a concise summary..."}

Chat SFT

Train on multi-turn conversation data. Ideal for building chatbots and conversational agents.

Key Fields

taskTyperequiredSet to "chat"
chatTemplateoptionalTemplate format: chatml, llama3, qwen3, mistral_v3_tekken, deepseek_v3, phi_4, gemma3
fieldConversationoptionalColumn name for conversation field (default: "conversations")
// Dataset format (JSONL)
{"conversations": [{"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi!"}]}
{"conversations": [{"role": "user", "content": "What is ML?"}, {"role": "assistant", "content": "Machine learning is..."}]}

DPO (Direct Preference Optimization)

Align models to human preferences using chosen/rejected response pairs. Best for RLHF-style alignment.

Key Fields

taskTyperequiredSet to "dpo"
fieldPromptoptionalColumn name for prompt field (default: "prompt")
fieldChosenoptionalColumn name for preferred response (default: "chosen")
fieldRejectedoptionalColumn name for rejected response (default: "rejected")
chatTemplateoptionalTemplate format (same options as Chat SFT)
// Dataset format (JSONL)
{"prompt": "Write a poem", "chosen": "Roses are red, violets are blue...", "rejected": "I don't write poems"}
{"prompt": "Explain gravity", "chosen": "Gravity is a fundamental force...", "rejected": "Things fall down"}

GRPO (Group Relative Policy Optimization)

Train with reward functions instead of human-labeled preference data. The model learns by comparing its own outputs within a group, guided by custom reward signals.

Key Fields

taskTyperequiredSet to "grpo"
fieldPromptoptionalColumn name for prompt field (default: "prompt")
rewardFuncsoptionalArray of reward function names to use during training
chatTemplateoptionalTemplate format (same options as Chat SFT)
curl -X POST "https://api.voltagegpu.com/api/volt/fine-tuning" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-grpo-alignment",
    "taskType": "grpo",
    "model": "meta-llama/Llama-3.1-8B-Instruct",
    "dsRepo": "username/my-prompts",
    "hours": 3,
    "chatTemplate": "llama3"
  }'

Custom Dataset (Chat & Text)

Upload your dataset as a direct URL instead of a HuggingFace repo. Supports both chat and text SFT formats.

Key Fields

taskTyperequiredSet to "custom_chat" or "custom_text"
datasetUrlrequiredDirect URL to your dataset file (JSONL, CSV, or JSON)
curl -X POST "https://api.voltagegpu.com/api/volt/fine-tuning" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "custom-dataset-train",
    "taskType": "custom_chat",
    "model": "Qwen/Qwen2.5-7B-Instruct",
    "datasetUrl": "https://my-server.com/data/conversations.jsonl",
    "hours": 2,
    "chatTemplate": "qwen3"
  }'

Image LoRA

Fine-tune FLUX and SDXL diffusion models with LoRA adapters. Best for custom image styles, brand assets, and characters.

Key Fields

taskTyperequiredSet to "image"
imageModelTypeoptionalDiffusion model type: "flux" or "sdxl" (default: "flux")

Dataset: Upload your images to a HuggingFace dataset repo. Include a metadata file mapping image filenames to captions.

Pricing

85% markup on Gradients (SN56) base rates. Charged upfront for the full job duration.

Model SizePrice / HourExample Models
Small (1-3B)$18.50Phi-4-mini, SmolLM
Medium (7-13B)$27.75Llama-3.1-8B, Qwen2.5-7B, Mistral-7B
Large (30-70B)$46.25Llama-3.1-70B
Image LoRA$18.50FLUX, SDXL

API Endpoints

List Jobs

Retrieve all your fine-tuning jobs, optionally filtered by status.

MethodEndpointDescriptionAuth
GET/api/volt/fine-tuningList all fine-tuning jobsX-API-Key

Query Parameters

statusoptionalFilter by status: pending, training, evaluating, completed, failed

Create Job

Start a new fine-tuning job.

MethodEndpointDescriptionAuth
POST/api/volt/fine-tuningCreate a fine-tuning jobX-API-Key

Request Body Parameters

namerequiredJob name (alphanumeric, hyphens allowed)
taskTyperequiredTraining type: text, chat, dpo, grpo, image, custom_chat, or custom_text
modelrequiredBase model ID (e.g., "meta-llama/Llama-3.1-8B-Instruct")
dsReporequiredHuggingFace dataset repo (e.g., "username/my-dataset")
hoursrequiredTraining duration in hours (1-24)
fieldInstructionoptionalInstruction column name (text SFT)
fieldOutputoptionalOutput column name (text SFT)
chatTemplateoptionalChat template format (chat SFT / DPO)
fieldConversationoptionalConversation column name (chat SFT)
fieldPromptoptionalPrompt column name (DPO)
fieldChosenoptionalChosen response column name (DPO)
fieldRejectedoptionalRejected response column name (DPO)
imageModelTypeoptionalImage model type: flux or sdxl (image LoRA)

Get Job Status

Retrieve the current status and details of a specific job.

MethodEndpointDescriptionAuth
GET/api/volt/fine-tuning/:idGet job status and detailsX-API-Key

Rename Result Model

Rename the output model after a successful training run.

MethodEndpointDescriptionAuth
PATCH/api/volt/fine-tuning/:idRename model or backup repoX-API-Key
# Rename the result model
curl -X PATCH "https://api.voltagegpu.com/api/volt/fine-tuning/JOB_ID" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action": "rename", "modelName": "my-custom-llama-v2"}'

# Backup training repo
curl -X PATCH "https://api.voltagegpu.com/api/volt/fine-tuning/JOB_ID" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action": "backup"}'

Cancel Job

Cancel a running or pending fine-tuning job. Jobs cancelled before training starts are automatically refunded.

MethodEndpointDescriptionAuth
DELETE/api/volt/fine-tuning/:idCancel a fine-tuning jobX-API-Key

Supported Base Models

Choose from popular open-source models as your fine-tuning base:

Language Models

  • meta-llama/Llama-3.1-8B-Instruct
  • meta-llama/Llama-3.1-70B-Instruct
  • Qwen/Qwen2.5-7B-Instruct
  • mistralai/Mistral-7B-Instruct-v0.3

Image Models

  • FLUX — Black Forest Labs diffusion model
  • SDXL — Stable Diffusion XL

Workflow

From dataset to deployed model in four steps:

1

Prepare Dataset

Upload your training data to a HuggingFace dataset repository in the correct format for your chosen task type.

2

Create Job

Submit a fine-tuning job via the API or dashboard. Choose your base model, task type, and training duration.

3

Monitor Progress

Track your job through its lifecycle: pendingtrainingevaluatingcompleted

4

Deploy or Download

Once complete, download the trained weights from HuggingFace or deploy directly via the VoltageGPU API.

Resources