From 764e4c6fe33400e15f8ddce26ab0608d5bc17943 Mon Sep 17 00:00:00 2001 From: NamH Date: Fri, 5 Jan 2024 15:13:21 +0700 Subject: [PATCH] fix(Model): remove unsupported default model setting params (#1382) Signed-off-by: James Co-authored-by: James --- .../inference-nitro-extension/src/module.ts | 31 +++++++++---------- models/config/default-model.json | 16 ++++------ 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/extensions/inference-nitro-extension/src/module.ts b/extensions/inference-nitro-extension/src/module.ts index 44c6b9100..3654410d4 100644 --- a/extensions/inference-nitro-extension/src/module.ts +++ b/extensions/inference-nitro-extension/src/module.ts @@ -24,19 +24,19 @@ const NVIDIA_INFO_FILE = path.join( ); const DEFALT_SETTINGS = { - "notify": true, - "run_mode": "cpu", - "nvidia_driver": { - "exist": false, - "version": "" + notify: true, + run_mode: "cpu", + nvidia_driver: { + exist: false, + version: "", }, - "cuda": { - "exist": false, - "version": "" + cuda: { + exist: false, + version: "", }, - "gpus": [], - "gpu_highest_vram": "" -} + gpus: [], + gpu_highest_vram: "", +}; // The subprocess instance for Nitro let subprocess = undefined; @@ -114,8 +114,7 @@ function updateCudaExistence() { if (cudaExists) { cudaVersion = "11"; } - } - else { + } else { cudaVersion = "12"; } @@ -395,8 +394,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise { } else { if (nvidiaInfo["cuda"].version === "12") { binaryFolder = path.join(binaryFolder, "win-cuda-12-0"); - } - else { + } else { binaryFolder = path.join(binaryFolder, "win-cuda-11-4"); } cudaVisibleDevices = nvidiaInfo["gpu_highest_vram"]; @@ -416,8 +414,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise { } else { if (nvidiaInfo["cuda"].version === "12") { binaryFolder = path.join(binaryFolder, "linux-cuda-12-0"); - } - else { + } else { binaryFolder = path.join(binaryFolder, "linux-cuda-11-4"); } cudaVisibleDevices = nvidiaInfo["gpu_highest_vram"]; diff --git a/models/config/default-model.json b/models/config/default-model.json index a00a8c024..50bf067c1 100644 --- a/models/config/default-model.json +++ b/models/config/default-model.json @@ -11,18 +11,14 @@ "ctx_len": 4096, "ngl": 0, "embedding": false, - "n_parallel": 0, - "cpu_threads": 0, - "prompt_template": "" + "prompt_template": "{system_message}\n### Instruction: {prompt}\n### Response:" }, "parameters": { - "temperature": 0, - "token_limit": 0, - "top_k": 0, - "top_p": 0, - "stream": false, - "max_tokens": 4096, - "stop": [], + "temperature": 0.7, + "top_p": 0.95, + "stream": true, + "max_tokens": 2048, + "stop": [""], "frequency_penalty": 0, "presence_penalty": 0 },