From e382b4a8563479b5a0843d7613809454b5b9a16f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:24:44 +0000 Subject: [PATCH 1/3] feat(api): OpenAPI spec update via Stainless API (#48) --- .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 99ef580..eb7cfea 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 6fba4ae..edc431e 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 643ef1f..d3fe54e 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', }); }); From 361134866e071d7f02bf1a3377166a4a82e08191 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:28:02 +0000 Subject: [PATCH 2/3] chore: run tsc as part of lint script (#50) --- scripts/lint | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/lint b/scripts/lint index 4af1de0..6ba75df 100755 --- a/scripts/lint +++ b/scripts/lint @@ -6,3 +6,6 @@ cd "$(dirname "$0")/.." echo "==> Running eslint" ESLINT_USE_FLAT_CONFIG="false" ./node_modules/.bin/eslint --ext ts,js . + +echo "==> Running tsc" +./node_modules/.bin/tsc --noEmit From 4d531bfc942dd5ea26074b6941db1a52912984ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:28:20 +0000 Subject: [PATCH 3/3] release: 0.6.0-alpha.8 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6752a57..7d5c75a 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.6.0-alpha.7" + ".": "0.6.0-alpha.8" } diff --git a/CHANGELOG.md b/CHANGELOG.md index e26ab52..369e518 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.6.0-alpha.8 (2024-08-29) + +Full Changelog: [v0.6.0-alpha.7...v0.6.0-alpha.8](https://github.com/togethercomputer/together-typescript/compare/v0.6.0-alpha.7...v0.6.0-alpha.8) + +### Features + +* **api:** OpenAPI spec update via Stainless API ([#48](https://github.com/togethercomputer/together-typescript/issues/48)) ([e382b4a](https://github.com/togethercomputer/together-typescript/commit/e382b4a8563479b5a0843d7613809454b5b9a16f)) + + +### Chores + +* run tsc as part of lint script ([#50](https://github.com/togethercomputer/together-typescript/issues/50)) ([3611348](https://github.com/togethercomputer/together-typescript/commit/361134866e071d7f02bf1a3377166a4a82e08191)) + ## 0.6.0-alpha.7 (2024-08-28) Full Changelog: [v0.6.0-alpha.6...v0.6.0-alpha.7](https://github.com/togethercomputer/together-typescript/compare/v0.6.0-alpha.6...v0.6.0-alpha.7) diff --git a/package.json b/package.json index 04acdbb..9e7437d 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "together-ai", - "version": "0.6.0-alpha.7", + "version": "0.6.0-alpha.8", "description": "The official TypeScript library for the Together API", "author": "Together ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index b040a91..a77c75f 100755 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.6.0-alpha.7'; // x-release-please-version +export const VERSION = '0.6.0-alpha.8'; // x-release-please-version