Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-49d420a0d032aa57d5da9e8ef21bd80ca55cac0c21161bf3a20e0fca38db44ff.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-376ba2026d4957224e490000b809c5a4432c3d114d641c991b50dd860c6f8b39.yml
46 changes: 43 additions & 3 deletions src/resources/fine-tune.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export interface FineTune {

lora_r?: number;

lora_trainable_modules?: string;

model?: string;

model_output_name?: string;
Expand All @@ -97,6 +99,8 @@ export interface FineTune {

n_epochs?: number;

n_evals?: number;

param_count?: number;

queue_depth?: number;
Expand All @@ -107,9 +111,9 @@ export interface FineTune {

training_file?: string;

TrainingFileNumLines?: number;
trainingfile_numlines?: number;

TrainingFileSize?: number;
trainingfile_size?: number;

updated_at?: string;

Expand Down Expand Up @@ -251,7 +255,7 @@ export interface FineTuneCreateParams {
model: string;

/**
* File-ID of a file uploaded to the Together API
* File-ID of a training file uploaded to the Together API
*/
training_file: string;

Expand All @@ -265,6 +269,32 @@ export interface FineTuneCreateParams {
*/
learning_rate?: number;

/**
* Whether to enable LoRA training. If not provided, full fine-tuning will be
* applied.
*/
lora?: boolean;

/**
* The alpha value for LoRA adapter training.
*/
lora_alpha?: number;

/**
* The dropout probability for Lora layers.
*/
lora_dropout?: number;

/**
* Rank for LoRA adapter weights
*/
lora_r?: number;

/**
* A list of LoRA trainable modules, separated by a comma
*/
lora_trainable_modules?: string;

/**
* Number of checkpoints to save during fine-tuning
*/
Expand All @@ -275,11 +305,21 @@ export interface FineTuneCreateParams {
*/
n_epochs?: number;

/**
* Number of evaluations to be run on a given validation set during training
*/
n_evals?: number;

/**
* Suffix that will be added to your fine-tuned model name
*/
suffix?: string;

/**
* File-ID of a validation file uploaded to the Together API
*/
validation_file?: string;

/**
* API key for Weights & Biases integration
*/
Expand Down
7 changes: 7 additions & 0 deletions tests/api-resources/fine-tune.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,16 @@ describe('resource fineTune', () => {
training_file: 'training_file',
batch_size: 0,
learning_rate: 0,
lora: true,
lora_alpha: 0,
lora_dropout: 0,
lora_r: 0,
lora_trainable_modules: 'lora_trainable_modules',
n_checkpoints: 0,
n_epochs: 0,
n_evals: 0,
suffix: 'suffix',
validation_file: 'validation_file',
wandb_api_key: 'wandb_api_key',
});
});
Expand Down