Merge pull request #2666 from continuedev/dallin/llama-3.2

This commit is contained in:
Nate Sesti 2024-10-24 22:18:36 -07:00 • committed by GitHub
commit ce83a85cc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 1850 additions and 540 deletions

View file

@ -6,6 +6,7 @@ import generateRepoMap from "../../util/generateRepoMap";
const SUPPORTED_MODEL_TITLE_FAMILIES = [
"claude-3",
"llama3.1",
"llama3.2",
"gemini-1.5",
"gpt-4",
];

6
core/index.d.ts vendored
View file

@ -691,6 +691,12 @@ export type ModelName =
// Llama 3.1
| "llama3.1-8b"
| "llama3.1-70b"
| "llama3.1-405b"
// Llama 3.2
| "llama3.2-1b"
| "llama3.2-3b"
| "llama3.2-11b"
| "llama3.2-90b"
// Other Open-source
| "phi2"
| "phind-codellama-34b"

View file

@ -79,6 +79,7 @@ const MODEL_SUPPORTS_IMAGES: string[] = [
"opus",
"haiku",
"pixtral",
"llama3.2",
];
function modelSupportsImages(

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",

View file

@ -75,4 +75,4 @@ If you need to force a refresh of the index, reload the VS Code window with `cmd
## Repository map
Models in the Claude 3, Llama 3.1, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context-providers.md#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase.
Models in the Claude 3, Llama 3.1/3.2, Gemini 1.5, and GPT-4o families will automatically use a [repository map](../context-providers.md#repository-map) during codebase retrieval, which allows the model to understand the structure of your codebase and use it to answer questions. Currently, the repository map only contains the filepaths in the codebase.

View file

@ -1,6 +1,6 @@
# Cerebras Inference
Cerebras Inference uses specialized silicon to provides fast inference for the Llama3.1 8B and Llama3.1 70B models.
Cerebras Inference uses specialized silicon to provides fast inference.
1. Create an account in the portal [here](https://cloud.cerebras.ai/).
2. Create and copy the API key for use in Continue.

View file

@ -4,7 +4,7 @@ description: How to use Llama 3.1 with Continue
keywords: [llama, meta, togetherai, ollama, replicate]
---
Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models.
Continue makes it easy to code with the latest open-source models, including the entire Llama 3.1 family of models. Llama 3.2 models are also supported but not recommended for chat, because they are specifically designed to be small or multi-modal.
If you haven't already installed Continue, you can do that [here for VS Code](https://marketplace.visualstudio.com/items?itemName=Continue.continue) or [here for JetBrains](https://plugins.jetbrains.com/plugin/22707-continue). For more general information on customizing Continue, read [our customization docs](../overview.md).

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -670,16 +670,16 @@
"anyOf": [
{
"enum": [
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b",
"llama2-7b",
"llama2-13b",
"llama3-8b",
"llama3-70b",
"codellama-7b",
"codellama-13b",
"codellama-34b",
"llama2-7b",
"llama2-13b"
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b"
]
},
{
@ -1071,6 +1071,9 @@
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b",
"llama3.2-3b",
"llama3.2-11b",
"llama3.2-90b",
"codellama-7b",
"codellama-13b",
"codellama-34b",
@ -1144,6 +1147,10 @@
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b",
"llama3.2-1b",
"llama3.2-3b",
"llama3.2-11b",
"llama3.2-90b",
"phind-codellama-34b",
"wizardcoder-7b",
"wizardcoder-13b",
@ -1199,6 +1206,10 @@
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b",
"llama3.2-1b",
"llama3.2-3b",
"llama3.2-11b",
"llama3.2-90b",
"phi-2",
"phind-codellama-34b",
"wizardcoder-7b",
@ -1353,6 +1364,10 @@
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b",
"llama3.2-1b",
"llama3.2-3b",
"llama3.2-11b",
"llama3.2-90b",
"AUTODETECT"
]
}
@ -1578,6 +1593,10 @@
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b",
"llama3.2-1b",
"llama3.2-3b",
"llama3.2-11b",
"llama3.2-90b",
"phind-codellama-34b",
"wizardcoder-7b",
"wizardcoder-13b",
@ -1689,7 +1708,9 @@
"enum": [
"llama3.1-8b",
"llama3.1-70b",
"llama3.1-405b"
"llama3.1-405b",
"llama3.2-1b",
"llama3.2-3b"
]
},
{

View file

@ -30,8 +30,7 @@ export async function showTutorial() {
}
export class VsCodeWebviewProtocol
implements IMessenger<FromWebviewProtocol, ToWebviewProtocol>
{
implements IMessenger<FromWebviewProtocol, ToWebviewProtocol> {
listeners = new Map<
keyof FromWebviewProtocol,
((message: Message) => any)[]
@ -125,7 +124,7 @@ export class VsCodeWebviewProtocol
message = message.split("\n").filter((l: string) => l !== "")[1];
try {
message = JSON.parse(message).message;
} catch {}
} catch { }
if (message.includes("exceeded")) {
message +=
" To keep using Continue, you can set up a local model or use your own API key.";
@ -179,7 +178,7 @@ export class VsCodeWebviewProtocol
});
}
constructor(private readonly reloadConfig: () => void) {}
constructor(private readonly reloadConfig: () => void) { }
invoke<T extends keyof FromWebviewProtocol>(
messageType: T,
data: FromWebviewProtocol[T][0],

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

View file

@ -79,13 +79,13 @@ export const StyledListboxOptions = styled(Listbox.Options)`
}
`;
export const StyledListboxOption = styled(Listbox.Option)<{
export const StyledListboxOption = styled(Listbox.Option) <{
selected: boolean;
}>`
background-color: ${({ selected }) =>
selected ? vscListActiveBackground : vscInputBackground};
cursor: pointer;
padding: 6px 8px;
padding: 6px 8px 6px 12px;
display: flex;
gap: 8px;
@ -121,11 +121,10 @@ function ModelSelectionListbox({
{window.vscMediaUrl && selectedProvider.icon && (
<img
src={`${window.vscMediaUrl}/logos/${selectedProvider.icon}`}
height="24px"
style={{ marginRight: "10px" }}
className="object-contain w-4 h-4 object-center mr-3"
/>
)}
<span className="text-md">{selectedProvider.title}</span>
<span className="text-xs">{selectedProvider.title}</span>
</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon
@ -145,24 +144,23 @@ function ModelSelectionListbox({
<StyledListboxOption
selected={selectedProvider.title === option.title}
key={index}
className="relative cursor-default select-none py-2 pl-10 pr-4 text-gray-400"
className="relative cursor-default select-none py-2 pr-4 text-gray-400"
value={option}
>
{({ selected }) => (
<>
{option.title === "Autodetect" ? (
<CubeIcon className="mr-2.5 h-6 w-6 text-gray-400" />
<CubeIcon className="mr-2 w-4 h-4 text-gray-400" />
) : (
window.vscMediaUrl &&
option.icon && (
<img
src={`${window.vscMediaUrl}/logos/${option.icon}`}
height="24px"
style={{ marginRight: "10px" }}
className="object-contain w-4 h-4 object-center mr-1"
/>
)
)}
<span className="text-md">{option.title}</span>
<span className="text-xs">{option.title}</span>
{selected && (
<span className="inset-y-0 ml-auto flex items-center pl-3">

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",

View file

@ -572,7 +572,7 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
title: "SambaNova Cloud",
provider: "sambanova",
refPage: "sambanova",
description: "Use SambaNova Cloud for Llama3.1 fast inference performance",
description: "Use SambaNova Cloud for fast inference performance",
icon: "sambanova.png",
longDescription: `The SambaNova Cloud is a cloud platform for running large AI models with the world record Llama 3.1 70B/405B performance. You can sign up [here](https://cloud.sambanova.ai/)`,
tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource],