diff --git a/core/llm/llms/Cerebras.ts b/core/llm/llms/Cerebras.ts index 103994221..4b0a1752c 100644 --- a/core/llm/llms/Cerebras.ts +++ b/core/llm/llms/Cerebras.ts @@ -10,7 +10,7 @@ class Cerebras extends OpenAI { private static modelConversion: { [key: string]: string } = { "llama3.1-8b": "llama3.1-8b", - "llama3.1-70b": "llama-3.1-70b", + "llama3.1-70b": "llama3.1-70b", }; protected _convertModelName(model: string): string { return Cerebras.modelConversion[model] ?? model; diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 77de3cf8a..87b026e38 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -194,7 +194,8 @@ "openrouter", "sambanova", "nvidia", - "vllm" + "vllm", + "cerebras" ], "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)", @@ -224,7 +225,8 @@ "### IBM 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.", "### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).", "### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)", - "### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server." + "### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.", + "### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/)." ], "type": "string" }, @@ -1142,6 +1144,23 @@ } } }, + { + "if": { + "properties": { + "provider": { + "enum": ["cerebras"] + } + }, + "required": ["provider"] + }, + "then": { + "properties": { + "model": { + "enum": ["llama3.1-8b", "llama3.1-70b"] + } + } + } + }, { "if": { "properties": { diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 21f27ca4a..00ac4ff95 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -197,7 +197,8 @@ "openrouter", "sambanova", "nvidia", - "vllm" + "vllm", + "cerebras" ], "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)", @@ -227,7 +228,8 @@ "### IBM 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.", "### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).", "### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)", - "### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server." + "### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.", + "### Cerebras\nCerebras Inference uses specialized silicon to provides superfast inference. To get started, get your API keys from [their console](https://cloud.cerebras.ai/)." ], "type": "string" }, @@ -1265,6 +1267,30 @@ } } }, + { + "if": { + "properties": { + "provider": { + "enum": [ + "cerebras" + ] + } + }, + "required": [ + "provider" + ] + }, + "then": { + "properties": { + "model": { + "enum": [ + "llama3.1-8b", + "llama3.1-70b" + ] + } + } + } + }, { "if": { "properties": { diff --git a/gui/public/logos/cerebras.png b/gui/public/logos/cerebras.png new file mode 100644 index 000000000..024dc5b7d Binary files /dev/null and b/gui/public/logos/cerebras.png differ diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 5a70ad8d1..f3e0b9cfe 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -68,6 +68,7 @@ export const models: { [key: string]: ModelPackage } = { "llama.cpp", "replicate", "sambanova", + "cerebras", ], isOpenSource: true, }, diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 155905fbc..1bca2efff 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -595,4 +595,35 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo }), apiKeyUrl: "https://cloud.sambanova.ai/apis", }, + cerebras: { + title: "Cerebras", + provider: "cerebras", + icon: "cerebras.png", + description: + "Cerebras Inference is a custom silicon for fast inference of LLM models.", + longDescription: + "Get your API key [here](https://cloud.cerebras.ai/).", + tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource], + collectInputFor: [ + { + inputType: "text", + key: "apiKey", + label: "API Key", + placeholder: "Enter your Cerebras API key", + required: true, + }, + ], + packages: [ + models.llama3170bChat, + models.llama318bChat, + { + ...models.AUTODETECT, + params: { + ...models.AUTODETECT.params, + title: "Cerebras", + }, + }, + ], + apiKeyUrl: "https://cloud.cerebras.ai/", + }, };