Skip to content

Commit

Permalink
fix(Model): remove unsupported default model setting params (janhq#1382)
Browse files Browse the repository at this point in the history
Signed-off-by: James <[email protected]>
Co-authored-by: James <[email protected]>
  • Loading branch information
namchuai and James authored Jan 5, 2024
1 parent e0a7d3c commit 764e4c6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 27 deletions.
31 changes: 14 additions & 17 deletions extensions/inference-nitro-extension/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -114,8 +114,7 @@ function updateCudaExistence() {
if (cudaExists) {
cudaVersion = "11";
}
}
else {
} else {
cudaVersion = "12";
}

Expand Down Expand Up @@ -395,8 +394,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise<any> {
} 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"];
Expand All @@ -416,8 +414,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise<any> {
} 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"];
Expand Down
16 changes: 6 additions & 10 deletions models/config/default-model.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": ["<endofstring>"],
"frequency_penalty": 0,
"presence_penalty": 0
},
Expand Down

0 comments on commit 764e4c6

Please sign in to comment.