mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-25 11:01:58 +00:00
a
This commit is contained in:
parent
b1b93088c5
commit
a9d8fdef90
4 changed files with 319 additions and 63 deletions
100
docs/_static/llama-stack-spec.yaml
vendored
100
docs/_static/llama-stack-spec.yaml
vendored
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue