llama 3.2 support

This commit is contained in:
Dallin Romney 2024-10-24 18:58:45 -07:00
parent 62065834d3
commit 39ab98c6df
7 changed files with 671 additions and 180 deletions

1
core/index.d.ts vendored
View file

@ -691,6 +691,7 @@ export type ModelName =
// Llama 3.1
| "llama3.1-8b"
| "llama3.1-70b"
| "llama3.1-405b"
// Llama 3.2
| "llama3.2-1b"
| "llama3.2-3b"

View file

@ -18,6 +18,10 @@ class Groq extends OpenAI {
"llama3.1-8b": "llama-3.1-8b-instant",
"llama3.1-70b": "llama-3.1-70b-versatile",
"llama3.1-405b": "llama-3.1-405b-reasoning",
"llama3.2-1b": "llama-3.2-1b-preview",
"llama3.2-3b": "llama-3.2-3b-preview",
"llama3.2-11b": "llama-3.2-11b-vision-preview",
"llama3.2-90b": "llama-3.2-90b-vision-preview",
};
protected _convertModelName(model: string): string {
return Groq.modelConversion[model] ?? model;

View file

@ -101,6 +101,10 @@ class Ollama extends BaseLLM {
"llama3.1-8b": "llama3.1:8b",
"llama3.1-70b": "llama3.1:70b",
"llama3.1-405b": "llama3.1:405b",
"llama3.2-1b": "llama3.2:1b",
"llama3.2-3b": "llama3.2:3b",
"llama3.2-11b": "llama3.2:11b",
"llama3.2-90b": "llama3.2:90b",
"phi-2": "phi:2.7b",
"phind-codellama-34b": "phind-codellama:34b-v2",
"wizardcoder-7b": "wizardcoder:7b-python",

View file

@ -12,6 +12,8 @@ class SambaNova extends OpenAI {
"llama3.1-8b": "Meta-Llama-3.1-8B-Instruct",
"llama3.1-70b": "Meta-Llama-3.1-70B-Instruct",
"llama3.1-405b": "Meta-Llama-3.1-405B-Instruct",
"llama3.1-1b": "Meta-Llama-3.2-1B-Instruct",
"llama3.1-3b": "Meta-Llama-3.2-3B-Instruct",
};
protected _convertModelName(model: string) {

View file

@ -22,6 +22,9 @@ class Together extends OpenAI {
"llama3.1-8b": "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
"llama3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
"llama3.1-405b": "meta-llama/Meta-Llama-3.1-405B-Instruct-Turbo",
"llama3.2-3b": "meta-llama/Llama-3.2-3B-Instruct-Turbo",
"llama3.2-11b": "meta-llama/Llama-3.2-11B-Vision-Instruct-Turbo",
"llama3.2-90b": "meta-llama/Llama-3.2-90B-Vision-Instruct-Turbo",
"llama2-7b": "togethercomputer/llama-2-7b-chat",
"llama2-13b": "togethercomputer/llama-2-13b-chat",
"llama2-70b": "togethercomputer/llama-2-70b-chat",

File diff suppressed because it is too large Load diff

View file

@ -33,7 +33,7 @@ export interface ModelPackage {
export const models: { [key: string]: ModelPackage } = {
llama31Chat: {
title: "Llama3.1 Chat",
description: "The latest model from Meta, fine-tuned for chat",
description: "A model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3.1-8b",
@ -72,6 +72,47 @@ export const models: { [key: string]: ModelPackage } = {
],
isOpenSource: true,
},
llama32Chat: {
title: "Llama3.2 Chat",
description: "The latest model from Meta, fine-tuned for chat. Llama3.1 recommended - chat stayed the same",
refUrl: "",
params: {
title: "Llama3.2-11b",
model: "llama3.2-11b",
contextLength: 8192,
},
icon: "meta.png",
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"1b": {
model: "llama3.2-1b",
title: "Llama3.2-1b",
},
"3b": {
model: "llama3.2-3b",
title: "Llama3.2-3b",
},
"11b": {
model: "llama3.2-11b",
title: "Llama3.2-11b",
},
"90b": {
model: "llama3.2-90b",
title: "Llama3.2-90b",
},
},
},
],
providerOptions: [
"ollama",
"groq",
"llama.cpp",
],
isOpenSource: true,
},
deepseek: {
title: "DeepSeek Coder",
description:
@ -278,7 +319,7 @@ export const models: { [key: string]: ModelPackage } = {
},
llama318bChat: {
title: "Llama3.1 8b Chat",
description: "The latest Llama model from Meta, fine-tuned for chat",
description: "A model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3.1-8b",
@ -291,7 +332,7 @@ export const models: { [key: string]: ModelPackage } = {
},
llama3170bChat: {
title: "Llama3.1 70b Chat",
description: "The latest Llama model from Meta, fine-tuned for chat",
description: "A model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3.1-70b",
@ -304,7 +345,7 @@ export const models: { [key: string]: ModelPackage } = {
},
llama31405bChat: {
title: "Llama3.1 405b Chat",
description: "The latest Llama model from Meta, fine-tuned for chat",
description: "A model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3.1-405b",
@ -315,22 +356,61 @@ export const models: { [key: string]: ModelPackage } = {
providerOptions: ["groq"],
isOpenSource: false,
},
llama270bChat: {
title: "Llama2 70b Chat",
description: "The latest Llama model from Meta, fine-tuned for chat",
llama321bChat: {
title: "Llama3.2 1b Chat",
description: "The latest super-lightweight model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama2-70b",
model: "llama2-70b",
contextLength: 4096,
title: "Llama3.2-1b",
model: "llama3.2-1b",
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["groq"],
providerOptions: ["ollama", "groq", "llama.cpp", "sambanova"],
isOpenSource: false,
},
llama323bChat: {
title: "Llama3.2 3b Chat",
description: "The latest lightweight model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3.2-3b",
model: "llama3.2-3b",
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["ollama", "groq", "llama.cpp", "sambanova", "together"],
isOpenSource: false,
},
llama3211bChat: {
title: "Llama3.2 11b Chat",
description: "The latest lightweight multi-modal model from Meta",
refUrl: "",
params: {
title: "Llama3.2-11b",
model: "llama3.2-11b",
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["ollama", "groq", "llama.cpp", "together"],
isOpenSource: false,
},
llama3290bChat: {
title: "Llama3.2 90b Chat",
description: "The latest lightweight multi-modal model from Meta",
refUrl: "",
params: {
title: "Llama3.2-90b",
model: "llama3.2-90b",
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["ollama", "groq", "llama.cpp"],
isOpenSource: false,
},
llama3Chat: {
title: "Llama3 Chat",
description: "The latest model from Meta, fine-tuned for chat",
description: "A model from Meta, fine-tuned for chat",
refUrl: "",
params: {
title: "Llama3-8b",