From e004f4d4171f8d2e565a4edd4ec95c37b8345a7c Mon Sep 17 00:00:00 2001 From: Luc Georges Date: Fri, 24 May 2024 17:40:51 +0200 Subject: [PATCH] feat: set `starcoder2-15b` as default (#142) --- package-lock.json | 49 +++++++++++++----------------------------- package.json | 6 +++--- src/configTemplates.ts | 19 ++++++++-------- 3 files changed, 28 insertions(+), 46 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a6fd2a..5a3459d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "huggingface-vscode", - "version": "0.2.0", + "version": "0.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "huggingface-vscode", - "version": "0.2.0", + "version": "0.2.2", "license": "Apache-2.0", "dependencies": { "undici": "^6.6.2", @@ -95,14 +95,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@fastify/busboy": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", - "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", - "engines": { - "node": ">=14" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -1656,9 +1648,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true, "funding": [ { @@ -3540,14 +3532,11 @@ "dev": true }, "node_modules/undici": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.6.2.tgz", - "integrity": "sha512-vSqvUE5skSxQJ5sztTZ/CdeJb1Wq0Hf44hlYMciqHghvz+K88U0l7D6u1VsndoFgskDcnU+nG3gYmMzJVzd9Qg==", - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.18.1.tgz", + "integrity": "sha512-/0BWqR8rJNRysS5lqVmfc7eeOErcOP4tZpATVjJOojjHZ71gSYVAtFhEmadcIjwMIUehh5NFyKGsXCnXIajtbA==", "engines": { - "node": ">=18.0" + "node": ">=18.17" } }, "node_modules/uri-js": { @@ -3921,11 +3910,6 @@ "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true }, - "@fastify/busboy": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", - "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==" - }, "@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -5051,9 +5035,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", - "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "dev": true }, "foreground-child": { @@ -6431,12 +6415,9 @@ "dev": true }, "undici": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.6.2.tgz", - "integrity": "sha512-vSqvUE5skSxQJ5sztTZ/CdeJb1Wq0Hf44hlYMciqHghvz+K88U0l7D6u1VsndoFgskDcnU+nG3gYmMzJVzd9Qg==", - "requires": { - "@fastify/busboy": "^2.0.0" - } + "version": "6.18.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.18.1.tgz", + "integrity": "sha512-/0BWqR8rJNRysS5lqVmfc7eeOErcOP4tZpATVjJOojjHZ71gSYVAtFhEmadcIjwMIUehh5NFyKGsXCnXIajtbA==" }, "uri-js": { "version": "4.4.1", diff --git a/package.json b/package.json index 2de824b..8b24680 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "huggingface-vscode", "displayName": "llm-vscode", "description": "LLM powered development for VS Code", - "version": "0.2.1", + "version": "0.2.2", "publisher": "HuggingFace", "icon": "small_logo.png", "engines": { @@ -85,7 +85,7 @@ "llm.configTemplate": { "type": "string", "enum": [ - "hf/bigcode/starcoder", + "hf/bigcode/starcoder2-15b", "hf/codellama/CodeLlama-13b-hf", "hf/Phind/Phind-CodeLlama-34B-v2", "hf/WizardLM/WizardCoder-Python-34B-V1.0", @@ -93,7 +93,7 @@ "ollama/codellama:7b", "Custom" ], - "default": "hf/bigcode/starcoder", + "default": "hf/bigcode/starcoder2-15b", "description": "Choose your model template from the dropdown" }, "llm.modelId": { diff --git a/src/configTemplates.ts b/src/configTemplates.ts index c19e42b..9abd6b2 100644 --- a/src/configTemplates.ts +++ b/src/configTemplates.ts @@ -1,4 +1,4 @@ -const templateKeys = ["hf/bigcode/starcoder", "hf/codellama/CodeLlama-13b-hf", "hf/Phind/Phind-CodeLlama-34B-v2", "hf/WizardLM/WizardCoder-Python-34B-V1.0", "ollama/codellama:7b", "hf/deepseek-ai/deepseek-coder-6.7b-base", "Custom"] as const; +const templateKeys = ["hf/bigcode/starcoder2-15b", "hf/codellama/CodeLlama-13b-hf", "hf/Phind/Phind-CodeLlama-34B-v2", "hf/WizardLM/WizardCoder-Python-34B-V1.0", "ollama/codellama:7b", "hf/deepseek-ai/deepseek-coder-6.7b-base", "Custom"] as const; export type TemplateKey = typeof templateKeys[number]; export interface TokenizerPathConfig { @@ -28,8 +28,8 @@ export interface Config { tokenizer: TokenizerPathConfig | TokenizerRepoConfig | TokenizerUrlConfig | null; } -const HfStarCoderConfig: Config = { - modelId: "bigcode/starcoder", +const HfStarCoder215BConfig: Config = { + modelId: "bigcode/starcoder2-15b", backend: "huggingface", url: null, "fillInTheMiddle.enabled": true, @@ -43,10 +43,10 @@ const HfStarCoderConfig: Config = { top_p: 0.95 } }, - contextWindow: 8192, + contextWindow: 1024, tokensToClear: ["<|endoftext|>"], tokenizer: { - repository: "bigcode/starcoder", + repository: "bigcode/starcoder2-15b", } } @@ -65,7 +65,7 @@ const HfCodeLlama13BConfig: Config = { top_p: 0.95 } }, - contextWindow: 4096, + contextWindow: 1024, tokensToClear: [""], tokenizer: { repository: "codellama/CodeLlama-13b-hf", @@ -84,7 +84,7 @@ const HfDeepSeekConfig: Config = { "fillInTheMiddle.middle": "<|fim▁end|>", // DeepSeek should support 16k, // keeping at 8k because of resource constraints - contextWindow: 8192, + contextWindow: 1024, tokensToClear: ["<|EOT|>"], tokenizer: { repository: "deepseek-ai/deepseek-coder-6.7b-base", @@ -123,14 +123,15 @@ const OllamaCodeLlama7BConfig: Config = { top_p: 0.95 } }, - contextWindow: 2048, + contextWindow: 1024, tokenizer: { repository: "codellama/CodeLlama-7b-hf", } } + export const templates: Partial> = { - "hf/bigcode/starcoder": HfStarCoderConfig, + "hf/bigcode/starcoder2-15b": HfStarCoder215BConfig, "hf/codellama/CodeLlama-13b-hf": HfCodeLlama13BConfig, "hf/Phind/Phind-CodeLlama-34B-v2": HfPhindCodeLlama34Bv2Config, "hf/WizardLM/WizardCoder-Python-34B-V1.0": HfWizardCoderPython34Bv1Config,