From 2d0c14d97382b397af3c739c6550e29cec2e4e77 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 29 Aug 2024 18:24:37 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- src/resources/fine-tune.ts | 46 +++++++++++++++++++++++++-- tests/api-resources/fine-tune.test.ts | 7 ++++ 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 99ef580d..eb7cfea9 100755 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/src/resources/fine-tune.ts b/src/resources/fine-tune.ts index 6fba4ae1..edc431ed 100755 --- a/src/resources/fine-tune.ts +++ b/src/resources/fine-tune.ts @@ -87,6 +87,8 @@ export interface FineTune { lora_r?: number; + lora_trainable_modules?: string; + model?: string; model_output_name?: string; @@ -97,6 +99,8 @@ export interface FineTune { n_epochs?: number; + n_evals?: number; + param_count?: number; queue_depth?: number; @@ -107,9 +111,9 @@ export interface FineTune { training_file?: string; - TrainingFileNumLines?: number; + trainingfile_numlines?: number; - TrainingFileSize?: number; + trainingfile_size?: number; updated_at?: string; @@ -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; @@ -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 */ @@ -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 */ diff --git a/tests/api-resources/fine-tune.test.ts b/tests/api-resources/fine-tune.test.ts index 643ef1f5..d3fe54e0 100755 --- a/tests/api-resources/fine-tune.test.ts +++ b/tests/api-resources/fine-tune.test.ts @@ -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', }); });