Skip to content

Create Fine Tune

POST
/finetuning/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/finetuning/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"name": "string",
"training_type": "string",
"training_inputs": {
"source_repository_type": "string",
"dataset": "string",
"dataset_type": "string",
"validation_split_ratio": 0,
"target_dataset_field": "string",
"gradient_accumulation_steps": 0,
"context_length": 0,
"learning_rate": 0,
"epochs": 0,
"stop_training_when": "string",
"max_steps": 0,
"batch_size": 0,
"peft_lora_alpha": 0,
"peft_lora_r": 0,
"max_grad_norm": 0,
"save_strategy": "string",
"save_steps": 0,
"save_total_limit": 0,
"lora_dropout": 0,
"lora_bias": "string",
"load_in_4bit": false,
"image_column": "string",
"caption_column": "string",
"validation_prompt": "string",
"num_validation_images": 0,
"train_batch_size": 0,
"load_in_8bit": false,
"mixed_precision": "string",
"checkpointing_steps": 0,
"checkpoints_total_limit": 0,
"task": "string",
"prompt_configuration": "string"
},
"isClone": false,
"model_name": "string",
"sku_item_price_id": 0,
"sku_item_plan": "string",
"sku_item_price": "string",
"huggingface_integration_id": 0
}'
project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
name
required

The name of the training job

string
training_type
required

The type of training

string
training_inputs
required

Configuration for training inputs

object
source_repository_type
string
dataset
string
dataset_type
string
validation_split_ratio
number
target_dataset_field
string
gradient_accumulation_steps
integer
context_length
integer
learning_rate
number
epochs
integer
stop_training_when
string
max_steps
integer
batch_size
integer
peft_lora_alpha
integer
peft_lora_r
integer
max_grad_norm
number
save_strategy
string
save_steps
integer
save_total_limit
integer
lora_dropout
number
lora_bias
string
load_in_4bit
boolean
image_column
string
caption_column
string
validation_prompt
string
num_validation_images
integer
train_batch_size
integer
load_in_8bit
boolean
mixed_precision
string
checkpointing_steps
integer
checkpoints_total_limit
integer
task
string
prompt_configuration
string
isClone
boolean
model_name
required
string
sku_item_price_id
required
integer
sku_item_plan
required
string
sku_item_price
required
string
huggingface_integration_id
required
integer

Example generated

{
"name": "example",
"training_type": "example",
"training_inputs": {
"source_repository_type": "example",
"dataset": "example",
"dataset_type": "example",
"validation_split_ratio": 1,
"target_dataset_field": "example",
"gradient_accumulation_steps": 1,
"context_length": 1,
"learning_rate": 1,
"epochs": 1,
"stop_training_when": "example",
"max_steps": 1,
"batch_size": 1,
"peft_lora_alpha": 1,
"peft_lora_r": 1,
"max_grad_norm": 1,
"save_strategy": "example",
"save_steps": 1,
"save_total_limit": 1,
"lora_dropout": 1,
"lora_bias": "example",
"load_in_4bit": true,
"image_column": "example",
"caption_column": "example",
"validation_prompt": "example",
"num_validation_images": 1,
"train_batch_size": 1,
"load_in_8bit": true,
"mixed_precision": "example",
"checkpointing_steps": 1,
"checkpoints_total_limit": 1,
"task": "example",
"prompt_configuration": "example"
},
"isClone": true,
"model_name": "example",
"sku_item_price_id": 1,
"sku_item_plan": "example",
"sku_item_price": "example",
"huggingface_integration_id": 1
}

Successful response with training job details.

Media typeapplication/json
object
code

HTTP status code for the operation.

integer
data

Details of the training job.

object
id

Unique identifier of the training job.

integer
name

Name of the training job.

string
model_name

Name of the model used for training.

string
training_inputs

Configuration of the training job.

object
dataset

Dataset identifier.

string
dataset_name

Name of the dataset.

string
source_model_repo_info

Information about the source model repository.

string
source_repository_type

Type of the source repository.

string
source_model_path

Path to the source model.

string
task

Task type for training.

string
dataset_type

Dataset type.

string
train_batch_size

Training batch size.

integer
gradient_accumulation_steps

Number of gradient accumulation steps.

integer
epochs

Number of training epochs.

integer
max_steps

Maximum training steps.

integer
checkpointing_steps

Number of steps between checkpoints.

integer
checkpoints_total_limit

Total limit of checkpoints.

integer
peft_lora_r

LoRA hyperparameter ‘r’.

integer
peft_lora_alpha

LoRA hyperparameter ‘alpha’.

integer
load_in_8bit

Indicates if 8-bit loading is enabled.

boolean
mixed_precision

Type of mixed precision used.

string
validation_prompt

Prompt used for validation.

string
num_validation_images

Number of validation images.

integer
logging_steps

Number of steps between logging.

integer
learning_rate

Learning rate for training.

number format: float
limit_training_records_count

Limit on the number of training records.

integer
caption_column

Column used for captions.

string
image_column

Column used for images.

string
save_strategy

Strategy for saving checkpoints.

string
stop_training_when

Condition to stop training.

string
description

Description of the training job.

string
status

Current status of the training job.

string
created_by

Details of the user who created the job.

object
id
integer
name
string
email
string
username
string
created_at

Timestamp of job creation.

string format: date-time
hugging_face_integration_name

Name of the Hugging Face integration.

string
sku_item_price

Pricing details of the training job.

object
sku_item_price_id
integer
sku_type
string
committed_days
integer
unit_price
number format: float
currency
string
description
string
sku

SKU information for the compute resource.

object
sku_id
integer
name
string
series
string
cpu
integer
gpu
integer
memory
number format: float
is_free
boolean
errors

Contains any errors that occurred.

object
message

Result message confirming the operation.

string

Example

{
"code": 200,
"data": {
"id": 810,
"name": "tir-finetuning-111511093030",
"model_name": "stabilityai/stable-diffusion-2-1",
"training_inputs": {
"dataset": "lambdalabs/naruto-blip-captions",
"dataset_name": "lambdalabs/naruto-blip-captions",
"source_model_repo_info": "",
"source_repository_type": "base_model",
"source_model_path": "",
"task": "Instruction-Finetuning",
"dataset_type": "huggingface",
"train_batch_size": 1,
"gradient_accumulation_steps": 1,
"epochs": 3,
"max_steps": -1,
"checkpointing_steps": 500,
"checkpoints_total_limit": 10,
"peft_lora_r": 64,
"peft_lora_alpha": 16,
"load_in_8bit": false,
"mixed_precision": "no",
"validation_prompt": "A photo of a man with green eyes",
"num_validation_images": 2,
"logging_steps": 5,
"learning_rate": 0.0000141,
"limit_training_records_count": -1,
"caption_column": "text",
"image_column": "image",
"save_strategy": "steps",
"stop_training_when": "epoch_count"
},
"description": null,
"status": "Creating",
"created_by": {
"id": 3573,
"name": "Nipun",
"email": "nipun.arora@e2enetworks.com",
"username": "nipun.arora@e2enetworks.com"
},
"created_at": "2024-11-15T06:10:06.278937Z",
"hugging_face_integration_name": "tir",
"sku_item_price": {
"sku_item_price_id": 763,
"sku_type": "hourly",
"committed_days": 0,
"unit_price": 470.4,
"currency": "INR",
"description": "Hourly Compute Instance: pipeline"
},
"sku": {
"sku_id": 166,
"name": "GDC.1xH200-30.375GB_SXM",
"series": "GPU",
"cpu": 30,
"gpu": 1,
"memory": 375,
"is_free": false
}
},
"errors": {},
"message": "Success"
}