Skip to content

Commit

Permalink
feat: set starcoder2-15b as default (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
McPatate committed May 24, 2024
1 parent 66a6ce6 commit e004f4d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 46 deletions.
49 changes: 15 additions & 34 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -85,15 +85,15 @@
"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",
"hf/deepseek-ai/deepseek-coder-6.7b-base",
"ollama/codellama:7b",
"Custom"
],
"default": "hf/bigcode/starcoder",
"default": "hf/bigcode/starcoder2-15b",
"description": "Choose your model template from the dropdown"
},
"llm.modelId": {
Expand Down
19 changes: 10 additions & 9 deletions src/configTemplates.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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",
}
}

Expand All @@ -65,7 +65,7 @@ const HfCodeLlama13BConfig: Config = {
top_p: 0.95
}
},
contextWindow: 4096,
contextWindow: 1024,
tokensToClear: ["<EOT>"],
tokenizer: {
repository: "codellama/CodeLlama-13b-hf",
Expand All @@ -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",
Expand Down Expand Up @@ -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<Record<TemplateKey, Config>> = {
"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,
Expand Down

0 comments on commit e004f4d

Please sign in to comment.