Skip to content

Commit

Permalink
adding phi-2 model (#893)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarijy authored Mar 19, 2024
1 parent 50bc588 commit e15058d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/openvino_code/package-lock.json

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

5 changes: 3 additions & 2 deletions modules/openvino_code/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"publisher": "OpenVINO",
"name": "openvino-code-completion",
"version": "0.0.11",
"version": "0.0.13",
"displayName": "OpenVINO Code Completion",
"description": "VSCode extension for AI code completion with OpenVINO",
"icon": "media/logo.png",
Expand Down Expand Up @@ -195,7 +195,8 @@
"code-t5",
"decicoder-1b-openvino",
"stablecode-completion",
"deepseek-coder"
"deepseek-coder",
"phi-2"
],
"description": "Which model to use for code generation."
},
Expand Down
4 changes: 4 additions & 0 deletions modules/openvino_code/shared/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,29 @@ enum ModelId {
DECICODER_1B_OPENVINO_INT8 = 'chgk13/decicoder-1b-openvino-int8',
STABLECODE_COMPLETION_ALPHA_3B_4K_OPENVINO_INT8 = 'chgk13/stablecode-completion-alpha-3b-4k-openvino-int8',
DEEPSEEK_CODER_1_3B = 'kumarijy/deepseek-code-1.3b_base_ov_int8',
PHI_2_2_7B = 'kumarijy/phi-2-2.7b_ov_int8',
}

export enum ModelName {
CODE_T5_220M = 'code-t5',
DECICODER_1B_OPENVINO_INT8 = 'decicoder-1b-openvino',
STABLECODE_COMPLETION_ALPHA_3B_4K_OPENVINO_INT8 = 'stablecode-completion',
DEEPSEEK_CODER_1_3B = 'deepseek-coder',
PHI_2_2_7B = 'phi-2',
}

export const MODEL_NAME_TO_ID_MAP: Record<ModelName, ModelId> = {
[ModelName.CODE_T5_220M]: ModelId.CODE_T5_220M,
[ModelName.DECICODER_1B_OPENVINO_INT8]: ModelId.DECICODER_1B_OPENVINO_INT8,
[ModelName.STABLECODE_COMPLETION_ALPHA_3B_4K_OPENVINO_INT8]: ModelId.STABLECODE_COMPLETION_ALPHA_3B_4K_OPENVINO_INT8,
[ModelName.DEEPSEEK_CODER_1_3B]: ModelId.DEEPSEEK_CODER_1_3B,
[ModelName.PHI_2_2_7B]: ModelId.PHI_2_2_7B,
};

export const MODEL_SUPPORTED_FEATURES: Record<ModelName, Features[]> = {
[ModelName.CODE_T5_220M]: [Features.CODE_COMPLETION],
[ModelName.DECICODER_1B_OPENVINO_INT8]: [Features.CODE_COMPLETION, Features.SUMMARIZATION],
[ModelName.STABLECODE_COMPLETION_ALPHA_3B_4K_OPENVINO_INT8]: [Features.CODE_COMPLETION, Features.SUMMARIZATION],
[ModelName.DEEPSEEK_CODER_1_3B]: [Features.CODE_COMPLETION, Features.SUMMARIZATION, Features.FIM],
[ModelName.PHI_2_2_7B]: [Features.CODE_COMPLETION],
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const options: SelectOptionProps<ModelName>[] = [
{ value: ModelName.DECICODER_1B_OPENVINO_INT8 },
{ value: ModelName.STABLECODE_COMPLETION_ALPHA_3B_4K_OPENVINO_INT8 },
{ value: ModelName.DEEPSEEK_CODER_1_3B },
{ value: ModelName.PHI_2_2_7B },
];

interface ModelSelectProps {
Expand Down

0 comments on commit e15058d

Please sign in to comment.