📝 recommend starcoder2

This commit is contained in:
Nate Sesti 2024-04-04 18:22:19 -07:00
parent c43bfca513
commit 1378ef8ee5
12 changed files with 67 additions and 38 deletions

View file

@ -124,7 +124,7 @@ export async function getTabCompletion(
llm.useLegacyCompletionsEndpoint = true;
} else if (llm.providerName === "free-trial") {
throw new Error(
"Free trial is not supported for tab-autocomplete. We recommend using starcoder with Ollama, LM Studio, or another provider.",
"Free trial is not supported for tab-autocomplete. We recommend using starcoder2 with Ollama, LM Studio, or another provider.",
);
}
if (!llm) return;

View file

@ -67,7 +67,7 @@ export const defaultConfig: SerializedContinueConfig = {
tabAutocompleteModel: {
title: "Starcoder 3b",
provider: "ollama",
model: "starcoder-3b",
model: "starcoder2:3b",
},
};

1
core/index.d.ts vendored
View file

@ -549,6 +549,7 @@ export type ModelName =
| "deepseek-1b"
| "starcoder-1b"
| "starcoder-3b"
| "starcoder2-3b"
| "stable-code-3b";
export interface RequestOptions {

View file

@ -89,6 +89,7 @@ class Ollama extends BaseLLM {
"neural-chat-7b": "neural-chat:7b-v3.3",
"starcoder-1b": "starcoder:1b",
"starcoder-3b": "starcoder:3b",
"starcoder2-3b": "starcoder2:3b",
"stable-code-3b": "stable-code:3b",
}[this.model] ?? this.model
);

View file

@ -7,7 +7,7 @@ Continue now provides support for tab autocomplete in [the VS Code extension](ht
We recommend setting up tab-autocomplete with a local Ollama instance. To do this, first download the latest version of Ollama from [here](https://ollama.ai). Then, run the following command to download our recommended model:
```bash
ollama run starcoder:3b
ollama run starcoder2:3b
```
Once it has been downloaded, you should begin to see completions in VS Code.
@ -21,7 +21,7 @@ All of the configuration options available for chat models are available to use
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "starcoder:3b",
"model": "starcoder2:3b",
"apiBase": "https://<my endpoint>"
},
...
@ -32,7 +32,7 @@ If you aren't yet familiar with the available options, you can learn more in our
### What model should I use?
If you are running the model locally, we recommend `starcoder:3b`.
If you are running the model locally, we recommend `starcoder2:3b`.
If you find it to be too slow, you should try `deepseek-coder:1.3b-base`.
@ -46,7 +46,7 @@ The following can be configured in `config.json`:
### `tabAutocompleteModel`
This is just another object like the ones in the `"models"` array of `config.json`. You can choose and configure any model you would like, but we strongly suggest using a small model made for tab-autocomplete, such as `deepseek-1b`, `starcoder-1b`, or `starcoder-3b`.
This is just another object like the ones in the `"models"` array of `config.json`. You can choose and configure any model you would like, but we strongly suggest using a small model made for tab-autocomplete, such as `deepseek-1b`, `starcoder-1b`, or `starcoder2-3b`.
### `tabAutocompleteOptions`
@ -68,7 +68,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"provider": "ollama",
"model": "starcoder:3b",
"model": "starcoder2:3b",
"apiBase": "https://<my endpoint>"
},
"tabAutocompleteOptions": {
@ -91,7 +91,7 @@ Follow these steps to ensure that everything is set up correctly:
1. Make sure you have the "Enable Tab Autocomplete" setting checked (in VS Code, you can toggle by clicking the "Continue" button in the status bar).
2. Make sure you have downloaded Ollama.
3. Run `ollama run starcoder:3b` to verify that the model is downloaded.
3. Run `ollama run starcoder2:3b` to verify that the model is downloaded.
4. Make sure that any other completion providers are disabled (e.g. Copilot), as they may interfere.
5. Make sure that you aren't also using another Ollama model for chat. This will cause Ollama to constantly load and unload the models from memory, resulting in slow responses (or none at all) for both.
6. Check the output of the logs to find any potential errors (cmd/ctrl+shift+p -> "Toggle Developer Tools" -> "Console" tab in VS Code, ~/.continue/core.log in JetBrains).

View file

@ -487,6 +487,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"mistral-tiny",
"mistral-small",
"mistral-medium",
@ -670,7 +671,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -717,6 +719,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"AUTODETECT"
]
},
@ -924,7 +927,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -980,7 +984,8 @@
"edit",
"comment",
"http",
"commit"
"commit",
"review"
],
"type": "string",
"markdownEnumDescriptions": [
@ -991,7 +996,8 @@
"Edit the highlighted code with given instructions",
"Add comments to the highlighted code",
"Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup.",
"Generate a commit message for the current changes"
"Generate a commit message for the current changes",
"Review code and give feedback"
]
},
{
@ -1655,7 +1661,7 @@
},
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder2:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"default": {
"title": "Tab Autocomplete Model",
"provider": "ollama",

View file

@ -487,6 +487,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"mistral-tiny",
"mistral-small",
"mistral-medium",
@ -670,7 +671,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -717,6 +719,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"AUTODETECT"
]
},
@ -924,7 +927,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -980,7 +984,8 @@
"edit",
"comment",
"http",
"commit"
"commit",
"review"
],
"type": "string",
"markdownEnumDescriptions": [
@ -991,7 +996,8 @@
"Edit the highlighted code with given instructions",
"Add comments to the highlighted code",
"Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup.",
"Generate a commit message for the current changes"
"Generate a commit message for the current changes",
"Review code and give feedback"
]
},
{
@ -1655,7 +1661,7 @@
},
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder2:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"default": {
"title": "Tab Autocomplete Model",
"provider": "ollama",

View file

@ -487,6 +487,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"mistral-tiny",
"mistral-small",
"mistral-medium",
@ -670,7 +671,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -717,6 +719,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"AUTODETECT"
]
},
@ -924,7 +927,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -1657,7 +1661,7 @@
},
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder2:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"default": {
"title": "Tab Autocomplete Model",
"provider": "ollama",

View file

@ -527,6 +527,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"mistral-tiny",
"mistral-small",
"mistral-medium",
@ -735,7 +736,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -786,6 +788,7 @@
"stable-code-3b",
"starcoder-1b",
"starcoder-3b",
"starcoder2-3b",
"AUTODETECT"
]
},
@ -1035,7 +1038,8 @@
"deepseek-1b",
"stable-code-3b",
"starcoder-1b",
"starcoder-3b"
"starcoder-3b",
"starcoder2-3b"
]
},
{
@ -1093,7 +1097,8 @@
"edit",
"comment",
"http",
"commit"
"commit",
"review"
],
"type": "string",
"markdownEnumDescriptions": [
@ -1104,7 +1109,8 @@
"Edit the highlighted code with given instructions",
"Add comments to the highlighted code",
"Write a custom slash command at your own HTTP endpoint. Set 'url' in the params object for the endpoint you have setup.",
"Generate a commit message for the current changes"
"Generate a commit message for the current changes",
"Review code and give feedback"
]
},
{
@ -1860,7 +1866,7 @@
},
"tabAutocompleteModel": {
"title": "Tab Autocomplete Model",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"markdownDescription": "The model used for tab autocompletion. If undefined, Continue will default to using starcoder2:3b on a local Ollama instance.\n\n*IMPORTANT*:\n\nIf you use a custom model, ensure that it is one trained for fill-in-the-middle completions. An instruct model is typically not well-suited to autocomplete and you may receive unsatisfactory completions.",
"default": {
"title": "Tab Autocomplete Model",
"provider": "ollama",

View file

@ -21,7 +21,7 @@ Continue is currently in the left sidebar, but we recommend moving it to the rig
## ⚡️ Setting up tab autocomplete
1. Download [Ollama](https://ollama.ai)
2. Download starcoder:3b by running `ollama run starcoder:3b` in the terminal
2. Download starcoder2:3b by running `ollama run starcoder2:3b` in the terminal
3. That's it! You can disable autocomplete at any time by clicking the `Continue` button in the status bar (bottom right of the VS Code window)
> Learn how to customize your autocomplete experience in [our walkthrough](https://continue.dev/docs/walkthroughs/tab-autocomplete)

View file

@ -5,8 +5,8 @@ import * as vscode from "vscode";
export class TabAutocompleteModel {
private _llm: ILLM | undefined;
private defaultTag: string = "starcoder:3b";
private defaultTagName: string = "Starcoder 3b";
private defaultTag: string = "starcoder2:3b";
private defaultTagName: string = "Starcoder2 3b";
private shownOllamaWarning: boolean = false;
private shownDeepseekWarning: boolean = false;

View file

@ -368,15 +368,15 @@
tar "^6.0.5"
yargs "^17.0.1"
"@esbuild/linux-x64@0.17.19":
"@esbuild/darwin-arm64@0.17.19":
version "0.17.19"
resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz"
integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==
resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz"
integrity sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==
"@esbuild/linux-x64@0.18.20":
"@esbuild/darwin-arm64@0.18.20":
version "0.18.20"
resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz"
integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==
resolved "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz"
integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==
"@eslint-community/eslint-utils@^4.2.0":
version "4.4.0"
@ -691,10 +691,10 @@
resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz"
integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==
"@lancedb/vectordb-linux-x64-gnu@0.4.12":
"@lancedb/vectordb-darwin-arm64@0.4.12":
version "0.4.12"
resolved "https://registry.npmjs.org/@lancedb/vectordb-linux-x64-gnu/-/vectordb-linux-x64-gnu-0.4.12.tgz"
integrity sha512-gJqYR0aymrS+C60xc4EQPzmQ5/69XfeFv2ofBvAj7qW+c6BcnoAcfVl+7s1IrcWeGz251sm5cD5Lx4AzJd89dA==
resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.12.tgz"
integrity sha512-38/rkJRlWXkPWXuj9onzvbrhnIWcIUQjgEp5G9v5ixPosBowm7A4j8e2Q8CJMsVSNcVX2JLqwWVldiWegZFuYw==
"@lukeed/csprng@^1.0.0":
version "1.1.0"
@ -3445,6 +3445,11 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
fsevents@^2.3.2, fsevents@~2.3.2:
version "2.3.3"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
function-bind@^1.1.2:
version "1.1.2"
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"