This commit is contained in:
Sai Soundararaj 2025-07-01 16:46:20 -07:00
parent b1b93088c5
commit a9d8fdef90
4 changed files with 319 additions and 63 deletions

View file

@ -11252,13 +11252,15 @@
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
"type": "string",
"description": "Unique identifier for the training job"
},
"checkpoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Checkpoint"
}
},
"description": "List of model checkpoints created during training"
}
},
"additionalProperties": false,
@ -11273,7 +11275,8 @@
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
"type": "string",
"description": "Unique identifier for the training job"
},
"status": {
"type": "string",
@ -11284,19 +11287,22 @@
"scheduled",
"cancelled"
],
"title": "JobStatus"
"description": "Current status of the training job"
},
"scheduled_at": {
"type": "string",
"format": "date-time"
"format": "date-time",
"description": "(Optional) Timestamp when the job was scheduled"
},
"started_at": {
"type": "string",
"format": "date-time"
"format": "date-time",
"description": "(Optional) Timestamp when the job execution began"
},
"completed_at": {
"type": "string",
"format": "date-time"
"format": "date-time",
"description": "(Optional) Timestamp when the job finished, if completed"
},
"resources_allocated": {
"type": "object",
@ -11321,13 +11327,15 @@
"type": "object"
}
]
}
},
"description": "(Optional) Information about computational resources allocated to the job"
},
"checkpoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Checkpoint"
}
},
"description": "List of model checkpoints created during training"
}
},
"additionalProperties": false,
@ -14644,16 +14652,20 @@
"type": "object",
"properties": {
"reward_scale": {
"type": "number"
"type": "number",
"description": "Scaling factor for the reward signal"
},
"reward_clip": {
"type": "number"
"type": "number",
"description": "Maximum absolute value for reward clipping"
},
"epsilon": {
"type": "number"
"type": "number",
"description": "Small value added for numerical stability"
},
"gamma": {
"type": "number"
"type": "number",
"description": "Discount factor for future rewards"
}
},
"additionalProperties": false,
@ -14663,33 +14675,41 @@
"epsilon",
"gamma"
],
"title": "DPOAlignmentConfig"
"title": "DPOAlignmentConfig",
"description": "Configuration for Direct Preference Optimization (DPO) alignment."
},
"DataConfig": {
"type": "object",
"properties": {
"dataset_id": {
"type": "string"
"type": "string",
"description": "Unique identifier for the training dataset"
},
"batch_size": {
"type": "integer"
"type": "integer",
"description": "Number of samples per training batch"
},
"shuffle": {
"type": "boolean"
"type": "boolean",
"description": "Whether to shuffle the dataset during training"
},
"data_format": {
"$ref": "#/components/schemas/DatasetFormat"
"$ref": "#/components/schemas/DatasetFormat",
"description": "Format of the dataset (instruct or dialog)"
},
"validation_dataset_id": {
"type": "string"
"type": "string",
"description": "(Optional) Unique identifier for the validation dataset"
},
"packed": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to pack multiple samples into a single sequence for efficiency"
},
"train_on_input": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to compute loss on input tokens as well as output tokens"
}
},
"additionalProperties": false,
@ -14699,7 +14719,8 @@
"shuffle",
"data_format"
],
"title": "DataConfig"
"title": "DataConfig",
"description": "Configuration for training data and data loading."
},
"DatasetFormat": {
"type": "string",
@ -14707,45 +14728,55 @@
"instruct",
"dialog"
],
"title": "DatasetFormat"
"title": "DatasetFormat",
"description": "Format of the training dataset."
},
"EfficiencyConfig": {
"type": "object",
"properties": {
"enable_activation_checkpointing": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to use activation checkpointing to reduce memory usage"
},
"enable_activation_offloading": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to offload activations to CPU to save GPU memory"
},
"memory_efficient_fsdp_wrap": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to use memory-efficient FSDP wrapping"
},
"fsdp_cpu_offload": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to offload FSDP parameters to CPU"
}
},
"additionalProperties": false,
"title": "EfficiencyConfig"
"title": "EfficiencyConfig",
"description": "Configuration for memory and compute efficiency optimizations."
},
"OptimizerConfig": {
"type": "object",
"properties": {
"optimizer_type": {
"$ref": "#/components/schemas/OptimizerType"
"$ref": "#/components/schemas/OptimizerType",
"description": "Type of optimizer to use (adam, adamw, or sgd)"
},
"lr": {
"type": "number"
"type": "number",
"description": "Learning rate for the optimizer"
},
"weight_decay": {
"type": "number"
"type": "number",
"description": "Weight decay coefficient for regularization"
},
"num_warmup_steps": {
"type": "integer"
"type": "integer",
"description": "Number of steps for learning rate warmup"
}
},
"additionalProperties": false,
@ -14755,7 +14786,8 @@
"weight_decay",
"num_warmup_steps"
],
"title": "OptimizerConfig"
"title": "OptimizerConfig",
"description": "Configuration parameters for the optimization algorithm."
},
"OptimizerType": {
"type": "string",
@ -14764,38 +14796,47 @@
"adamw",
"sgd"
],
"title": "OptimizerType"
"title": "OptimizerType",
"description": "Available optimizer algorithms for training."
},
"TrainingConfig": {
"type": "object",
"properties": {
"n_epochs": {
"type": "integer"
"type": "integer",
"description": "Number of training epochs to run"
},
"max_steps_per_epoch": {
"type": "integer",
"default": 1
"default": 1,
"description": "Maximum number of steps to run per epoch"
},
"gradient_accumulation_steps": {
"type": "integer",
"default": 1
"default": 1,
"description": "Number of steps to accumulate gradients before updating"
},
"max_validation_steps": {
"type": "integer",
"default": 1
"default": 1,
"description": "(Optional) Maximum number of validation steps per epoch"
},
"data_config": {
"$ref": "#/components/schemas/DataConfig"
"$ref": "#/components/schemas/DataConfig",
"description": "(Optional) Configuration for data loading and formatting"
},
"optimizer_config": {
"$ref": "#/components/schemas/OptimizerConfig"
"$ref": "#/components/schemas/OptimizerConfig",
"description": "(Optional) Configuration for the optimization algorithm"
},
"efficiency_config": {
"$ref": "#/components/schemas/EfficiencyConfig"
"$ref": "#/components/schemas/EfficiencyConfig",
"description": "(Optional) Configuration for memory and compute optimizations"
},
"dtype": {
"type": "string",
"default": "bf16"
"default": "bf16",
"description": "(Optional) Data type for model parameters (bf16, fp16, fp32)"
}
},
"additionalProperties": false,
@ -14804,7 +14845,8 @@
"max_steps_per_epoch",
"gradient_accumulation_steps"
],
"title": "TrainingConfig"
"title": "TrainingConfig",
"description": "Comprehensive configuration for the training process."
},
"PreferenceOptimizeRequest": {
"type": "object",
@ -16101,33 +16143,41 @@
"type": {
"type": "string",
"const": "LoRA",
"default": "LoRA"
"default": "LoRA",
"description": "Algorithm type identifier, always \"LoRA\""
},
"lora_attn_modules": {
"type": "array",
"items": {
"type": "string"
}
},
"description": "List of attention module names to apply LoRA to"
},
"apply_lora_to_mlp": {
"type": "boolean"
"type": "boolean",
"description": "Whether to apply LoRA to MLP layers"
},
"apply_lora_to_output": {
"type": "boolean"
"type": "boolean",
"description": "Whether to apply LoRA to output projection layers"
},
"rank": {
"type": "integer"
"type": "integer",
"description": "Rank of the LoRA adaptation (lower rank = fewer parameters)"
},
"alpha": {
"type": "integer"
"type": "integer",
"description": "LoRA scaling parameter that controls adaptation strength"
},
"use_dora": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)"
},
"quantize_base": {
"type": "boolean",
"default": false
"default": false,
"description": "(Optional) Whether to quantize the base model weights"
}
},
"additionalProperties": false,
@ -16139,7 +16189,8 @@
"rank",
"alpha"
],
"title": "LoraFinetuningConfig"
"title": "LoraFinetuningConfig",
"description": "Configuration for Low-Rank Adaptation (LoRA) fine-tuning."
},
"QATFinetuningConfig": {
"type": "object",
@ -16147,13 +16198,16 @@
"type": {
"type": "string",
"const": "QAT",
"default": "QAT"
"default": "QAT",
"description": "Algorithm type identifier, always \"QAT\""
},
"quantizer_name": {
"type": "string"
"type": "string",
"description": "Name of the quantization algorithm to use"
},
"group_size": {
"type": "integer"
"type": "integer",
"description": "Size of groups for grouped quantization"
}
},
"additionalProperties": false,
@ -16162,7 +16216,8 @@
"quantizer_name",
"group_size"
],
"title": "QATFinetuningConfig"
"title": "QATFinetuningConfig",
"description": "Configuration for Quantization-Aware Training (QAT) fine-tuning."
},
"SupervisedFineTuneRequest": {
"type": "object",

View file

@ -8064,10 +8064,13 @@ components:
properties:
job_uuid:
type: string
description: Unique identifier for the training job
checkpoints:
type: array
items:
$ref: '#/components/schemas/Checkpoint'
description: >-
List of model checkpoints created during training
additionalProperties: false
required:
- job_uuid
@ -8079,6 +8082,7 @@ components:
properties:
job_uuid:
type: string
description: Unique identifier for the training job
status:
type: string
enum:
@ -8087,16 +8091,22 @@ components:
- failed
- scheduled
- cancelled
title: JobStatus
description: Current status of the training job
scheduled_at:
type: string
format: date-time
description: >-
(Optional) Timestamp when the job was scheduled
started_at:
type: string
format: date-time
description: >-
(Optional) Timestamp when the job execution began
completed_at:
type: string
format: date-time
description: >-
(Optional) Timestamp when the job finished, if completed
resources_allocated:
type: object
additionalProperties:
@ -8107,10 +8117,15 @@ components:
- type: string
- type: array
- type: object
description: >-
(Optional) Information about computational resources allocated to the
job
checkpoints:
type: array
items:
$ref: '#/components/schemas/Checkpoint'
description: >-
List of model checkpoints created during training
additionalProperties: false
required:
- job_uuid
@ -10491,12 +10506,18 @@ components:
properties:
reward_scale:
type: number
description: Scaling factor for the reward signal
reward_clip:
type: number
description: >-
Maximum absolute value for reward clipping
epsilon:
type: number
description: >-
Small value added for numerical stability
gamma:
type: number
description: Discount factor for future rewards
additionalProperties: false
required:
- reward_scale
@ -10504,25 +10525,41 @@ components:
- epsilon
- gamma
title: DPOAlignmentConfig
description: >-
Configuration for Direct Preference Optimization (DPO) alignment.
DataConfig:
type: object
properties:
dataset_id:
type: string
description: >-
Unique identifier for the training dataset
batch_size:
type: integer
description: Number of samples per training batch
shuffle:
type: boolean
description: >-
Whether to shuffle the dataset during training
data_format:
$ref: '#/components/schemas/DatasetFormat'
description: >-
Format of the dataset (instruct or dialog)
validation_dataset_id:
type: string
description: >-
(Optional) Unique identifier for the validation dataset
packed:
type: boolean
default: false
description: >-
(Optional) Whether to pack multiple samples into a single sequence for
efficiency
train_on_input:
type: boolean
default: false
description: >-
(Optional) Whether to compute loss on input tokens as well as output tokens
additionalProperties: false
required:
- dataset_id
@ -10530,40 +10567,59 @@ components:
- shuffle
- data_format
title: DataConfig
description: >-
Configuration for training data and data loading.
DatasetFormat:
type: string
enum:
- instruct
- dialog
title: DatasetFormat
description: Format of the training dataset.
EfficiencyConfig:
type: object
properties:
enable_activation_checkpointing:
type: boolean
default: false
description: >-
(Optional) Whether to use activation checkpointing to reduce memory usage
enable_activation_offloading:
type: boolean
default: false
description: >-
(Optional) Whether to offload activations to CPU to save GPU memory
memory_efficient_fsdp_wrap:
type: boolean
default: false
description: >-
(Optional) Whether to use memory-efficient FSDP wrapping
fsdp_cpu_offload:
type: boolean
default: false
description: >-
(Optional) Whether to offload FSDP parameters to CPU
additionalProperties: false
title: EfficiencyConfig
description: >-
Configuration for memory and compute efficiency optimizations.
OptimizerConfig:
type: object
properties:
optimizer_type:
$ref: '#/components/schemas/OptimizerType'
description: >-
Type of optimizer to use (adam, adamw, or sgd)
lr:
type: number
description: Learning rate for the optimizer
weight_decay:
type: number
description: >-
Weight decay coefficient for regularization
num_warmup_steps:
type: integer
description: Number of steps for learning rate warmup
additionalProperties: false
required:
- optimizer_type
@ -10571,6 +10627,8 @@ components:
- weight_decay
- num_warmup_steps
title: OptimizerConfig
description: >-
Configuration parameters for the optimization algorithm.
OptimizerType:
type: string
enum:
@ -10578,35 +10636,53 @@ components:
- adamw
- sgd
title: OptimizerType
description: >-
Available optimizer algorithms for training.
TrainingConfig:
type: object
properties:
n_epochs:
type: integer
description: Number of training epochs to run
max_steps_per_epoch:
type: integer
default: 1
description: Maximum number of steps to run per epoch
gradient_accumulation_steps:
type: integer
default: 1
description: >-
Number of steps to accumulate gradients before updating
max_validation_steps:
type: integer
default: 1
description: >-
(Optional) Maximum number of validation steps per epoch
data_config:
$ref: '#/components/schemas/DataConfig'
description: >-
(Optional) Configuration for data loading and formatting
optimizer_config:
$ref: '#/components/schemas/OptimizerConfig'
description: >-
(Optional) Configuration for the optimization algorithm
efficiency_config:
$ref: '#/components/schemas/EfficiencyConfig'
description: >-
(Optional) Configuration for memory and compute optimizations
dtype:
type: string
default: bf16
description: >-
(Optional) Data type for model parameters (bf16, fp16, fp32)
additionalProperties: false
required:
- n_epochs
- max_steps_per_epoch
- gradient_accumulation_steps
title: TrainingConfig
description: >-
Comprehensive configuration for the training process.
PreferenceOptimizeRequest:
type: object
properties:
@ -11535,24 +11611,38 @@ components:
type: string
const: LoRA
default: LoRA
description: Algorithm type identifier, always "LoRA"
lora_attn_modules:
type: array
items:
type: string
description: >-
List of attention module names to apply LoRA to
apply_lora_to_mlp:
type: boolean
description: Whether to apply LoRA to MLP layers
apply_lora_to_output:
type: boolean
description: >-
Whether to apply LoRA to output projection layers
rank:
type: integer
description: >-
Rank of the LoRA adaptation (lower rank = fewer parameters)
alpha:
type: integer
description: >-
LoRA scaling parameter that controls adaptation strength
use_dora:
type: boolean
default: false
description: >-
(Optional) Whether to use DoRA (Weight-Decomposed Low-Rank Adaptation)
quantize_base:
type: boolean
default: false
description: >-
(Optional) Whether to quantize the base model weights
additionalProperties: false
required:
- type
@ -11562,6 +11652,8 @@ components:
- rank
- alpha
title: LoraFinetuningConfig
description: >-
Configuration for Low-Rank Adaptation (LoRA) fine-tuning.
QATFinetuningConfig:
type: object
properties:
@ -11569,16 +11661,22 @@ components:
type: string
const: QAT
default: QAT
description: Algorithm type identifier, always "QAT"
quantizer_name:
type: string
description: >-
Name of the quantization algorithm to use
group_size:
type: integer
description: Size of groups for grouped quantization
additionalProperties: false
required:
- type
- quantizer_name
- group_size
title: QATFinetuningConfig
description: >-
Configuration for Quantization-Aware Training (QAT) fine-tuning.
SupervisedFineTuneRequest:
type: object
properties: