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
|
+
* EngineOsProfile is the per-engine, per-OS build configuration: the build
|
|
3
|
+
* steps run in the checkout (the `{dir}` placeholder is substituted before a
|
|
4
|
+
* step runs), the directory, relative to the checkout, where the build leaves
|
|
5
|
+
* the engine binary, the binary name on this OS (the .exe on Windows), and the
|
|
6
|
+
* shell the build steps run in (absent runs the host's default shell).
|
|
7
|
+
*
|
|
8
|
+
* The profile is the single source the acquisition build step, the platform
|
|
9
|
+
* defaults, and the binary symlink step read, so a build command and its
|
|
10
|
+
* output directory have one home. The distro-specific Linux profiles (Arch,
|
|
11
|
+
* Debian, Fedora) reuse the shared Linux profile, so they carry no build steps
|
|
12
|
+
* of their own. The optional deps list carries the host build dependencies the
|
|
13
|
+
* platform's local build needs.
|
|
14
|
+
* @module dsh-plugin-local-infer/providers/engines/engineOs
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=engineOs.js.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* `docker-compose.yml`, and the `single-user`/`batch` start scripts. The
|
|
5
5
|
* concepts mirror the NInfer surface; the spelling is a `.env` key the
|
|
6
6
|
* `HyperQwenAdapter` (Phase 5) writes into the compose environment.
|
|
7
|
-
* @module dsh-plugin-local-infer/providers/hyperqwen
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwen
|
|
8
8
|
*/
|
|
9
9
|
import type { EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
10
10
|
/**
|
|
@@ -28,4 +28,4 @@ export declare const KV_OPTIONS: readonly EnumOption[];
|
|
|
28
28
|
* adapter composes them into the launch plan.
|
|
29
29
|
*/
|
|
30
30
|
export declare const HYPERQWEN_PARAMETERS: readonly ParameterSpec[];
|
|
31
|
-
//# sourceMappingURL=hyperqwen.d.ts.map
|
|
31
|
+
//# sourceMappingURL=hyperqwen.d.ts.map
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* `docker-compose.yml`, and the `single-user`/`batch` start scripts. The
|
|
5
5
|
* concepts mirror the NInfer surface; the spelling is a `.env` key the
|
|
6
6
|
* `HyperQwenAdapter` (Phase 5) writes into the compose environment.
|
|
7
|
-
* @module dsh-plugin-local-infer/providers/hyperqwen
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwen
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* The speculative-decoding backends Hyper-Qwen serves. The launcher's own
|
|
@@ -57,6 +57,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
57
57
|
defaultValue: 'mtp',
|
|
58
58
|
group: 'Speculation',
|
|
59
59
|
toEnv: (value) => ['SPEC', String(value)],
|
|
60
|
+
deploy: { target: 'env' },
|
|
60
61
|
},
|
|
61
62
|
{
|
|
62
63
|
key: 'draftTokens',
|
|
@@ -69,6 +70,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
69
70
|
? null
|
|
70
71
|
: 'SPEC must be dflash or dflash2; mtp uses its fixed draft count',
|
|
71
72
|
toEnv: (value) => ['DFLASH_TOKENS', String(value)],
|
|
73
|
+
deploy: { target: 'env' },
|
|
72
74
|
},
|
|
73
75
|
{
|
|
74
76
|
key: 'ctx',
|
|
@@ -78,6 +80,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
78
80
|
defaultValue: 'fast',
|
|
79
81
|
group: 'Memory',
|
|
80
82
|
toEnv: (value) => ['CTX', String(value)],
|
|
83
|
+
deploy: { target: 'env' },
|
|
81
84
|
},
|
|
82
85
|
{
|
|
83
86
|
key: 'kv',
|
|
@@ -87,6 +90,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
87
90
|
defaultValue: 'fp8',
|
|
88
91
|
group: 'Memory',
|
|
89
92
|
toEnv: (value) => ['KV', String(value)],
|
|
93
|
+
deploy: { target: 'env' },
|
|
90
94
|
},
|
|
91
95
|
{
|
|
92
96
|
key: 'gpuUtil',
|
|
@@ -96,6 +100,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
96
100
|
defaultValue: 0.93,
|
|
97
101
|
group: 'Memory',
|
|
98
102
|
toEnv: (value) => ['GPU_UTIL', String(value)],
|
|
103
|
+
deploy: { target: 'env' },
|
|
99
104
|
},
|
|
100
105
|
{
|
|
101
106
|
key: 'maxLen',
|
|
@@ -104,6 +109,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
104
109
|
form: { kind: 'number', min: 2048, step: 1024, unit: 'tokens' },
|
|
105
110
|
group: 'Memory',
|
|
106
111
|
toEnv: (value) => ['MAX_LEN', String(value)],
|
|
112
|
+
deploy: { target: 'env' },
|
|
107
113
|
},
|
|
108
114
|
{
|
|
109
115
|
key: 'maxSeqs',
|
|
@@ -112,6 +118,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
112
118
|
form: { kind: 'number', min: 1, max: 8, step: 1, unit: 'sequences' },
|
|
113
119
|
group: 'Concurrency',
|
|
114
120
|
toEnv: (value) => ['MAX_SEQS', String(value)],
|
|
121
|
+
deploy: { target: 'env' },
|
|
115
122
|
},
|
|
116
123
|
{
|
|
117
124
|
key: 'vision',
|
|
@@ -121,6 +128,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
121
128
|
defaultValue: false,
|
|
122
129
|
group: 'Engine',
|
|
123
130
|
toEnv: (value) => ['VISION', value === true ? '1' : '0'],
|
|
131
|
+
deploy: { target: 'env' },
|
|
124
132
|
},
|
|
125
133
|
{
|
|
126
134
|
key: 'pinMemory',
|
|
@@ -130,6 +138,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
130
138
|
defaultValue: false,
|
|
131
139
|
group: 'Engine',
|
|
132
140
|
toEnv: (value) => ['VLLM_WSL2_ENABLE_PIN_MEMORY', value === true ? '1' : '0'],
|
|
141
|
+
deploy: { target: 'env' },
|
|
133
142
|
},
|
|
134
143
|
{
|
|
135
144
|
key: 'prefixCache',
|
|
@@ -139,6 +148,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
139
148
|
defaultValue: true,
|
|
140
149
|
group: 'Engine',
|
|
141
150
|
toEnv: (value) => ['PREFIX_CACHE', value === true ? '1' : '0'],
|
|
151
|
+
deploy: { target: 'env' },
|
|
142
152
|
},
|
|
143
153
|
{
|
|
144
154
|
key: 'apiKey',
|
|
@@ -147,6 +157,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
147
157
|
form: { kind: 'text', placeholder: 'openssl rand -hex 24' },
|
|
148
158
|
group: 'Network',
|
|
149
159
|
toEnv: (value) => ['VLLM_API_KEY', String(value ?? '')],
|
|
160
|
+
deploy: { target: 'env' },
|
|
150
161
|
},
|
|
151
162
|
{
|
|
152
163
|
key: 'port',
|
|
@@ -156,6 +167,7 @@ export const HYPERQWEN_PARAMETERS = [
|
|
|
156
167
|
defaultValue: 18020,
|
|
157
168
|
group: 'Network',
|
|
158
169
|
toEnv: (value) => ['PORT', String(value)],
|
|
170
|
+
deploy: { target: 'env' },
|
|
159
171
|
},
|
|
160
172
|
];
|
|
161
|
-
//# sourceMappingURL=hyperqwen.js.map
|
|
173
|
+
//# sourceMappingURL=hyperqwen.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen engine adapter. HyperQwenAdapter is the docker-compose
|
|
3
|
+
* engine. `renderLaunch` renders a compose plan (the compose file, the
|
|
4
|
+
* profile, and the `.env` the spec surface maps to); `deploy` runs
|
|
5
|
+
* `docker compose up`; `healthCheck` polls the health URL; `stop` runs
|
|
6
|
+
* `docker compose down`.
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenAdapter
|
|
8
|
+
*/
|
|
9
|
+
import { EngineAdapter } from '../../../../core/lib/index.js';
|
|
10
|
+
import type { CommandLogger, Config, DeployOptions, DeployResult, EngineLaunchSignature, EnginePlatformConfig, HealthCheckOptions, HealthResult, HardwareProfile, LaunchPlan, LaunchProgress, LifecycleHost, ParameterSpec } from '../../../../core/lib/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* HyperQwenAdapter is the docker-compose engine. `renderLaunch` renders a
|
|
13
|
+
* compose plan (the compose file, the profile, and the `.env` the spec surface
|
|
14
|
+
* maps to); `deploy` runs `docker compose up`; `healthCheck` polls the health
|
|
15
|
+
* URL; `stop` runs `docker compose down`.
|
|
16
|
+
*/
|
|
17
|
+
export declare class HyperQwenAdapter extends EngineAdapter {
|
|
18
|
+
readonly id = "hyperqwen";
|
|
19
|
+
readonly supports: {
|
|
20
|
+
docker: boolean;
|
|
21
|
+
local: boolean;
|
|
22
|
+
};
|
|
23
|
+
private readonly host;
|
|
24
|
+
constructor(host?: LifecycleHost);
|
|
25
|
+
parameters(): readonly ParameterSpec[];
|
|
26
|
+
modelRef(_config: Config): {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
launchSignature(config?: Config): EngineLaunchSignature;
|
|
31
|
+
renderLaunch(config: Config, _hw: HardwareProfile): LaunchPlan;
|
|
32
|
+
deploy(plan: LaunchPlan, platform?: EnginePlatformConfig, onProgress?: LaunchProgress, options?: DeployOptions): Promise<DeployResult>;
|
|
33
|
+
healthCheck(plan: LaunchPlan, options?: HealthCheckOptions): Promise<HealthResult>;
|
|
34
|
+
stop(plan: LaunchPlan, log?: CommandLogger): Promise<void>;
|
|
35
|
+
private port;
|
|
36
|
+
private profile;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=hyperqwenAdapter.d.ts.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen engine adapter. HyperQwenAdapter is the docker-compose
|
|
3
|
+
* engine. `renderLaunch` renders a compose plan (the compose file, the
|
|
4
|
+
* profile, and the `.env` the spec surface maps to); `deploy` runs
|
|
5
|
+
* `docker compose up`; `healthCheck` polls the health URL; `stop` runs
|
|
6
|
+
* `docker compose down`.
|
|
7
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenAdapter
|
|
8
|
+
*/
|
|
9
|
+
import { EngineAdapter, autoRebuildEnabled, formatLaunchCommand } from '../../../../core/lib/index.js';
|
|
10
|
+
import { auditRun, customArgEnv, envFromSpecs, nodeLifecycleHost, pollHealth } from "../../adapters.js";
|
|
11
|
+
import { HYPERQWEN_PARAMETERS } from "./hyperqwen.js";
|
|
12
|
+
/**
|
|
13
|
+
* HyperQwenAdapter is the docker-compose engine. `renderLaunch` renders a
|
|
14
|
+
* compose plan (the compose file, the profile, and the `.env` the spec surface
|
|
15
|
+
* maps to); `deploy` runs `docker compose up`; `healthCheck` polls the health
|
|
16
|
+
* URL; `stop` runs `docker compose down`.
|
|
17
|
+
*/
|
|
18
|
+
export class HyperQwenAdapter extends EngineAdapter {
|
|
19
|
+
id = 'hyperqwen';
|
|
20
|
+
supports = { docker: true, local: false };
|
|
21
|
+
host;
|
|
22
|
+
constructor(host = nodeLifecycleHost) {
|
|
23
|
+
super();
|
|
24
|
+
this.host = host;
|
|
25
|
+
}
|
|
26
|
+
parameters() {
|
|
27
|
+
return HYPERQWEN_PARAMETERS;
|
|
28
|
+
}
|
|
29
|
+
modelRef(_config) {
|
|
30
|
+
// vLLM serves the model under the name the compose file passes, and the
|
|
31
|
+
// plugin tracks no per-model data for Hyper-Qwen yet, so the engine id is
|
|
32
|
+
// the stable entry the registrar publishes until that data lands.
|
|
33
|
+
return { id: 'hyperqwen', name: 'Hyper-Qwen' };
|
|
34
|
+
}
|
|
35
|
+
launchSignature(config = {}) {
|
|
36
|
+
// The compose host process is `docker compose ... up`, so the marker is
|
|
37
|
+
// the command, not an image. The toEnv keys (SPEC, CTX, KV, ...) name the
|
|
38
|
+
// .env the compose file reads, not the host process env, so they ride
|
|
39
|
+
// along as the env-key element the matcher checks when a process line
|
|
40
|
+
// carries env data.
|
|
41
|
+
const port = this.port(config);
|
|
42
|
+
const envKeys = Object.keys(envFromSpecs(HYPERQWEN_PARAMETERS, config));
|
|
43
|
+
return { binary: 'docker compose', port, envKeys };
|
|
44
|
+
}
|
|
45
|
+
renderLaunch(config, _hw) {
|
|
46
|
+
const port = this.port(config);
|
|
47
|
+
const profile = this.profile(config);
|
|
48
|
+
// The spec env and the card's Custom Arguments merge into one env map: the
|
|
49
|
+
// spec keys are the .env the compose file reads, and the custom rows are
|
|
50
|
+
// the user's own overrides appended after them.
|
|
51
|
+
const env = { ...envFromSpecs(HYPERQWEN_PARAMETERS, config), ...customArgEnv(config) };
|
|
52
|
+
const composeFile = typeof config.composeFile === 'string' ? config.composeFile : 'docker-compose.yml';
|
|
53
|
+
return {
|
|
54
|
+
engineId: this.id,
|
|
55
|
+
kind: 'compose',
|
|
56
|
+
env,
|
|
57
|
+
composeFile,
|
|
58
|
+
profile,
|
|
59
|
+
port,
|
|
60
|
+
healthUrl: `http://127.0.0.1:${port}/health`,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
async deploy(plan, platform, onProgress, options) {
|
|
64
|
+
// The card's docker-tag field carries the compose arguments (the profile
|
|
65
|
+
// the up step selects); the deploy step applies it to the plan so the up
|
|
66
|
+
// line and the card's Logs section agree.
|
|
67
|
+
if (platform?.dockerTag !== undefined) {
|
|
68
|
+
plan.composeArgs = platform.dockerTag;
|
|
69
|
+
}
|
|
70
|
+
// The core formatter is the single source of the compose up line: the
|
|
71
|
+
// card's Logs section prints the same string this run gets. Auto Rebuild
|
|
72
|
+
// off (the card's checkbox) renders the `--pull missing` line, so the up
|
|
73
|
+
// step starts the already-present image with the plan's parameters.
|
|
74
|
+
const autoRebuild = autoRebuildEnabled(options?.autoRebuild);
|
|
75
|
+
const command = formatLaunchCommand(plan, autoRebuild);
|
|
76
|
+
if (command === undefined) {
|
|
77
|
+
return { ok: false, detail: 'compose plan carries no command' };
|
|
78
|
+
}
|
|
79
|
+
if (autoRebuild) {
|
|
80
|
+
// The compose up is the docker build step: the card's button reads
|
|
81
|
+
// "Building..." for it. A spawn-only launch (Auto Rebuild off) acquires
|
|
82
|
+
// nothing, so it announces no build phase, the same rule the
|
|
83
|
+
// pull-guarded docker adapters follow. The `$ <command>` line reaches
|
|
84
|
+
// the launch run's log sink before the child spawns, so the run reads
|
|
85
|
+
// the command first.
|
|
86
|
+
onProgress?.('build');
|
|
87
|
+
}
|
|
88
|
+
const up = await auditRun(this.host, command, options?.onLog);
|
|
89
|
+
if (!up.ok) {
|
|
90
|
+
return { ok: false, detail: `compose up failed: ${up.detail ?? 'unknown'}` };
|
|
91
|
+
}
|
|
92
|
+
return { ok: true };
|
|
93
|
+
}
|
|
94
|
+
async healthCheck(plan, options) {
|
|
95
|
+
return pollHealth(this.host, plan, options);
|
|
96
|
+
}
|
|
97
|
+
async stop(plan, log) {
|
|
98
|
+
// The down step brings down the containers the up step started, so it
|
|
99
|
+
// runs the same compose arguments (the profile the up selected); an
|
|
100
|
+
// absent composeArgs falls back to the engine's default profile. The
|
|
101
|
+
// `$ <command>` line reaches the stop run's log sink before the child.
|
|
102
|
+
const composeArgs = plan.composeArgs?.split(/\s+/).filter((token) => token !== '');
|
|
103
|
+
const args = composeArgs !== undefined && composeArgs.length > 0
|
|
104
|
+
? composeArgs.join(' ')
|
|
105
|
+
: `--profile ${plan.profile ?? 'single'}`;
|
|
106
|
+
await auditRun(this.host, `docker compose -f ${plan.composeFile ?? 'docker-compose.yml'} ${args} down`, log);
|
|
107
|
+
}
|
|
108
|
+
port(config) {
|
|
109
|
+
return typeof config.port === 'number' ? config.port : 18020;
|
|
110
|
+
}
|
|
111
|
+
profile(config) {
|
|
112
|
+
return typeof config.profile === 'string' ? config.profile : 'single';
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=hyperqwenAdapter.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Arch Linux build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps; this
|
|
4
|
+
* profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenArch
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const HYPERQWEN_ARCH: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=hyperqwenArch.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Arch Linux build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps; this
|
|
4
|
+
* profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenArch
|
|
6
|
+
*/
|
|
7
|
+
import { HYPERQWEN_LINUX } from "./hyperqwenLinux.js";
|
|
8
|
+
export const HYPERQWEN_ARCH = HYPERQWEN_LINUX;
|
|
9
|
+
//# sourceMappingURL=hyperqwenArch.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Debian build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps; this
|
|
4
|
+
* profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenDebian
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const HYPERQWEN_DEBIAN: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=hyperqwenDebian.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Debian build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps; this
|
|
4
|
+
* profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenDebian
|
|
6
|
+
*/
|
|
7
|
+
import { HYPERQWEN_LINUX } from "./hyperqwenLinux.js";
|
|
8
|
+
export const HYPERQWEN_DEBIAN = HYPERQWEN_LINUX;
|
|
9
|
+
//# sourceMappingURL=hyperqwenDebian.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Fedora build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps; this
|
|
4
|
+
* profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenFedora
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const HYPERQWEN_FEDORA: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=hyperqwenFedora.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Fedora build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps; this
|
|
4
|
+
* profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenFedora
|
|
6
|
+
*/
|
|
7
|
+
import { HYPERQWEN_LINUX } from "./hyperqwenLinux.js";
|
|
8
|
+
export const HYPERQWEN_FEDORA = HYPERQWEN_LINUX;
|
|
9
|
+
//# sourceMappingURL=hyperqwenFedora.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen shared Linux build profile. Hyper-Qwen is the compose-driven
|
|
3
|
+
* vLLM engine: the compose up pulls the image, so it carries no local build
|
|
4
|
+
* steps, no build directory, and no local binary. The distro profiles (Arch,
|
|
5
|
+
* Debian, Fedora) reuse this profile.
|
|
6
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenLinux
|
|
7
|
+
*/
|
|
8
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
9
|
+
export declare const HYPERQWEN_LINUX: EngineOsProfile;
|
|
10
|
+
//# sourceMappingURL=hyperqwenLinux.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen shared Linux build profile. Hyper-Qwen is the compose-driven
|
|
3
|
+
* vLLM engine: the compose up pulls the image, so it carries no local build
|
|
4
|
+
* steps, no build directory, and no local binary. The distro profiles (Arch,
|
|
5
|
+
* Debian, Fedora) reuse this profile.
|
|
6
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenLinux
|
|
7
|
+
*/
|
|
8
|
+
export const HYPERQWEN_LINUX = {
|
|
9
|
+
buildSteps: [],
|
|
10
|
+
// Hyper-Qwen is docker-only: the compose up pulls the vLLM image, so the
|
|
11
|
+
// local build needs nothing outside the host.
|
|
12
|
+
deps: [],
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=hyperqwenLinux.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen macOS build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps on any
|
|
4
|
+
* platform; this profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenMacOS
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const HYPERQWEN_MACOS: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=hyperqwenMacOS.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen macOS build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps on any
|
|
4
|
+
* platform; this profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenMacOS
|
|
6
|
+
*/
|
|
7
|
+
import { HYPERQWEN_LINUX } from "./hyperqwenLinux.js";
|
|
8
|
+
export const HYPERQWEN_MACOS = HYPERQWEN_LINUX;
|
|
9
|
+
//# sourceMappingURL=hyperqwenMacOS.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Windows build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps on any
|
|
4
|
+
* platform; this profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenWindows
|
|
6
|
+
*/
|
|
7
|
+
import type { EngineOsProfile } from '../engineOs.ts';
|
|
8
|
+
export declare const HYPERQWEN_WINDOWS: EngineOsProfile;
|
|
9
|
+
//# sourceMappingURL=hyperqwenWindows.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Hyper-Qwen Windows build profile. Hyper-Qwen is compose-driven (the
|
|
3
|
+
* compose up pulls the vLLM image), so it carries no local build steps on any
|
|
4
|
+
* platform; this profile reuses the shared Linux profile.
|
|
5
|
+
* @module dsh-plugin-local-infer/providers/engines/hyperqwen/hyperqwenWindows
|
|
6
|
+
*/
|
|
7
|
+
import { HYPERQWEN_LINUX } from "./hyperqwenLinux.js";
|
|
8
|
+
export const HYPERQWEN_WINDOWS = HYPERQWEN_LINUX;
|
|
9
|
+
//# sourceMappingURL=hyperqwenWindows.js.map
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* this surface, so the form renderer shows them only while the Infernix
|
|
15
15
|
* engine is selected, and the adapters of the other engines never spell
|
|
16
16
|
* them. Adding a flag here is a data edit, never a core rewire.
|
|
17
|
-
* @module dsh-plugin-local-infer/providers/infernix
|
|
17
|
+
* @module dsh-plugin-local-infer/providers/engines/infernix/infernix
|
|
18
18
|
*/
|
|
19
19
|
import type { Config, EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
20
20
|
/**
|
|
@@ -142,9 +142,12 @@ export declare function infernixDraftModelPath(config: Config): string | null;
|
|
|
142
142
|
* layout the `--draft-model` path expects) when a preset is selected, and the
|
|
143
143
|
* model key's PLE n-gram volume (into the model directory) when the key names
|
|
144
144
|
* one. The commands are the single source the Get route streams, so a Get
|
|
145
|
-
* leaves the model directory ready to launch.
|
|
145
|
+
* leaves the model directory ready to launch. Every command renders through
|
|
146
|
+
* the core hfDownloadFileCommand builder, the single source of the
|
|
147
|
+
* `--format human` flag contract (the flag overrides the non-TTY default so
|
|
148
|
+
* the hf CLI prints tqdm progress lines to stderr).
|
|
146
149
|
*/
|
|
147
|
-
export declare function infernixGetDownloads(config: Config, modelDir: string): string[];
|
|
150
|
+
export declare function infernixGetDownloads(config: Config, modelDir: string, useHubCache?: boolean): string[];
|
|
148
151
|
/**
|
|
149
152
|
* The Infernix `ParameterSpec` surface, in form order. The `group` field is
|
|
150
153
|
* the form section; specs without a group render under `General`. The
|
|
@@ -167,4 +170,4 @@ export declare function infernixModelKey(config: Config): string;
|
|
|
167
170
|
* a bare config always renders a plan.
|
|
168
171
|
*/
|
|
169
172
|
export declare function infernixArtifactFor(modelKey: string): InfernixModelArtifact;
|
|
170
|
-
//# sourceMappingURL=infernix.d.ts.map
|
|
173
|
+
//# sourceMappingURL=infernix.d.ts.map
|