Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

chore: bump bundled llama.cpp to b9763 (#995)

Alcahest3f4aad6549ef
diff --git a/scripts/download-llama-server.js b/scripts/download-llama-server.js
index cbce61e5e..4fa713cbf 100644
--- a/scripts/download-llama-server.js
+++ b/scripts/download-llama-server.js
@@ -11,13 +11,11 @@ const {
cleanupFiles,
} = require("./lib/download-utils");
-const LLAMA_CPP_REPO = "ggerganov/llama.cpp";
+const LLAMA_CPP_REPO = "ggml-org/llama.cpp";
-// Pinned: whisper-server.exe (built against OpenWhispr/whisper.cpp 0.0.6) loads
-// ggml-*.dll from this script's output dir on Windows. Newer llama.cpp builds
-// bumped ggml's ABI and crash whisper-server on load_backend. Bump only after
-// verifying local Whisper starts on Windows.
-const LLAMA_CPP_TAG = process.env.LLAMA_CPP_VERSION || "b8857";
+// Pinned to a tested build that loads current GGUF models. whisper-server is
+// statically linked, so bumping this can't affect local Whisper.
+const LLAMA_CPP_TAG = process.env.LLAMA_CPP_VERSION || "b9763";
const BINARIES = {
"darwin-arm64": {
diff --git a/scripts/lib/download-utils.js b/scripts/lib/download-utils.js
index 7c1afcdfc..0c40f33b0 100644
--- a/scripts/lib/download-utils.js
+++ b/scripts/lib/download-utils.js
@@ -320,9 +320,12 @@ function setExecutable(filePath) {
}
function cleanupFiles(binDir, prefix, keepPrefix) {
+ // Never delete shared libraries; only platform binaries. The b9763 split ships
+ // llama-server-impl.dll, which shares the "llama-server" prefix and must survive.
+ const isLibrary = (f) => /\.(dll|dylib)$/i.test(f) || /\.so(\.\d+)*$/.test(f);
const files = fs.readdirSync(binDir).filter((f) => f.startsWith(prefix));
files.forEach((file) => {
- if (!file.startsWith(keepPrefix)) {
+ if (!file.startsWith(keepPrefix) && !isLibrary(file)) {
const filePath = path.join(binDir, file);
console.log(`Removing old binary: ${file}`);
fs.unlinkSync(filePath);
diff --git a/src/helpers/llamaServer.js b/src/helpers/llamaServer.js
index 23bbce170..3aa1e4b14 100644
--- a/src/helpers/llamaServer.js
+++ b/src/helpers/llamaServer.js
@@ -9,10 +9,11 @@ const { getSafeTempDir } = require("./safeTempDir");
const { app } = require("electron");
const sidecarPidFile = require("./sidecarPidFile");
-const PORT_RANGE_START = 8200;
-const PORT_RANGE_END = 8220;
-const STARTUP_TIMEOUT_MS = 60000;
-const VULKAN_STARTUP_TIMEOUT_MS = 60000;
+// Range kept clear of cliBridge (8200-8219) to avoid port-bind collisions.
+const PORT_RANGE_START = 8221;
+const PORT_RANGE_END = 8240;
+const STARTUP_TIMEOUT_MS = 120000;
+const VULKAN_STARTUP_TIMEOUT_MS = 120000;
const HEALTH_CHECK_INTERVAL_MS = 5000;
const HEALTH_CHECK_TIMEOUT_MS = 2000;
const STARTUP_POLL_INTERVAL_MS = 500;
@@ -211,6 +212,10 @@ class LlamaServerManager {
env.CUDA_VISIBLE_DEVICES = process.env.INTELLIGENCE_GPU_INDEX;
}
+ // Disable llama.cpp auto-fit memory probing (adds ~70s to startup). Set via env
+ // so builds without --fit ignore it instead of erroring. See LLAMA_ARG_FIT.
+ env.LLAMA_ARG_FIT = process.env.LLAMA_ARG_FIT || "off";
+
return env;
}
diff --git a/src/helpers/llamaVulkanManager.js b/src/helpers/llamaVulkanManager.js
index 0bb598f5e..15e1c6ce4 100644
--- a/src/helpers/llamaVulkanManager.js
+++ b/src/helpers/llamaVulkanManager.js
@@ -21,7 +21,10 @@ function githubReleaseHeaders() {
return headers;
}
-const GITHUB_RELEASE_URL = "https://api.github.com/repos/ggerganov/llama.cpp/releases/latest";
+// Pinned to the same build as the bundled CPU binary (download-llama-server.js).
+// Overridable via LLAMA_CPP_VERSION so GPU and CPU stay on one tested llama.cpp.
+const LLAMA_CPP_TAG = process.env.LLAMA_CPP_VERSION || "b9763";
+const GITHUB_RELEASE_URL = `https://api.github.com/repos/ggml-org/llama.cpp/releases/tags/${LLAMA_CPP_TAG}`;
const VULKAN_ASSETS = {
"win32-x64": {