From 8ef759fe0ff69da45e708a6669f82d854a6d6edb Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Wed, 24 Jul 2024 20:54:42 -0700 Subject: [PATCH 1/3] Groq: update Models --- src/modules/llms/server/openai/models.data.ts | 69 ++++++++++++++----- 1 file changed, 52 insertions(+), 17 deletions(-) diff --git a/src/modules/llms/server/openai/models.data.ts b/src/modules/llms/server/openai/models.data.ts index 2eeabf5d8..35405e30a 100644 --- a/src/modules/llms/server/openai/models.data.ts +++ b/src/modules/llms/server/openai/models.data.ts @@ -886,41 +886,76 @@ export function perplexityAIModelSort(a: ModelDescriptionSchema, b: ModelDescrip const _knownGroqModels: ManualMappings = [ { isLatest: true, + idPrefix: 'llama-3.1-405b-reasoning', + label: 'Llama 3.1 · 405B', + description: 'LLaMA 3.1 405B developed by Meta with a context window of 131,072 tokens. Supports tool use.', + contextWindow: 131072, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + }, + { + isLatest: true, + idPrefix: 'llama-3.1-70b-versatile', + label: 'Llama 3.1 · 70B', + description: 'LLaMA 3.1 70B developed by Meta with a context window of 131,072 tokens. Supports tool use.', + contextWindow: 131072, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + }, + { + isLatest: true, + idPrefix: 'llama-3.1-8b-instant', + label: 'Llama 3.1 · 8B', + description: 'LLaMA 3.1 8B developed by Meta with a context window of 131,072 tokens. Supports tool use.', + contextWindow: 131072, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + }, + { + idPrefix: 'llama3-groq-70b-8192-tool-use-preview', + label: 'Llama 3 Groq · 70B Tool Use', + description: 'LLaMA 3 70B Tool Use developed by Groq with a context window of 8,192 tokens. Optimized for tool use.', + contextWindow: 8192, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + }, + { + idPrefix: 'llama3-groq-8b-8192-tool-use-preview', + label: 'Llama 3 Groq · 8B Tool Use', + description: 'LLaMA 3 8B Tool Use developed by Groq with a context window of 8,192 tokens. Optimized for tool use.', + contextWindow: 8192, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + }, + { idPrefix: 'llama3-70b-8192', label: 'Llama 3 · 70B', - description: 'LLaMA3 70b developed by Meta with a context window of 8,192 tokens.', + description: 'LLaMA3 70B developed by Meta with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, - interfaces: [LLM_IF_OAI_Chat], + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { - // isLatest: true, idPrefix: 'llama3-8b-8192', label: 'Llama 3 · 8B', - description: 'LLaMA3 8b developed by Meta with a context window of 8,192 tokens.', + description: 'LLaMA3 8B developed by Meta with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, - interfaces: [LLM_IF_OAI_Chat], - }, - { - idPrefix: 'llama2-70b-4096', - label: 'Llama 2 · 70B', - description: 'LLaMA2 70b developed by Meta with a context window of 4,096 tokens.', - contextWindow: 4096, - interfaces: [LLM_IF_OAI_Chat], - hidden: true, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { idPrefix: 'mixtral-8x7b-32768', label: 'Mixtral 8x7B', - description: 'Mixtral 8x7b developed by Mistral with a context window of 32,768 tokens.', + description: 'Mixtral 8x7B developed by Mistral with a context window of 32,768 tokens. Supports tool use.', contextWindow: 32768, - interfaces: [LLM_IF_OAI_Chat], + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { idPrefix: 'gemma-7b-it', label: 'Gemma 1.1 · 7B Instruct', - description: 'Gemma 7b developed by Google with a context window of 8,192 tokens.', + description: 'Gemma 7B developed by Google with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, - interfaces: [LLM_IF_OAI_Chat], + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + }, + { + idPrefix: 'gemma2-9b-it', + label: 'Gemma 2 · 9B Instruct', + description: 'Gemma 2 9B developed by Google with a context window of 8,192 tokens. Supports tool use.', + contextWindow: 8192, + interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, ]; From 45c09d021a157e20669466185de2715c78b37699 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Wed, 24 Jul 2024 21:10:08 -0700 Subject: [PATCH 2/3] Groq: update output tokens (max 8,000 for 3.1) --- src/modules/llms/server/openai/models.data.ts | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/src/modules/llms/server/openai/models.data.ts b/src/modules/llms/server/openai/models.data.ts index 35405e30a..d108b789c 100644 --- a/src/modules/llms/server/openai/models.data.ts +++ b/src/modules/llms/server/openai/models.data.ts @@ -890,6 +890,7 @@ const _knownGroqModels: ManualMappings = [ label: 'Llama 3.1 · 405B', description: 'LLaMA 3.1 405B developed by Meta with a context window of 131,072 tokens. Supports tool use.', contextWindow: 131072, + maxCompletionTokens: 8000, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { @@ -898,6 +899,7 @@ const _knownGroqModels: ManualMappings = [ label: 'Llama 3.1 · 70B', description: 'LLaMA 3.1 70B developed by Meta with a context window of 131,072 tokens. Supports tool use.', contextWindow: 131072, + maxCompletionTokens: 8000, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { @@ -906,6 +908,7 @@ const _knownGroqModels: ManualMappings = [ label: 'Llama 3.1 · 8B', description: 'LLaMA 3.1 8B developed by Meta with a context window of 131,072 tokens. Supports tool use.', contextWindow: 131072, + maxCompletionTokens: 8000, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { @@ -928,6 +931,8 @@ const _knownGroqModels: ManualMappings = [ description: 'LLaMA3 70B developed by Meta with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + // isLegacy: true, + hidden: true, }, { idPrefix: 'llama3-8b-8192', @@ -935,6 +940,8 @@ const _knownGroqModels: ManualMappings = [ description: 'LLaMA3 8B developed by Meta with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + // isLegacy: true, + hidden: true, }, { idPrefix: 'mixtral-8x7b-32768', @@ -943,13 +950,6 @@ const _knownGroqModels: ManualMappings = [ contextWindow: 32768, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, - { - idPrefix: 'gemma-7b-it', - label: 'Gemma 1.1 · 7B Instruct', - description: 'Gemma 7B developed by Google with a context window of 8,192 tokens. Supports tool use.', - contextWindow: 8192, - interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], - }, { idPrefix: 'gemma2-9b-it', label: 'Gemma 2 · 9B Instruct', @@ -957,6 +957,14 @@ const _knownGroqModels: ManualMappings = [ contextWindow: 8192, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, + { + idPrefix: 'gemma-7b-it', + label: 'Gemma 1.1 · 7B Instruct', + description: 'Gemma 7B developed by Google with a context window of 8,192 tokens. Supports tool use.', + contextWindow: 8192, + interfaces: [LLM_IF_OAI_Chat], + hidden: true, + }, ]; export function groqModelToModelDescription(_model: unknown): ModelDescriptionSchema { @@ -972,6 +980,11 @@ export function groqModelToModelDescription(_model: unknown): ModelDescriptionSc } export function groqModelSortFn(a: ModelDescriptionSchema, b: ModelDescriptionSchema): number { + // sort hidden at the end + if (a.hidden && !b.hidden) + return 1; + if (!a.hidden && b.hidden) + return -1; // sort as per their order in the known models const aIndex = _knownGroqModels.findIndex(base => a.id.startsWith(base.idPrefix)); const bIndex = _knownGroqModels.findIndex(base => b.id.startsWith(base.idPrefix)); From 3b4d5691d7cdaf037aa5ae3ebd0a33bd993fa05a Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Wed, 24 Jul 2024 20:49:14 -0700 Subject: [PATCH 3/3] 1.16.6: Release. Fixes #604 --- README.md | 3 ++- docs/changelog.md | 3 ++- src/apps/news/news.data.tsx | 3 ++- src/apps/news/news.version.tsx | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index df3be089b..6a1202b39 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,9 @@ Or fork & run on Vercel [//]: # (big-AGI is an open book; see the **[ready-to-ship and future ideas](https://github.com/users/enricoros/projects/4/views/2)** in our open roadmap) -### What's New in 1.16.1...1.16.5 · Jul 18, 2024 (patch releases) +### What's New in 1.16.1...1.16.6 · Jul 25, 2024 (patch releases) +- 1.16.6: Groq support for Llama 3.1 models - 1.16.5: GPT-4o Mini support - 1.16.4: 8192 tokens support for Claude 3.5 Sonnet - 1.16.3: Anthropic Claude 3.5 Sonnet model support diff --git a/docs/changelog.md b/docs/changelog.md index 5d6f35db7..2ce8e7fff 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -10,8 +10,9 @@ by release. - milestone: [1.17.0](https://github.com/enricoros/big-agi/milestone/17) - work in progress: [big-AGI open roadmap](https://github.com/users/enricoros/projects/4/views/2), [help here](https://github.com/users/enricoros/projects/4/views/4) -### What's New in 1.16.1...1.16.5 · Jul 18, 2024 (patch releases) +### What's New in 1.16.1...1.16.6 · Jul 25, 2024 (patch releases) +- 1.16.6: Groq support for Llama 3.1 models - 1.16.5: GPT-4o Mini support - 1.16.4: 8192 tokens support for Claude 3.5 Sonnet - 1.16.3: Anthropic Claude 3.5 Sonnet model support diff --git a/src/apps/news/news.data.tsx b/src/apps/news/news.data.tsx index f67a63f95..8dff6dc7d 100644 --- a/src/apps/news/news.data.tsx +++ b/src/apps/news/news.data.tsx @@ -61,7 +61,7 @@ export const NewsItems: NewsItem[] = [ ] }*/ { - versionCode: '1.16.5', + versionCode: '1.16.6', versionName: 'Crystal Clear', versionDate: new Date('2024-06-07T05:00:00Z'), // versionDate: new Date('2024-05-13T19:00:00Z'), @@ -82,6 +82,7 @@ export const NewsItems: NewsItem[] = [ { text: <>1.16.3: Support for Claude 3.5 Sonnet (refresh your Anthropic models) }, { text: <>1.16.4: 8192 tokens support for Claude 3.5 Sonnet }, { text: <>1.16.5: OpenAI GPT-4o Mini support }, + { text: <>1.16.6: Groq Llama 3.1 support }, ], }, { diff --git a/src/apps/news/news.version.tsx b/src/apps/news/news.version.tsx index 20f6e8ef6..12cece6b3 100644 --- a/src/apps/news/news.version.tsx +++ b/src/apps/news/news.version.tsx @@ -7,7 +7,7 @@ import { useAppStateStore } from '~/common/state/store-appstate'; // update this variable every time you want to broadcast a new version to clients -export const incrementalNewsVersion: number = 16.1; // not notifying for 1.16.5 +export const incrementalNewsVersion: number = 16.1; // not notifying for 1.16.6 interface NewsState {