From 098604ec6f5f8dd43dd0d5e5d6b9424e974a3471 Mon Sep 17 00:00:00 2001 From: Xavier Portilla Edo Date: Tue, 22 Oct 2024 19:47:48 -0400 Subject: [PATCH] feat: added new models (#63) --- src/github_llms.ts | 91 ++++++++++++++++++++++++++++++++++++++++++++-- src/index.ts | 6 +++ 2 files changed, 94 insertions(+), 3 deletions(-) diff --git a/src/github_llms.ts b/src/github_llms.ts index 868b497..1e68b22 100644 --- a/src/github_llms.ts +++ b/src/github_llms.ts @@ -189,6 +189,38 @@ export const metaLlama318bInstruct = modelRef({ configSchema: GenerationCommonConfigSchema, }); +export const metaLlama3211bVisionInstruct = modelRef({ + name: "github/meta-llama-3.2-11b-vision-instruct", + info: { + versions: ["Llama-3.2-11B-Vision-Instruct"], + label: "Meta - Llama-3.2-11b-vision-instructt", + supports: { + multiturn: true, + tools: true, + media: true, + systemRole: true, + output: ["text", "json"], + }, + }, + configSchema: GenerationCommonConfigSchema, +}); + +export const metaLlama3290bVisionInstruct = modelRef({ + name: "github/meta-llama-3.2-90b-vision-instruct", + info: { + versions: ["Llama-3.2-90B-Vision-Instruct"], + label: "Meta - Llama-3.2-90b-vision-instructt", + supports: { + multiturn: true, + tools: true, + media: true, + systemRole: true, + output: ["text", "json"], + }, + }, + configSchema: GenerationCommonConfigSchema, +}); + export const cohereCommandR = modelRef({ name: "github/cohere-command-r", info: { @@ -205,6 +237,22 @@ export const cohereCommandR = modelRef({ configSchema: GenerationCommonConfigSchema, }); +export const cohereCommandR082024 = modelRef({ + name: "github/cohere-command-r", + info: { + versions: ["Cohere-command-r-08-2024"], + label: "Cohere - Command-r-08-2024", + supports: { + multiturn: true, + tools: true, + media: false, + systemRole: true, + output: ["text", "json"], + }, + }, + configSchema: GenerationCommonConfigSchema, +}); + export const cohereCommandRPlus = modelRef({ name: "github/cohere-command-r-plus", info: { @@ -221,6 +269,22 @@ export const cohereCommandRPlus = modelRef({ configSchema: GenerationCommonConfigSchema, }); +export const cohereCommandRPlus082024 = modelRef({ + name: "github/cohere-command-r", + info: { + versions: ["Cohere-command-r-plus-08-2024"], + label: "Cohere - Command-r-plus-08-2024", + supports: { + multiturn: true, + tools: true, + media: false, + systemRole: true, + output: ["text", "json"], + }, + }, + configSchema: GenerationCommonConfigSchema, +}); + export const mistralSmall = modelRef({ name: "github/mistral-small", info: { @@ -398,9 +462,9 @@ export const microsoftPhi3Medium4kInstruct = modelRef({ }); export const microsoftPhi35Mini128kInstruct = modelRef({ - name: "github/phi-3.5-mini-128k-instruct", + name: "github/phi-3.5-mini-instruct", info: { - versions: ["Phi-3.5-mini-128k-instruct"], + versions: ["Phi-3.5-mini-instruct"], label: "Microsoft - Phi-3.5-mini-128k-instruct", supports: { multiturn: true, @@ -413,6 +477,22 @@ export const microsoftPhi35Mini128kInstruct = modelRef({ configSchema: GenerationCommonConfigSchema, }); +export const microsoftPhi35MoE128kInstruct = modelRef({ + name: "github/phi-3.5-moe-instruct", + info: { + versions: ["Phi-3.5-moe-instruct"], + label: "Microsoft - Phi-3.5-moe-128k-instruct", + supports: { + multiturn: true, + tools: true, + media: false, + systemRole: true, + output: ["text", "json"], + }, + }, + configSchema: GenerationCommonConfigSchema, +}); + export const SUPPORTED_GITHUB_MODELS: Record = { "gpt-4o": openAIGpt4o, "gpt-4o-mini": openAIGpt4oMini, @@ -423,8 +503,12 @@ export const SUPPORTED_GITHUB_MODELS: Record = { "meta-llama-3.1-405b-instruct": metaLlama31405bInstruct, "meta-llama-3.1-70b-instruct": metaLlama3170bInstruct, "meta-llama-3.1-8b-instruct": metaLlama318bInstruct, + "Llama-3.2-11B-Vision-Instruct": metaLlama3211bVisionInstruct, + "Llama-3.2-90B-Vision-Instruct": metaLlama3290bVisionInstruct, "cohere-command-r": cohereCommandR, "cohere-command-r-plus": cohereCommandRPlus, + "cohere-command-r-08-2024": cohereCommandR082024, + "cohere-command-r-plus-08-2024": cohereCommandRPlus082024, "Mistral-small": mistralSmall, "Mistral-large": mistralLarge, "Mistral-large-2407": mistralLarge2407, @@ -436,7 +520,8 @@ export const SUPPORTED_GITHUB_MODELS: Record = { "Phi-3-small-8k-instruct": microsoftPhi3Small8kInstruct, "Phi-3-small-128k-instruct": microsoftPhi3Small128kInstruct, "Phi-3-medium-4k-instruct": microsoftPhi3Medium4kInstruct, - "Phi-3.5-mini-128k-instruct": microsoftPhi35Mini128kInstruct, + "Phi-3.5-mini-instruct": microsoftPhi35Mini128kInstruct, + "Phi-3.5-moe-instruct": microsoftPhi35MoE128kInstruct, }; function toGithubRole(role: Role): string { diff --git a/src/index.ts b/src/index.ts index 3907054..4232d19 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,7 @@ import { genkitPlugin, Plugin } from "@genkit-ai/core"; import ModelClient from "@azure-rest/ai-inference"; import { AzureKeyCredential } from "@azure/core-auth"; +import { microsoftPhi35MoE128kInstruct, cohereCommandR082024, cohereCommandRPlus082024, metaLlama3211bVisionInstruct, metaLlama3290bVisionInstruct } from './github_llms'; import { githubModel, openAIGpt4o, @@ -47,8 +48,12 @@ export { metaLlama31405bInstruct, metaLlama3170bInstruct, metaLlama318bInstruct, + metaLlama3211bVisionInstruct, + metaLlama3290bVisionInstruct, cohereCommandRPlus, cohereCommandR, + cohereCommandR082024, + cohereCommandRPlus082024, mistralSmall, mistralLarge, mistralLarge2407, @@ -61,6 +66,7 @@ export { microsoftPhi3Small128kInstruct, microsoftPhi3Medium4kInstruct, microsoftPhi35Mini128kInstruct, + microsoftPhi35MoE128kInstruct }; export {