dsh-plugin-local-infer 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -6
- package/cordis.patch.yml +7 -0
- package/docs/zh/README.md +24 -4
- package/dsh/client.js +4200 -4049
- package/package.json +33 -11
- package/packages/core/lib/adapter.d.ts +177 -11
- package/packages/core/lib/adapter.js +74 -1
- package/packages/core/lib/config.d.ts +1 -1
- package/packages/core/lib/config.js +1 -1
- package/packages/core/lib/debug.d.ts +1 -1
- package/packages/core/lib/debug.js +1 -1
- package/packages/core/lib/defaults.d.ts +1 -1
- package/packages/core/lib/defaults.js +1 -1
- package/packages/core/lib/deps.d.ts +48 -20
- package/packages/core/lib/deps.js +24 -8
- package/packages/core/lib/estimator.d.ts +1 -1
- package/packages/core/lib/estimator.js +1 -1
- package/packages/core/lib/guideline.d.ts +1 -1
- package/packages/core/lib/guideline.js +1 -1
- package/packages/core/lib/hardware.d.ts +1 -1
- package/packages/core/lib/hardware.js +1 -1
- package/packages/core/lib/hf-cache.d.ts +70 -0
- package/packages/core/lib/hf-cache.js +83 -0
- package/packages/core/lib/index.d.ts +16 -9
- package/packages/core/lib/index.js +10 -6
- package/packages/core/lib/infer-cache.d.ts +39 -0
- package/packages/core/lib/infer-cache.js +53 -0
- package/packages/core/lib/launch-command.d.ts +8 -4
- package/packages/core/lib/launch-command.js +13 -6
- package/packages/core/lib/launch-record.d.ts +1 -1
- package/packages/core/lib/launch-record.js +1 -1
- package/packages/core/lib/logs.d.ts +8 -1
- package/packages/core/lib/logs.js +12 -4
- package/packages/core/lib/models.d.ts +120 -14
- package/packages/core/lib/models.js +209 -17
- package/packages/core/lib/parameter.d.ts +31 -3
- package/packages/core/lib/parameter.js +1 -1
- package/packages/core/lib/progress.d.ts +54 -0
- package/packages/core/lib/progress.js +120 -0
- package/packages/core/lib/registrar.d.ts +25 -14
- package/packages/core/lib/registrar.js +30 -10
- package/packages/core/lib/reserve.d.ts +11 -3
- package/packages/core/lib/reserve.js +6 -4
- package/packages/core/lib/status.d.ts +12 -6
- package/packages/core/lib/status.js +21 -10
- package/packages/core/lib/sudo.d.ts +80 -0
- package/packages/core/lib/sudo.js +78 -0
- package/packages/core/package.json +1 -1
- package/packages/orchestrator/lib/config.d.ts +63 -0
- package/packages/orchestrator/lib/config.js +111 -0
- package/packages/orchestrator/lib/index.d.ts +51 -0
- package/packages/orchestrator/lib/index.js +73 -0
- package/packages/orchestrator/lib/route.d.ts +60 -0
- package/packages/orchestrator/lib/route.js +159 -0
- package/packages/orchestrator/locale/en.json +6 -0
- package/packages/orchestrator/package.json +39 -0
- package/packages/orchestrator/prompt.md +87 -0
- package/packages/providers/lib/acquire.d.ts +95 -15
- package/packages/providers/lib/acquire.js +239 -40
- package/packages/providers/lib/adapters.d.ts +155 -221
- package/packages/providers/lib/adapters.js +589 -935
- package/packages/providers/lib/debug.d.ts +1 -1
- package/packages/providers/lib/debug.js +1 -1
- package/packages/providers/lib/deps.d.ts +31 -212
- package/packages/providers/lib/deps.js +71 -205
- package/packages/providers/lib/engines/basalt/basalt.d.ts +130 -0
- package/packages/providers/lib/engines/basalt/basalt.js +304 -0
- package/packages/providers/lib/engines/basalt/basaltAdapter.d.ts +85 -0
- package/packages/providers/lib/engines/basalt/basaltAdapter.js +439 -0
- package/packages/providers/lib/engines/basalt/basaltLinux.d.ts +23 -0
- package/packages/providers/lib/engines/basalt/basaltLinux.js +47 -0
- package/packages/providers/lib/engines/basalt/basaltMacOS.d.ts +17 -0
- package/packages/providers/lib/engines/basalt/basaltMacOS.js +19 -0
- package/packages/providers/lib/engines/basalt/basaltWindows.d.ts +24 -0
- package/packages/providers/lib/engines/basalt/basaltWindows.js +49 -0
- package/packages/providers/lib/engines/engineOs.d.ts +24 -0
- package/packages/providers/lib/engines/engineOs.js +17 -0
- package/packages/providers/lib/{hyperqwen.d.ts → engines/hyperqwen/hyperqwen.d.ts} +2 -2
- package/packages/providers/lib/{hyperqwen.js → engines/hyperqwen/hyperqwen.js} +14 -2
- package/packages/providers/lib/engines/hyperqwen/hyperqwenAdapter.d.ts +38 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenAdapter.js +115 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenArch.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenArch.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenDebian.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenDebian.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenFedora.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenFedora.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenLinux.d.ts +10 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenLinux.js +14 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenMacOS.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenMacOS.js +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenWindows.d.ts +9 -0
- package/packages/providers/lib/engines/hyperqwen/hyperqwenWindows.js +9 -0
- package/packages/providers/lib/{infernix.d.ts → engines/infernix/infernix.d.ts} +7 -4
- package/packages/providers/lib/{infernix.js → engines/infernix/infernix.js} +53 -8
- package/packages/providers/lib/engines/infernix/infernixAdapter.d.ts +52 -0
- package/packages/providers/lib/engines/infernix/infernixAdapter.js +235 -0
- package/packages/providers/lib/engines/infernix/infernixArch.d.ts +9 -0
- package/packages/providers/lib/engines/infernix/infernixArch.js +9 -0
- package/packages/providers/lib/engines/infernix/infernixDebian.d.ts +9 -0
- package/packages/providers/lib/engines/infernix/infernixDebian.js +9 -0
- package/packages/providers/lib/engines/infernix/infernixFedora.d.ts +9 -0
- package/packages/providers/lib/engines/infernix/infernixFedora.js +9 -0
- package/packages/providers/lib/engines/infernix/infernixLinux.d.ts +17 -0
- package/packages/providers/lib/engines/infernix/infernixLinux.js +35 -0
- package/packages/providers/lib/engines/infernix/infernixMacOS.d.ts +16 -0
- package/packages/providers/lib/engines/infernix/infernixMacOS.js +18 -0
- package/packages/providers/lib/engines/infernix/infernixWindows.d.ts +16 -0
- package/packages/providers/lib/engines/infernix/infernixWindows.js +34 -0
- package/packages/providers/lib/{llamacpp.d.ts → engines/llamacpp/llamacpp.d.ts} +2 -2
- package/packages/providers/lib/{llamacpp.js → engines/llamacpp/llamacpp.js} +12 -2
- package/packages/providers/lib/engines/llamacpp/llamacppAdapter.d.ts +50 -0
- package/packages/providers/lib/engines/llamacpp/llamacppAdapter.js +274 -0
- package/packages/providers/lib/engines/llamacpp/llamacppArch.d.ts +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppArch.js +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppDebian.d.ts +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppDebian.js +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppFedora.d.ts +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppFedora.js +9 -0
- package/packages/providers/lib/engines/llamacpp/llamacppLinux.d.ts +17 -0
- package/packages/providers/lib/engines/llamacpp/llamacppLinux.js +28 -0
- package/packages/providers/lib/engines/llamacpp/llamacppMacOS.d.ts +15 -0
- package/packages/providers/lib/engines/llamacpp/llamacppMacOS.js +17 -0
- package/packages/providers/lib/engines/llamacpp/llamacppWindows.d.ts +15 -0
- package/packages/providers/lib/engines/llamacpp/llamacppWindows.js +26 -0
- package/packages/providers/lib/{ninfer.d.ts → engines/ninfer/ninfer.d.ts} +2 -2
- package/packages/providers/lib/{ninfer.js → engines/ninfer/ninfer.js} +25 -3
- package/packages/providers/lib/engines/ninfer/ninferAdapter.d.ts +81 -0
- package/packages/providers/lib/engines/ninfer/ninferAdapter.js +392 -0
- package/packages/providers/lib/engines/ninfer/ninferArch.d.ts +9 -0
- package/packages/providers/lib/engines/ninfer/ninferArch.js +9 -0
- package/packages/providers/lib/engines/ninfer/ninferDebian.d.ts +9 -0
- package/packages/providers/lib/engines/ninfer/ninferDebian.js +9 -0
- package/packages/providers/lib/engines/ninfer/ninferFedora.d.ts +9 -0
- package/packages/providers/lib/engines/ninfer/ninferFedora.js +9 -0
- package/packages/providers/lib/engines/ninfer/ninferLinux.d.ts +17 -0
- package/packages/providers/lib/engines/ninfer/ninferLinux.js +37 -0
- package/packages/providers/lib/engines/ninfer/ninferMacOS.d.ts +15 -0
- package/packages/providers/lib/engines/ninfer/ninferMacOS.js +17 -0
- package/packages/providers/lib/engines/ninfer/ninferWindows.d.ts +29 -0
- package/packages/providers/lib/engines/ninfer/ninferWindows.js +59 -0
- package/packages/providers/lib/engines/strata/strata.d.ts +1 -0
- package/packages/providers/lib/engines/strata/strata.js +264 -0
- package/packages/providers/lib/engines/strata/strataAdapter.d.ts +97 -0
- package/packages/providers/lib/engines/strata/strataAdapter.js +463 -0
- package/packages/providers/lib/engines/strata/strataArch.d.ts +9 -0
- package/packages/providers/lib/engines/strata/strataArch.js +9 -0
- package/packages/providers/lib/engines/strata/strataDebian.d.ts +9 -0
- package/packages/providers/lib/engines/strata/strataDebian.js +9 -0
- package/packages/providers/lib/engines/strata/strataFedora.d.ts +9 -0
- package/packages/providers/lib/engines/strata/strataFedora.js +9 -0
- package/packages/providers/lib/engines/strata/strataLinux.d.ts +21 -0
- package/packages/providers/lib/engines/strata/strataLinux.js +30 -0
- package/packages/providers/lib/engines/strata/strataMacOS.d.ts +16 -0
- package/packages/providers/lib/engines/strata/strataMacOS.js +17 -0
- package/packages/providers/lib/engines/strata/strataWindows.d.ts +27 -0
- package/packages/providers/lib/engines/strata/strataWindows.js +37 -0
- package/packages/providers/lib/engines.d.ts +8 -5
- package/packages/providers/lib/engines.js +22 -11
- package/packages/providers/lib/guidelines.d.ts +5 -4
- package/packages/providers/lib/guidelines.js +18 -5
- package/packages/providers/lib/index.d.ts +33 -24
- package/packages/providers/lib/index.js +46 -24
- package/packages/providers/lib/model-defaults.d.ts +10 -5
- package/packages/providers/lib/model-defaults.js +47 -5
- package/packages/providers/lib/platform.d.ts +8 -5
- package/packages/providers/lib/platform.js +27 -7
- package/packages/providers/lib/presets.d.ts +6 -4
- package/packages/providers/lib/presets.js +53 -5
- package/packages/providers/lib/systemDeps.d.ts +313 -0
- package/packages/providers/lib/systemDeps.js +284 -0
- package/packages/providers/lib/vram.d.ts +34 -8
- package/packages/providers/lib/vram.js +81 -8
- package/packages/providers/package.json +2 -2
- package/packages/service/lib/index.d.ts +187 -23
- package/packages/service/lib/index.js +667 -90
- package/packages/service/lib/launch-target.d.ts +19 -0
- package/packages/service/lib/launch-target.js +28 -0
- package/packages/service/lib/run-logs.d.ts +72 -0
- package/packages/service/lib/run-logs.js +125 -0
- package/packages/service/lib/types.d.ts +166 -8
- package/packages/service/lib/types.js +1 -1
- package/packages/service/package.json +2 -2
- package/packages/tool/lib/index.d.ts +1 -1
- package/packages/tool/lib/index.js +1 -1
- package/packages/tool/package.json +2 -2
- package/packages/ui/lib/config.d.ts +89 -0
- package/packages/ui/lib/config.js +251 -0
- package/packages/ui/lib/deps.d.ts +4 -4
- package/packages/ui/lib/deps.js +1 -1
- package/packages/ui/lib/form.d.ts +1 -1
- package/packages/ui/lib/form.js +1 -1
- package/packages/ui/lib/index.d.ts +7 -1
- package/packages/ui/lib/index.js +12 -2
- package/packages/ui/lib/meter.d.ts +1 -1
- package/packages/ui/lib/meter.js +1 -1
- package/packages/ui/lib/ops/engine.d.ts +216 -0
- package/packages/ui/lib/ops/engine.js +697 -0
- package/packages/ui/lib/ops/get-steps.d.ts +98 -0
- package/packages/ui/lib/ops/get-steps.js +359 -0
- package/packages/ui/lib/ops/hf.d.ts +42 -0
- package/packages/ui/lib/ops/hf.js +150 -0
- package/packages/ui/lib/ops/logs.d.ts +78 -0
- package/packages/ui/lib/ops/logs.js +119 -0
- package/packages/ui/lib/ops/model.d.ts +71 -0
- package/packages/ui/lib/ops/model.js +123 -0
- package/packages/ui/lib/request.d.ts +106 -0
- package/packages/ui/lib/request.js +80 -0
- package/packages/ui/lib/route.d.ts +106 -422
- package/packages/ui/lib/route.js +136 -1845
- package/packages/ui/lib/routes/chat-template.d.ts +1 -0
- package/packages/ui/lib/routes/chat-template.js +1 -0
- package/packages/ui/lib/routes/deps.d.ts +1 -0
- package/packages/ui/lib/routes/deps.js +1 -0
- package/packages/ui/lib/routes/download.d.ts +1 -0
- package/packages/ui/lib/routes/download.js +1 -0
- package/packages/ui/lib/routes/get.d.ts +1 -0
- package/packages/ui/lib/routes/get.js +106 -0
- package/packages/ui/lib/routes/install.d.ts +16 -0
- package/packages/ui/lib/routes/install.js +36 -0
- package/packages/ui/lib/routes/launch.d.ts +24 -0
- package/packages/ui/lib/routes/launch.js +74 -0
- package/packages/ui/lib/routes/logs.d.ts +57 -0
- package/packages/ui/lib/routes/logs.js +117 -0
- package/packages/ui/lib/routes/provider-delete.d.ts +15 -0
- package/packages/ui/lib/routes/provider-delete.js +37 -0
- package/packages/ui/lib/routes/register.d.ts +16 -0
- package/packages/ui/lib/routes/register.js +28 -0
- package/packages/ui/lib/routes/save.d.ts +18 -0
- package/packages/ui/lib/routes/save.js +159 -0
- package/packages/ui/lib/routes/stop.d.ts +19 -0
- package/packages/ui/lib/routes/stop.js +32 -0
- package/packages/ui/lib/routes/stream.d.ts +40 -0
- package/packages/ui/lib/routes/stream.js +68 -0
- package/packages/ui/lib/routes/summary.d.ts +15 -0
- package/packages/ui/lib/routes/summary.js +26 -0
- package/packages/ui/lib/routes/unregister.d.ts +14 -0
- package/packages/ui/lib/routes/unregister.js +26 -0
- package/packages/ui/lib/viewmodels/deps.d.ts +1 -0
- package/packages/ui/lib/viewmodels/deps.js +1 -0
- package/packages/ui/lib/viewmodels/depsHelpers.d.ts +1 -0
- package/packages/ui/lib/viewmodels/depsHelpers.js +94 -0
- package/packages/ui/lib/viewmodels/summary.d.ts +145 -0
- package/packages/ui/lib/viewmodels/summary.js +245 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +30 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.js +42 -0
- package/packages/ui/lib/warnings.d.ts +1 -1
- package/packages/ui/lib/warnings.js +1 -1
- package/packages/ui/package.json +4 -4
- package/packages/providers/lib/strata.d.ts +0 -15
- package/packages/providers/lib/strata.js +0 -14
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The llama.cpp shared Linux build profile. Every Linux distro (Arch, Debian,
|
|
3
|
+
* Fedora) builds llama.cpp through this one route: cmake with the Ninja
|
|
4
|
+
* generator into the `build` directory, which is where the `llama-server`
|
|
5
|
+
* binary lands. The distro profiles reuse this profile, so a distro carries no
|
|
6
|
+
* build steps of its own.
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/engines/llamacpp/llamacppLinux
|
|
8
|
+
*/
|
|
9
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
10
|
+
export declare const LLAMACPP_LINUX: EngineOsProfile;
|
|
11
|
+
/**
|
|
12
|
+
* llamacppLinuxBinary returns the llama.cpp engine binary name on Linux: the
|
|
13
|
+
* plain `llama-server` (no .exe). The name comes from the shared Linux
|
|
14
|
+
* profile, so the spelling has one home.
|
|
15
|
+
*/
|
|
16
|
+
export declare function llamacppLinuxBinary(): string;
|
|
17
|
+
//# sourceMappingURL=llamacppLinux.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The llama.cpp shared Linux build profile. Every Linux distro (Arch, Debian,
|
|
3
|
+
* Fedora) builds llama.cpp through this one route: cmake with the Ninja
|
|
4
|
+
* generator into the `build` directory, which is where the `llama-server`
|
|
5
|
+
* binary lands. The distro profiles reuse this profile, so a distro carries no
|
|
6
|
+
* build steps of its own.
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/engines/llamacpp/llamacppLinux
|
|
8
|
+
*/
|
|
9
|
+
import { SYSTEM_DEPS } from "../../systemDeps.js";
|
|
10
|
+
export const LLAMACPP_LINUX = {
|
|
11
|
+
buildSteps: [
|
|
12
|
+
'cmake -S {dir} -B {dir}/build -G Ninja -DCMAKE_BUILD_TYPE=Release && cmake --build {dir}/build -j',
|
|
13
|
+
],
|
|
14
|
+
buildDir: 'build',
|
|
15
|
+
binary: 'llama-server',
|
|
16
|
+
// The llama.cpp local build is a thin cmake route: the compiler and the hf
|
|
17
|
+
// CLI to download the model.
|
|
18
|
+
deps: [SYSTEM_DEPS.cmake, SYSTEM_DEPS.hfCli],
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* llamacppLinuxBinary returns the llama.cpp engine binary name on Linux: the
|
|
22
|
+
* plain `llama-server` (no .exe). The name comes from the shared Linux
|
|
23
|
+
* profile, so the spelling has one home.
|
|
24
|
+
*/
|
|
25
|
+
export function llamacppLinuxBinary() {
|
|
26
|
+
return LLAMACPP_LINUX.binary ?? 'llama-server';
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=llamacppLinux.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The llama.cpp macOS build profile. macOS builds llama.cpp through the same
|
|
3
|
+
* cmake route as Linux, so this profile reuses the shared Linux build steps
|
|
4
|
+
* and build directory; the binary keeps its plain name (no .exe on macOS).
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/llamacpp/llamacppMacOS
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const LLAMACPP_MACOS: EngineOsProfile;
|
|
9
|
+
/**
|
|
10
|
+
* llamacppMacOSBinary returns the llama.cpp engine binary name on macOS: the
|
|
11
|
+
* plain `llama-server` (no .exe on macOS). The name comes from the shared
|
|
12
|
+
* Linux profile the macOS profile reuses, so the spelling has one home.
|
|
13
|
+
*/
|
|
14
|
+
export declare function llamacppMacOSBinary(): string;
|
|
15
|
+
//# sourceMappingURL=llamacppMacOS.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The llama.cpp macOS build profile. macOS builds llama.cpp through the same
|
|
3
|
+
* cmake route as Linux, so this profile reuses the shared Linux build steps
|
|
4
|
+
* and build directory; the binary keeps its plain name (no .exe on macOS).
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/llamacpp/llamacppMacOS
|
|
6
|
+
*/
|
|
7
|
+
import { LLAMACPP_LINUX } from "./llamacppLinux.js";
|
|
8
|
+
export const LLAMACPP_MACOS = LLAMACPP_LINUX;
|
|
9
|
+
/**
|
|
10
|
+
* llamacppMacOSBinary returns the llama.cpp engine binary name on macOS: the
|
|
11
|
+
* plain `llama-server` (no .exe on macOS). The name comes from the shared
|
|
12
|
+
* Linux profile the macOS profile reuses, so the spelling has one home.
|
|
13
|
+
*/
|
|
14
|
+
export function llamacppMacOSBinary() {
|
|
15
|
+
return LLAMACPP_MACOS.binary ?? 'llama-server';
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=llamacppMacOS.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The llama.cpp Windows build profile. llama.cpp carries no dedicated Windows
|
|
3
|
+
* build route, so a Windows host reads the shared Linux cmake steps and build
|
|
4
|
+
* directory; the binary is the .exe.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/llamacpp/llamacppWindows
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const LLAMACPP_WINDOWS: EngineOsProfile;
|
|
9
|
+
/**
|
|
10
|
+
* llamacppWindowsBinary returns the llama.cpp engine binary name on Windows:
|
|
11
|
+
* the `llama-server.exe` the Windows build leaves in the build tree. The name
|
|
12
|
+
* comes from the Windows profile, so the .exe spelling has one home.
|
|
13
|
+
*/
|
|
14
|
+
export declare function llamacppWindowsBinary(): string;
|
|
15
|
+
//# sourceMappingURL=llamacppWindows.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The llama.cpp Windows build profile. llama.cpp carries no dedicated Windows
|
|
3
|
+
* build route, so a Windows host reads the shared Linux cmake steps and build
|
|
4
|
+
* directory; the binary is the .exe.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/llamacpp/llamacppWindows
|
|
6
|
+
*/
|
|
7
|
+
import { LLAMACPP_LINUX } from "./llamacppLinux.js";
|
|
8
|
+
import { SYSTEM_DEPS } from "../../systemDeps.js";
|
|
9
|
+
export const LLAMACPP_WINDOWS = {
|
|
10
|
+
buildSteps: LLAMACPP_LINUX.buildSteps,
|
|
11
|
+
buildDir: 'build',
|
|
12
|
+
binary: 'llama-server.exe',
|
|
13
|
+
// llama.cpp carries no dedicated Windows build route, so a Windows host
|
|
14
|
+
// reads the shared Linux cmake steps; the local build deps are the same thin
|
|
15
|
+
// cmake-plus-hf list.
|
|
16
|
+
deps: [SYSTEM_DEPS.cmake, SYSTEM_DEPS.hfCli],
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* llamacppWindowsBinary returns the llama.cpp engine binary name on Windows:
|
|
20
|
+
* the `llama-server.exe` the Windows build leaves in the build tree. The name
|
|
21
|
+
* comes from the Windows profile, so the .exe spelling has one home.
|
|
22
|
+
*/
|
|
23
|
+
export function llamacppWindowsBinary() {
|
|
24
|
+
return LLAMACPP_WINDOWS.binary ?? 'llama-server.exe';
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=llamacppWindows.js.map
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The data is the surface; the `NInferAdapter` (Phase 5) composes it into a
|
|
9
9
|
* `LaunchPlan`. Adding a flag here is a data edit, never a core rewire.
|
|
10
|
-
* @module dsh-plugin-local-infer/providers/ninfer
|
|
10
|
+
* @module dsh-plugin-local-infer/providers/engines/ninfer/ninfer
|
|
11
11
|
*/
|
|
12
12
|
import type { ComboOption, EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
13
13
|
/**
|
|
@@ -53,4 +53,4 @@ export declare const LM_HEAD_DRAFT_GATE_MESSAGE = "LM-head draft is only availab
|
|
|
53
53
|
* the field is disabled.
|
|
54
54
|
*/
|
|
55
55
|
export declare const NINFER_PARAMETERS: readonly ParameterSpec[];
|
|
56
|
-
//# sourceMappingURL=ninfer.d.ts.map
|
|
56
|
+
//# sourceMappingURL=ninfer.d.ts.map
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* The data is the surface; the `NInferAdapter` (Phase 5) composes it into a
|
|
9
9
|
* `LaunchPlan`. Adding a flag here is a data edit, never a core rewire.
|
|
10
|
-
* @module dsh-plugin-local-infer/providers/ninfer
|
|
10
|
+
* @module dsh-plugin-local-infer/providers/engines/ninfer/ninfer
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* The KV cache quantization formats NInfer serves, in the order the form
|
|
@@ -94,6 +94,7 @@ export const NINFER_PARAMETERS = [
|
|
|
94
94
|
// The port contributes no flag of its own: renderLaunch spells the local
|
|
95
95
|
// `--port` and the docker host-port mapping from this value, and the
|
|
96
96
|
// health URL and container name derive from it too.
|
|
97
|
+
deploy: { target: 'cli' },
|
|
97
98
|
},
|
|
98
99
|
{
|
|
99
100
|
key: 'kvDtype',
|
|
@@ -115,6 +116,7 @@ export const NINFER_PARAMETERS = [
|
|
|
115
116
|
return { ok: true };
|
|
116
117
|
},
|
|
117
118
|
toArgv: (value) => ['--kv-dtype', String(value)],
|
|
119
|
+
deploy: { target: 'cli' },
|
|
118
120
|
},
|
|
119
121
|
{
|
|
120
122
|
key: 'maxContext',
|
|
@@ -124,6 +126,7 @@ export const NINFER_PARAMETERS = [
|
|
|
124
126
|
defaultValue: 32768,
|
|
125
127
|
group: 'Memory',
|
|
126
128
|
toArgv: (value) => ['--max-context', String(value)],
|
|
129
|
+
deploy: { target: 'cli' },
|
|
127
130
|
},
|
|
128
131
|
{
|
|
129
132
|
key: 'kvCapacity',
|
|
@@ -142,6 +145,7 @@ export const NINFER_PARAMETERS = [
|
|
|
142
145
|
},
|
|
143
146
|
group: 'Memory',
|
|
144
147
|
toArgv: (value) => ['--kv-capacity', String(value)],
|
|
148
|
+
deploy: { target: 'cli' },
|
|
145
149
|
},
|
|
146
150
|
{
|
|
147
151
|
key: 'hostKvMib',
|
|
@@ -159,6 +163,7 @@ export const NINFER_PARAMETERS = [
|
|
|
159
163
|
},
|
|
160
164
|
group: 'Memory',
|
|
161
165
|
toArgv: (value) => ['--host-kv-mib', String(value)],
|
|
166
|
+
deploy: { target: 'cli' },
|
|
162
167
|
},
|
|
163
168
|
{
|
|
164
169
|
key: 'hostStateSlots',
|
|
@@ -167,6 +172,7 @@ export const NINFER_PARAMETERS = [
|
|
|
167
172
|
form: { kind: 'number', min: 0, step: 1, unit: 'slots' },
|
|
168
173
|
group: 'Memory',
|
|
169
174
|
toArgv: (value) => ['--host-state-slots', String(value)],
|
|
175
|
+
deploy: { target: 'cli' },
|
|
170
176
|
},
|
|
171
177
|
{
|
|
172
178
|
key: 'mediaLiveMib',
|
|
@@ -175,6 +181,7 @@ export const NINFER_PARAMETERS = [
|
|
|
175
181
|
form: { kind: 'number', min: 0, step: 1024, unit: 'MiB' },
|
|
176
182
|
group: 'Memory',
|
|
177
183
|
toArgv: (value) => ['--media-live-mib', String(value)],
|
|
184
|
+
deploy: { target: 'cli' },
|
|
178
185
|
},
|
|
179
186
|
{
|
|
180
187
|
key: 'gdnStateFp16',
|
|
@@ -184,6 +191,7 @@ export const NINFER_PARAMETERS = [
|
|
|
184
191
|
defaultValue: false,
|
|
185
192
|
group: 'Memory',
|
|
186
193
|
toArgv: (value) => (value === true ? ['--gdn-state-fp16'] : []),
|
|
194
|
+
deploy: { target: 'cli' },
|
|
187
195
|
},
|
|
188
196
|
{
|
|
189
197
|
key: 'maxConcurrency',
|
|
@@ -193,6 +201,7 @@ export const NINFER_PARAMETERS = [
|
|
|
193
201
|
defaultValue: 1,
|
|
194
202
|
group: 'Concurrency',
|
|
195
203
|
toArgv: (value) => ['--max-concurrency', String(value)],
|
|
204
|
+
deploy: { target: 'cli' },
|
|
196
205
|
},
|
|
197
206
|
{
|
|
198
207
|
key: 'spec',
|
|
@@ -202,6 +211,7 @@ export const NINFER_PARAMETERS = [
|
|
|
202
211
|
defaultValue: 'none',
|
|
203
212
|
group: 'Speculation',
|
|
204
213
|
toArgv: (value) => (value === 'none' ? [] : ['--spec', String(value)]),
|
|
214
|
+
deploy: { target: 'cli' },
|
|
205
215
|
},
|
|
206
216
|
{
|
|
207
217
|
key: 'draftTokens',
|
|
@@ -212,16 +222,18 @@ export const NINFER_PARAMETERS = [
|
|
|
212
222
|
group: 'Speculation',
|
|
213
223
|
requires: (config) => config.spec && config.spec !== 'none' ? null : SPEC_GATE_MESSAGE,
|
|
214
224
|
toArgv: (value) => ['--draft-tokens', String(value)],
|
|
225
|
+
deploy: { target: 'cli' },
|
|
215
226
|
},
|
|
216
227
|
{
|
|
217
228
|
key: 'lmHeadDraft',
|
|
218
229
|
label: 'LM-head draft',
|
|
219
|
-
description: 'Drafts from the small proposal head instead of the full output head, cutting the per-draft projection cost.
|
|
230
|
+
description: 'Drafts from the small proposal head instead of the full output head, cutting the per-draft projection cost.',
|
|
220
231
|
form: { kind: 'boolean' },
|
|
221
232
|
defaultValue: false,
|
|
222
233
|
group: 'Speculation',
|
|
223
234
|
requires: (config) => config.spec === 'mtp' ? null : LM_HEAD_DRAFT_GATE_MESSAGE,
|
|
224
235
|
toArgv: (value) => (value === true ? ['--lm-head-draft'] : []),
|
|
236
|
+
deploy: { target: 'cli' },
|
|
225
237
|
},
|
|
226
238
|
{
|
|
227
239
|
key: 'temperature',
|
|
@@ -231,6 +243,7 @@ export const NINFER_PARAMETERS = [
|
|
|
231
243
|
defaultValue: 0.9,
|
|
232
244
|
group: 'Sampling',
|
|
233
245
|
toArgv: (value) => ['--temperature', String(value)],
|
|
246
|
+
deploy: { target: 'cli' },
|
|
234
247
|
},
|
|
235
248
|
{
|
|
236
249
|
key: 'minP',
|
|
@@ -240,6 +253,7 @@ export const NINFER_PARAMETERS = [
|
|
|
240
253
|
defaultValue: 0.05,
|
|
241
254
|
group: 'Sampling',
|
|
242
255
|
toArgv: (value) => ['--min-p', String(value)],
|
|
256
|
+
deploy: { target: 'cli' },
|
|
243
257
|
},
|
|
244
258
|
{
|
|
245
259
|
key: 'defaultMaxTokens',
|
|
@@ -264,6 +278,7 @@ export const NINFER_PARAMETERS = [
|
|
|
264
278
|
},
|
|
265
279
|
group: 'Sampling',
|
|
266
280
|
toArgv: (value) => ['--default-max-tokens', String(value)],
|
|
281
|
+
deploy: { target: 'cli' },
|
|
267
282
|
},
|
|
268
283
|
{
|
|
269
284
|
key: 'defaultThinkingBudget',
|
|
@@ -272,6 +287,7 @@ export const NINFER_PARAMETERS = [
|
|
|
272
287
|
form: { kind: 'number', min: 0, step: 1, unit: 'tokens' },
|
|
273
288
|
group: 'Sampling',
|
|
274
289
|
toArgv: (value) => ['--default-thinking-budget', String(value)],
|
|
290
|
+
deploy: { target: 'cli' },
|
|
275
291
|
},
|
|
276
292
|
{
|
|
277
293
|
key: 'preserveThinking',
|
|
@@ -281,6 +297,7 @@ export const NINFER_PARAMETERS = [
|
|
|
281
297
|
defaultValue: false,
|
|
282
298
|
group: 'Sampling',
|
|
283
299
|
toArgv: (value) => (value === true ? ['--preserve-thinking'] : []),
|
|
300
|
+
deploy: { target: 'cli' },
|
|
284
301
|
},
|
|
285
302
|
{
|
|
286
303
|
key: 'prefillChunk',
|
|
@@ -310,6 +327,7 @@ export const NINFER_PARAMETERS = [
|
|
|
310
327
|
},
|
|
311
328
|
group: 'Engine',
|
|
312
329
|
toArgv: (value) => ['--prefill-chunk', String(value)],
|
|
330
|
+
deploy: { target: 'cli' },
|
|
313
331
|
},
|
|
314
332
|
{
|
|
315
333
|
key: 'vision',
|
|
@@ -319,6 +337,7 @@ export const NINFER_PARAMETERS = [
|
|
|
319
337
|
defaultValue: false,
|
|
320
338
|
group: 'Engine',
|
|
321
339
|
toArgv: (value) => (value === true ? ['--vision'] : []),
|
|
340
|
+
deploy: { target: 'cli' },
|
|
322
341
|
},
|
|
323
342
|
{
|
|
324
343
|
key: 'structuredOutput',
|
|
@@ -328,6 +347,7 @@ export const NINFER_PARAMETERS = [
|
|
|
328
347
|
defaultValue: false,
|
|
329
348
|
group: 'Engine',
|
|
330
349
|
toArgv: (value) => (value === true ? ['--structured-output'] : []),
|
|
350
|
+
deploy: { target: 'cli' },
|
|
331
351
|
},
|
|
332
352
|
{
|
|
333
353
|
key: 'deviceProfile',
|
|
@@ -337,6 +357,7 @@ export const NINFER_PARAMETERS = [
|
|
|
337
357
|
defaultValue: 'auto',
|
|
338
358
|
group: 'Engine',
|
|
339
359
|
toArgv: (value) => (value === 'auto' ? [] : ['--device-profile', String(value)]),
|
|
360
|
+
deploy: { target: 'cli' },
|
|
340
361
|
},
|
|
341
362
|
{
|
|
342
363
|
key: 'chatTemplate',
|
|
@@ -345,6 +366,7 @@ export const NINFER_PARAMETERS = [
|
|
|
345
366
|
form: { kind: 'combo', options: [...CHAT_TEMPLATE_OPTIONS] },
|
|
346
367
|
group: 'Engine',
|
|
347
368
|
toArgv: (value) => (value ? ['--chat-template', String(value)] : []),
|
|
369
|
+
deploy: { target: 'cli' },
|
|
348
370
|
},
|
|
349
371
|
];
|
|
350
|
-
//# sourceMappingURL=ninfer.js.map
|
|
372
|
+
//# sourceMappingURL=ninfer.js.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The NInfer engine adapter. NInferModelArtifact is the per-model deploy data:
|
|
3
|
+
* the `.ninfer` artifact file, the Hugging Face repo the model download pulls
|
|
4
|
+
* it from, and the `--model-id` alias the server advertises. The data is the
|
|
5
|
+
* surface; adding a model is a data edit here, never an adapter rewire.
|
|
6
|
+
* NInferAdapter is the canonical both-capable engine. `renderLaunch` renders a
|
|
7
|
+
* local `ninfer-serve` process or a `docker run` of the ghcr image from the
|
|
8
|
+
* same spec surface; `deploy` builds the engine in the engine directory (or
|
|
9
|
+
* pulls the image), downloads the model into the model directory, and starts
|
|
10
|
+
* the engine; `healthCheck` polls the health URL; `stop` signals the tracked
|
|
11
|
+
* process and stops the named container.
|
|
12
|
+
* @module dsh-plugin-local-infer/providers/engines/ninfer/ninferAdapter
|
|
13
|
+
*/
|
|
14
|
+
import { EngineAdapter } from '../../../../core/lib/index.js';
|
|
15
|
+
import type { CommandLogger, Config, DeployOptions, DeployResult, EngineLaunchSignature, EnginePlatformConfig, HealthCheckOptions, HealthResult, HardwareProfile, LaunchPlan, LaunchProgress, LifecycleHost, ParameterSpec } from '../../../../core/lib/index.js';
|
|
16
|
+
/**
|
|
17
|
+
* NInferModelArtifact is the per-model deploy data: the `.ninfer` artifact
|
|
18
|
+
* file, the Hugging Face repo the model download pulls it from, and the
|
|
19
|
+
* `--model-id` alias the server advertises. The data is the surface; adding a
|
|
20
|
+
* model is a data edit here, never an adapter rewire.
|
|
21
|
+
*/
|
|
22
|
+
export interface NInferModelArtifact {
|
|
23
|
+
file: string;
|
|
24
|
+
repo: string;
|
|
25
|
+
modelId: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The NInfer model artifacts, keyed by the model registry id. The 27B entry
|
|
29
|
+
* is the default the DEFAULT_MODELS list names; the 35B-A3B entries are the
|
|
30
|
+
* Qwen3.8 measured artifact (`qwen3-35b`) and the Qwen3.6 default
|
|
31
|
+
* (`qwen36-35b`).
|
|
32
|
+
*/
|
|
33
|
+
export declare const NINFER_MODEL_ARTIFACTS: Record<string, NInferModelArtifact>;
|
|
34
|
+
/**
|
|
35
|
+
* The NInfer docker image the adapter pulls and runs. The engineFork platform
|
|
36
|
+
* config overrides the git source for a local build; the image stays the
|
|
37
|
+
* upstream ghcr artifact.
|
|
38
|
+
*/
|
|
39
|
+
export declare const NINFER_DOCKER_IMAGE = "ghcr.io/iamwavecut/ninfer-all";
|
|
40
|
+
/**
|
|
41
|
+
* NInferAdapter is the canonical both-capable engine. `renderLaunch` renders a
|
|
42
|
+
* local `ninfer-serve` process or a `docker run` of the ghcr image from the
|
|
43
|
+
* same spec surface; `deploy` builds the engine in the engine directory (or
|
|
44
|
+
* pulls the image), downloads the model into the model directory, and starts
|
|
45
|
+
* the engine; `healthCheck` polls the health URL; `stop` signals the tracked
|
|
46
|
+
* process and stops the named container.
|
|
47
|
+
*/
|
|
48
|
+
export declare class NInferAdapter extends EngineAdapter {
|
|
49
|
+
readonly id = "ninfer";
|
|
50
|
+
readonly supports: {
|
|
51
|
+
docker: boolean;
|
|
52
|
+
local: boolean;
|
|
53
|
+
};
|
|
54
|
+
private readonly host;
|
|
55
|
+
private readonly children;
|
|
56
|
+
constructor(host?: LifecycleHost);
|
|
57
|
+
parameters(): readonly ParameterSpec[];
|
|
58
|
+
modelRef(config: Config): {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
};
|
|
62
|
+
launchSignature(config?: Config): EngineLaunchSignature;
|
|
63
|
+
renderLaunch(config: Config, _hw: HardwareProfile): LaunchPlan;
|
|
64
|
+
deploy(plan: LaunchPlan, platform?: EnginePlatformConfig, onProgress?: LaunchProgress, options?: DeployOptions): Promise<DeployResult>;
|
|
65
|
+
healthCheck(plan: LaunchPlan, options?: HealthCheckOptions): Promise<HealthResult>;
|
|
66
|
+
stop(plan: LaunchPlan, log?: CommandLogger): Promise<void>;
|
|
67
|
+
private buildMode;
|
|
68
|
+
private port;
|
|
69
|
+
private downloadModel;
|
|
70
|
+
/**
|
|
71
|
+
* resolveChatTemplate rewrites a --chat-template flag that carries an HF repo
|
|
72
|
+
* reference into the local file the engine reads. A value with a slash that
|
|
73
|
+
* is not an absolute path (the combo control's known choices) is a repo the
|
|
74
|
+
* deploy step downloads into the model directory; an already-local path is
|
|
75
|
+
* left as-is. The download is best-effort: a template that is already on
|
|
76
|
+
* disk is used without a re-fetch, and a missing hf CLI leaves the flag
|
|
77
|
+
* untouched so the engine reports the missing template itself.
|
|
78
|
+
*/
|
|
79
|
+
private resolveChatTemplate;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=ninferAdapter.d.ts.map
|