support for granite models

This commit is contained in:
Nate Sesti 2024-08-02 11:12:27 -07:00
parent 24e56f15dc
commit 81089726ec
6 changed files with 187 additions and 6 deletions

View file

@ -106,6 +106,10 @@ class Ollama extends BaseLLM {
"starcoder-3b": "starcoder:3b",
"starcoder2-3b": "starcoder2:3b",
"stable-code-3b": "stable-code:3b",
"granite-code-3b": "granite-code:3b",
"granite-code-8b": "granite-code:8b",
"granite-code-20b": "granite-code:20b",
"granite-code-34b": "granite-code:34b",
}[this.model] ?? this.model
);
}

View file

@ -187,7 +187,8 @@
"cloudflare",
"deepseek",
"azure",
"msty"
"msty",
"watsonx"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -211,7 +212,8 @@
"### Cloudflare Workers AI\n\n[Reference](https://developers.cloudflare.com/workers-ai/)",
"### Deepseek\n Deepseek's API provides the best pricing for their state-of-the-art Deepseek Coder models. To get started, obtain an API key from [their console](https://platform.deepseek.com/api_keys)",
"### Azure OpenAI\n Azure OpenAI lets you securely run OpenAI's models on Azure. To get started, follow the steps [here](https://docs.continue.dev/reference/Model%20Providers/azure)",
"### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)"
"### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)",
"### WatsonX\nWatsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks."
],
"type": "string"
},
@ -1185,6 +1187,48 @@
}
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": ["watsonx"]
}
},
"required": ["provider"]
},
"then": {
"properties": {
"watsonxUrl": {
"type": "string"
},
"watsonxApiKey": {
"type": "string"
},
"watsonxZenApiKeyBase64": {
"type": "string"
},
"watsonxUsername": {
"type": "string"
},
"watsonxPassword": {
"type": "string"
},
"watsonxProjectId": {
"type": "string"
},
"model": {
"enum": [
"ibm/granite-13b-chat-v2",
"ibm/granite-13b-instruct-v2",
"mistralai/mistral-large",
"meta-llama/llama-3-8b-instruct",
"meta-llama/llama-3-70b-instruct"
]
}
},
"required": ["watsonxUrl", "watsonxProjectId"]
}
}
]
},

View file

@ -187,7 +187,8 @@
"cloudflare",
"deepseek",
"azure",
"msty"
"msty",
"watsonx"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -211,7 +212,8 @@
"### Cloudflare Workers AI\n\n[Reference](https://developers.cloudflare.com/workers-ai/)",
"### Deepseek\n Deepseek's API provides the best pricing for their state-of-the-art Deepseek Coder models. To get started, obtain an API key from [their console](https://platform.deepseek.com/api_keys)",
"### Azure OpenAI\n Azure OpenAI lets you securely run OpenAI's models on Azure. To get started, follow the steps [here](https://docs.continue.dev/reference/Model%20Providers/azure)",
"### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)"
"### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)",
"### WatsonX\nWatsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks."
],
"type": "string"
},
@ -1185,6 +1187,48 @@
}
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": ["watsonx"]
}
},
"required": ["provider"]
},
"then": {
"properties": {
"watsonxUrl": {
"type": "string"
},
"watsonxApiKey": {
"type": "string"
},
"watsonxZenApiKeyBase64": {
"type": "string"
},
"watsonxUsername": {
"type": "string"
},
"watsonxPassword": {
"type": "string"
},
"watsonxProjectId": {
"type": "string"
},
"model": {
"enum": [
"ibm/granite-13b-chat-v2",
"ibm/granite-13b-instruct-v2",
"mistralai/mistral-large",
"meta-llama/llama-3-8b-instruct",
"meta-llama/llama-3-70b-instruct"
]
}
},
"required": ["watsonxUrl", "watsonxProjectId"]
}
}
]
},

View file

@ -190,7 +190,8 @@
"cloudflare",
"deepseek",
"azure",
"msty"
"msty",
"watsonx"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -214,7 +215,8 @@
"### Cloudflare Workers AI\n\n[Reference](https://developers.cloudflare.com/workers-ai/)",
"### Deepseek\n Deepseek's API provides the best pricing for their state-of-the-art Deepseek Coder models. To get started, obtain an API key from [their console](https://platform.deepseek.com/api_keys)",
"### Azure OpenAI\n Azure OpenAI lets you securely run OpenAI's models on Azure. To get started, follow the steps [here](https://docs.continue.dev/reference/Model%20Providers/azure)",
"### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)"
"### Msty\nMsty is the simplest way to get started with online or local LLMs on all desktop platforms - Windows, Mac, and Linux. No fussing around, one-click and you are up and running. To get started, follow these steps:\n1. Download from [Msty.app](https://msty.app/), open the application, and click 'Setup Local AI'.\n2. Go to the Local AI Module page and download a model of your choice.\n3. Once the model has finished downloading, you can start asking questions through Continue.\n> [Reference](https://continue.dev/docs/reference/Model%20Providers/Msty)",
"### WatsonX\nWatsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks."
],
"type": "string"
},
@ -1312,6 +1314,55 @@
}
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": [
"watsonx"
]
}
},
"required": [
"provider"
]
},
"then": {
"properties": {
"watsonxUrl": {
"type": "string"
},
"watsonxApiKey": {
"type": "string"
},
"watsonxZenApiKeyBase64": {
"type": "string"
},
"watsonxUsername": {
"type": "string"
},
"watsonxPassword": {
"type": "string"
},
"watsonxProjectId": {
"type": "string"
},
"model": {
"enum": [
"ibm/granite-13b-chat-v2",
"ibm/granite-13b-instruct-v2",
"mistralai/mistral-large",
"meta-llama/llama-3-8b-instruct",
"meta-llama/llama-3-70b-instruct"
]
}
},
"required": [
"watsonxUrl",
"watsonxProjectId"
]
}
}
]
},

BIN
gui/public/logos/ibm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View file

@ -361,6 +361,44 @@ export const models: { [key: string]: ModelPackage } = {
],
isOpenSource: true,
},
graniteCodeOpenSource: {
title: "Granite Code",
description:
"The Granite model series is a family of IBM-trained, dense decoder-only models, which are particularly well-suited for generative tasks.",
params: {
model: "granite-code",
contextLength: 20_000,
title: "Granite Code",
systemMessage: `You are Granite Chat, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior. You always respond to greetings (for example, hi, hello, g'day, morning, afternoon, evening, night, what's up, nice to meet you, sup, etc) with "Hello! I am Granite Chat, created by IBM. How can I help you today?". Please do not say anything else and do not start a conversation.`,
},
providerOptions: ["ollama", "lmstudio", "llama.cpp", "replicate"],
icon: "ibm.png",
isOpenSource: true,
dimensions: [
{
name: "Parameter Count",
description: "The number of parameters in the model",
options: {
"3b": {
model: "granite-code-3b",
title: "Granite Code 3B",
},
"8b": {
model: "granite-code-8b",
title: "Granite Code 8B",
},
"20b": {
model: "granite-code-20b",
title: "Granite Code 20B",
},
"34b": {
model: "granite-code-34b",
title: "Granite Code 34B",
},
},
},
],
},
wizardCoder: {
title: "WizardCoder",
description: