From 1378ef8ee5a4d24653de747f8a0f594b7979fde6 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Thu, 4 Apr 2024 18:22:19 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20recommend=20starcoder2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/autocomplete/completionProvider.ts | 2 +- core/config/default.ts | 2 +- core/index.d.ts | 1 + core/llm/llms/Ollama.ts | 1 + docs/docs/walkthroughs/tab-autocomplete.md | 12 +++++----- docs/static/schemas/config.json | 16 +++++++++---- .../src/main/resources/config_schema.json | 16 +++++++++---- extensions/vscode/config_schema.json | 10 +++++--- extensions/vscode/continue_rc_schema.json | 16 +++++++++---- extensions/vscode/media/welcome.md | 2 +- .../vscode/src/util/loadAutocompleteModel.ts | 4 ++-- extensions/vscode/yarn.lock | 23 +++++++++++-------- 12 files changed, 67 insertions(+), 38 deletions(-) diff --git a/core/autocomplete/completionProvider.ts b/core/autocomplete/completionProvider.ts index 09f69b7b1..62d0e2f21 100644 --- a/core/autocomplete/completionProvider.ts +++ b/core/autocomplete/completionProvider.ts @@ -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; diff --git a/core/config/default.ts b/core/config/default.ts index a6c7f9df9..02a0fa707 100644 --- a/core/config/default.ts +++ b/core/config/default.ts @@ -67,7 +67,7 @@ export const defaultConfig: SerializedContinueConfig = { tabAutocompleteModel: { title: "Starcoder 3b", provider: "ollama", - model: "starcoder-3b", + model: "starcoder2:3b", }, }; diff --git a/core/index.d.ts b/core/index.d.ts index 59132930c..0720068aa 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -549,6 +549,7 @@ export type ModelName = | "deepseek-1b" | "starcoder-1b" | "starcoder-3b" + | "starcoder2-3b" | "stable-code-3b"; export interface RequestOptions { diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index b7209e94c..b7c05bbcc 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -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 ); diff --git a/docs/docs/walkthroughs/tab-autocomplete.md b/docs/docs/walkthroughs/tab-autocomplete.md index 08e3a12fc..1fc6c00b0 100644 --- a/docs/docs/walkthroughs/tab-autocomplete.md +++ b/docs/docs/walkthroughs/tab-autocomplete.md @@ -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://" }, ... @@ -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://" }, "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). diff --git a/docs/static/schemas/config.json b/docs/static/schemas/config.json index 2454df1f9..550b480bb 100644 --- a/docs/static/schemas/config.json +++ b/docs/static/schemas/config.json @@ -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", diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 2454df1f9..550b480bb 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -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", diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index e3edf8e51..550b480bb 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -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", diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 0cf246324..0bb4679a2 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -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", diff --git a/extensions/vscode/media/welcome.md b/extensions/vscode/media/welcome.md index d407ba29f..969305dbc 100644 --- a/extensions/vscode/media/welcome.md +++ b/extensions/vscode/media/welcome.md @@ -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) diff --git a/extensions/vscode/src/util/loadAutocompleteModel.ts b/extensions/vscode/src/util/loadAutocompleteModel.ts index 41fd7f886..b2f698013 100644 --- a/extensions/vscode/src/util/loadAutocompleteModel.ts +++ b/extensions/vscode/src/util/loadAutocompleteModel.ts @@ -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; diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index ffe1a3455..6e49e51c9 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -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"