dsh-plugin-local-infer 0.1.1 → 0.1.3
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 +14 -3
- package/docs/zh/README.md +14 -3
- package/dsh/client.js +1214 -242
- package/package.json +16 -10
- package/packages/core/lib/adapter.d.ts +119 -6
- package/packages/core/lib/deps.d.ts +4 -3
- package/packages/core/lib/index.d.ts +2 -1
- package/packages/core/lib/index.js +1 -0
- package/packages/core/lib/launch-command.d.ts +13 -0
- package/packages/core/lib/launch-command.js +64 -0
- package/packages/core/lib/models.d.ts +2 -1
- package/packages/core/lib/models.js +10 -1
- package/packages/core/lib/registrar.d.ts +5 -5
- package/packages/core/lib/registrar.js +3 -3
- package/packages/core/lib/status.d.ts +9 -1
- package/packages/core/lib/status.js +6 -1
- package/packages/core/package.json +1 -1
- package/packages/providers/lib/acquire.d.ts +127 -0
- package/packages/providers/lib/acquire.js +346 -0
- package/packages/providers/lib/adapters.d.ts +19 -172
- package/packages/providers/lib/adapters.js +114 -659
- package/packages/providers/lib/deps.d.ts +26 -2
- package/packages/providers/lib/deps.js +37 -4
- package/packages/providers/lib/engines/hyperqwenAdapter.d.ts +38 -0
- package/packages/providers/lib/engines/hyperqwenAdapter.js +105 -0
- package/packages/providers/lib/engines/infernix.d.ts +170 -0
- package/packages/providers/lib/engines/infernix.js +671 -0
- package/packages/providers/lib/engines/infernixAdapter.d.ts +53 -0
- package/packages/providers/lib/engines/infernixAdapter.js +202 -0
- package/packages/providers/lib/engines/llamacppAdapter.d.ts +51 -0
- package/packages/providers/lib/engines/llamacppAdapter.js +232 -0
- package/packages/providers/lib/{ninfer.d.ts → engines/ninfer.d.ts} +7 -0
- package/packages/providers/lib/{ninfer.js → engines/ninfer.js} +8 -1
- package/packages/providers/lib/engines/ninferAdapter.d.ts +82 -0
- package/packages/providers/lib/engines/ninferAdapter.js +324 -0
- package/packages/providers/lib/engines/strata.d.ts +53 -0
- package/packages/providers/lib/engines/strata.js +197 -0
- package/packages/providers/lib/engines/strataAdapter.d.ts +98 -0
- package/packages/providers/lib/engines/strataAdapter.js +427 -0
- package/packages/providers/lib/engines.d.ts +5 -3
- package/packages/providers/lib/engines.js +16 -8
- package/packages/providers/lib/guidelines.js +16 -0
- package/packages/providers/lib/index.d.ts +21 -10
- package/packages/providers/lib/index.js +23 -9
- package/packages/providers/lib/model-defaults.d.ts +8 -5
- package/packages/providers/lib/model-defaults.js +47 -5
- package/packages/providers/lib/platform.d.ts +31 -0
- package/packages/providers/lib/platform.js +64 -0
- package/packages/providers/package.json +1 -1
- package/packages/service/lib/index.d.ts +74 -22
- package/packages/service/lib/index.js +354 -44
- package/packages/service/lib/types.d.ts +48 -5
- package/packages/service/package.json +1 -1
- package/packages/tool/package.json +1 -1
- package/packages/ui/lib/config.d.ts +79 -0
- package/packages/ui/lib/config.js +235 -0
- package/packages/ui/lib/deps.d.ts +3 -3
- package/packages/ui/lib/ops/engine.d.ts +108 -0
- package/packages/ui/lib/ops/engine.js +493 -0
- package/packages/ui/lib/ops/hf.d.ts +27 -0
- package/packages/ui/lib/ops/hf.js +60 -0
- package/packages/ui/lib/ops/logs.d.ts +23 -0
- package/packages/ui/lib/ops/logs.js +58 -0
- package/packages/ui/lib/ops/model.d.ts +79 -0
- package/packages/ui/lib/ops/model.js +130 -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 +96 -357
- package/packages/ui/lib/route.js +123 -1415
- package/packages/ui/lib/routes/chat-template.d.ts +14 -0
- package/packages/ui/lib/routes/chat-template.js +37 -0
- package/packages/ui/lib/routes/deps.d.ts +16 -0
- package/packages/ui/lib/routes/deps.js +27 -0
- package/packages/ui/lib/routes/download.d.ts +16 -0
- package/packages/ui/lib/routes/download.js +48 -0
- package/packages/ui/lib/routes/get.d.ts +18 -0
- package/packages/ui/lib/routes/get.js +57 -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 +18 -0
- package/packages/ui/lib/routes/launch.js +50 -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 +139 -0
- package/packages/ui/lib/routes/stop.d.ts +16 -0
- package/packages/ui/lib/routes/stop.js +29 -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 +31 -0
- package/packages/ui/lib/viewmodels/deps.js +89 -0
- package/packages/ui/lib/viewmodels/depsHelpers.d.ts +28 -0
- package/packages/ui/lib/viewmodels/depsHelpers.js +33 -0
- package/packages/ui/lib/viewmodels/summary.d.ts +140 -0
- package/packages/ui/lib/viewmodels/summary.js +225 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.d.ts +30 -0
- package/packages/ui/lib/viewmodels/summaryHelpers.js +42 -0
- package/packages/ui/package.json +1 -1
- package/packages/providers/lib/strata.d.ts +0 -15
- package/packages/providers/lib/strata.js +0 -14
- /package/packages/providers/lib/{hyperqwen.d.ts → engines/hyperqwen.d.ts} +0 -0
- /package/packages/providers/lib/{hyperqwen.js → engines/hyperqwen.js} +0 -0
- /package/packages/providers/lib/{llamacpp.d.ts → engines/llamacpp.d.ts} +0 -0
- /package/packages/providers/lib/{llamacpp.js → engines/llamacpp.js} +0 -0
|
@@ -152,6 +152,26 @@ export declare const SYSTEM_DEPS: {
|
|
|
152
152
|
};
|
|
153
153
|
};
|
|
154
154
|
};
|
|
155
|
+
git: {
|
|
156
|
+
id: string;
|
|
157
|
+
purpose: string;
|
|
158
|
+
requiresSudo: true;
|
|
159
|
+
detect: (hw: HardwareProfile) => Promise<boolean>;
|
|
160
|
+
install: {
|
|
161
|
+
apt: {
|
|
162
|
+
commands: string[];
|
|
163
|
+
};
|
|
164
|
+
dnf: {
|
|
165
|
+
commands: string[];
|
|
166
|
+
};
|
|
167
|
+
pacman: {
|
|
168
|
+
commands: string[];
|
|
169
|
+
};
|
|
170
|
+
brew: {
|
|
171
|
+
commands: string[];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
};
|
|
155
175
|
docker: {
|
|
156
176
|
id: string;
|
|
157
177
|
purpose: string;
|
|
@@ -217,8 +237,12 @@ export declare const SYSTEM_DEPS: {
|
|
|
217
237
|
* The per-engine dep plans, keyed by engine id. The local NInfer list is the
|
|
218
238
|
* qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
|
|
219
239
|
* docker lists are the container runtime plus the GPU toolkit plus the hf
|
|
220
|
-
* CLI.
|
|
221
|
-
*
|
|
240
|
+
* CLI. Infernix builds through the engine's own cmake preset, so its local
|
|
241
|
+
* list is the same toolchain as NInfer's, and its docker list stays empty
|
|
242
|
+
* because the engine ships no container image. llama.cpp carries a thin
|
|
243
|
+
* cmake-plus-hf list. Strata carries one list per build mode: the source
|
|
244
|
+
* build needs git and curl, the binary install needs curl, and the docker
|
|
245
|
+
* mode needs the container runtime plus the GPU toolkit.
|
|
222
246
|
*/
|
|
223
247
|
export declare const ENGINE_DEP_PLANS: Record<string, EngineDepPlan>;
|
|
224
248
|
//# sourceMappingURL=deps.d.ts.map
|
|
@@ -136,6 +136,18 @@ export const SYSTEM_DEPS = {
|
|
|
136
136
|
},
|
|
137
137
|
},
|
|
138
138
|
},
|
|
139
|
+
git: {
|
|
140
|
+
id: 'git',
|
|
141
|
+
purpose: 'clones the engine source',
|
|
142
|
+
requiresSudo: true,
|
|
143
|
+
detect: probe('git', ['--version']),
|
|
144
|
+
install: {
|
|
145
|
+
apt: { commands: ['sudo apt install git'] },
|
|
146
|
+
dnf: { commands: ['sudo dnf install git'] },
|
|
147
|
+
pacman: { commands: ['sudo pacman -S --noconfirm git'] },
|
|
148
|
+
brew: { commands: ['brew install git'] },
|
|
149
|
+
},
|
|
150
|
+
},
|
|
139
151
|
docker: {
|
|
140
152
|
id: 'docker',
|
|
141
153
|
purpose: 'runs the engine in a container',
|
|
@@ -189,8 +201,12 @@ export const SYSTEM_DEPS = {
|
|
|
189
201
|
* The per-engine dep plans, keyed by engine id. The local NInfer list is the
|
|
190
202
|
* qwen-ninfer header's toolchain plus the CUDA toolkit and the hf CLI; the
|
|
191
203
|
* docker lists are the container runtime plus the GPU toolkit plus the hf
|
|
192
|
-
* CLI.
|
|
193
|
-
*
|
|
204
|
+
* CLI. Infernix builds through the engine's own cmake preset, so its local
|
|
205
|
+
* list is the same toolchain as NInfer's, and its docker list stays empty
|
|
206
|
+
* because the engine ships no container image. llama.cpp carries a thin
|
|
207
|
+
* cmake-plus-hf list. Strata carries one list per build mode: the source
|
|
208
|
+
* build needs git and curl, the binary install needs curl, and the docker
|
|
209
|
+
* mode needs the container runtime plus the GPU toolkit.
|
|
194
210
|
*/
|
|
195
211
|
export const ENGINE_DEP_PLANS = {
|
|
196
212
|
ninfer: {
|
|
@@ -213,9 +229,26 @@ export const ENGINE_DEP_PLANS = {
|
|
|
213
229
|
local: [SYSTEM_DEPS.cmake, SYSTEM_DEPS.hfCli],
|
|
214
230
|
docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.hfCli],
|
|
215
231
|
},
|
|
232
|
+
infernix: {
|
|
233
|
+
local: [
|
|
234
|
+
SYSTEM_DEPS.cmake,
|
|
235
|
+
SYSTEM_DEPS.ninja,
|
|
236
|
+
SYSTEM_DEPS.pkgConfig,
|
|
237
|
+
SYSTEM_DEPS.ffmpeg,
|
|
238
|
+
SYSTEM_DEPS.curl,
|
|
239
|
+
SYSTEM_DEPS.cudaToolkit,
|
|
240
|
+
SYSTEM_DEPS.hfCli,
|
|
241
|
+
],
|
|
242
|
+
docker: [],
|
|
243
|
+
},
|
|
216
244
|
strata: {
|
|
217
|
-
|
|
218
|
-
|
|
245
|
+
// The source build git-clones the repo and runs setup.sh, which downloads
|
|
246
|
+
// what it needs; the binary install is the one-line curl script; the docker
|
|
247
|
+
// mode needs the container runtime plus the GPU toolkit (the model downloads
|
|
248
|
+
// inside the container, so no hf CLI).
|
|
249
|
+
local: [SYSTEM_DEPS.git, SYSTEM_DEPS.curl],
|
|
250
|
+
docker: [SYSTEM_DEPS.docker, SYSTEM_DEPS.nvidiaContainerToolkit],
|
|
251
|
+
binary: [SYSTEM_DEPS.curl],
|
|
219
252
|
},
|
|
220
253
|
};
|
|
221
254
|
//# sourceMappingURL=deps.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/hyperqwenAdapter
|
|
8
|
+
*/
|
|
9
|
+
import { EngineAdapter } from '../../../core/lib/index.js';
|
|
10
|
+
import type { 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): Promise<void>;
|
|
35
|
+
private port;
|
|
36
|
+
private profile;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=hyperqwenAdapter.d.ts.map
|
|
@@ -0,0 +1,105 @@
|
|
|
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/hyperqwenAdapter
|
|
8
|
+
*/
|
|
9
|
+
import { EngineAdapter, formatLaunchCommand } from '../../../core/lib/index.js';
|
|
10
|
+
import { 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.
|
|
72
|
+
const command = formatLaunchCommand(plan);
|
|
73
|
+
if (command === undefined) {
|
|
74
|
+
return { ok: false, detail: 'compose plan carries no command' };
|
|
75
|
+
}
|
|
76
|
+
// The compose up is the docker build step: the card's button reads
|
|
77
|
+
// "Building..." for it.
|
|
78
|
+
onProgress?.('build');
|
|
79
|
+
const up = await this.host.run(command);
|
|
80
|
+
if (!up.ok) {
|
|
81
|
+
return { ok: false, detail: `compose up failed: ${up.detail ?? 'unknown'}` };
|
|
82
|
+
}
|
|
83
|
+
return { ok: true };
|
|
84
|
+
}
|
|
85
|
+
async healthCheck(plan, options) {
|
|
86
|
+
return pollHealth(this.host, plan, options);
|
|
87
|
+
}
|
|
88
|
+
async stop(plan) {
|
|
89
|
+
// The down step brings down the containers the up step started, so it
|
|
90
|
+
// runs the same compose arguments (the profile the up selected); an
|
|
91
|
+
// absent composeArgs falls back to the engine's default profile.
|
|
92
|
+
const composeArgs = plan.composeArgs?.split(/\s+/).filter((token) => token !== '');
|
|
93
|
+
const args = composeArgs !== undefined && composeArgs.length > 0
|
|
94
|
+
? composeArgs.join(' ')
|
|
95
|
+
: `--profile ${plan.profile ?? 'single'}`;
|
|
96
|
+
await this.host.run(`docker compose -f ${plan.composeFile ?? 'docker-compose.yml'} ${args} down`);
|
|
97
|
+
}
|
|
98
|
+
port(config) {
|
|
99
|
+
return typeof config.port === 'number' ? config.port : 18020;
|
|
100
|
+
}
|
|
101
|
+
profile(config) {
|
|
102
|
+
return typeof config.profile === 'string' ? config.profile : 'single';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=hyperqwenAdapter.js.map
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infernix parameter surface. The declarative `ParameterSpec` data for the
|
|
3
|
+
* Infernix engine (https://github.com/wallawalla47/infernix), a C++/CUDA
|
|
4
|
+
* fork of NInfer tuned for Qwen models on a single RTX 50-series GPU,
|
|
5
|
+
* sourced from the project's `docs/cli.md` and `docs/serving.md`. The
|
|
6
|
+
* spelling is an `infernix-serve` CLI flag the `InfernixAdapter` passes onto
|
|
7
|
+
* the process.
|
|
8
|
+
*
|
|
9
|
+
* The surface carries the flags the NInfer surface shares (KV format,
|
|
10
|
+
* context, speculation, sampling) plus the Infernix-only fields: the
|
|
11
|
+
* `--ngram-volume` PLE table for Qwen3.8-Flash-Next, the `--draft-model`
|
|
12
|
+
* DFlash2 companion drafter, the n-gram copy proposal set, the offloaded-
|
|
13
|
+
* expert memory tiers, and the quality routes. Those fields live only on
|
|
14
|
+
* this surface, so the form renderer shows them only while the Infernix
|
|
15
|
+
* engine is selected, and the adapters of the other engines never spell
|
|
16
|
+
* them. Adding a flag here is a data edit, never a core rewire.
|
|
17
|
+
* @module dsh-plugin-local-infer/providers/infernix
|
|
18
|
+
*/
|
|
19
|
+
import type { Config, EnumOption, ParameterSpec } from 'dsh-plugin-local-infer/core';
|
|
20
|
+
/**
|
|
21
|
+
* The KV cache quantization formats Infernix serves, in the order the form
|
|
22
|
+
* dropdown lists them. The set differs from NInfer's: the 2-bit and 4-bit-
|
|
23
|
+
* K vector-quantized tiers (vq2, k4v2) replace the KVarN rk tiers, and both
|
|
24
|
+
* hold three to four times the context of INT8 in the same VRAM.
|
|
25
|
+
*/
|
|
26
|
+
export declare const INFERNIX_KV_DTYPE_OPTIONS: readonly EnumOption[];
|
|
27
|
+
/**
|
|
28
|
+
* The speculative-decoding backends. `none` loads no speculative backend at
|
|
29
|
+
* all, which is the smallest resident profile.
|
|
30
|
+
*/
|
|
31
|
+
export declare const INFERNIX_SPEC_OPTIONS: readonly EnumOption[];
|
|
32
|
+
/**
|
|
33
|
+
* The PLE n-gram table residency modes for Qwen3.8-Flash-Next. `auto` takes
|
|
34
|
+
* pinned RAM only when the RAM ledger keeps every expert in RAM beside it.
|
|
35
|
+
*/
|
|
36
|
+
export declare const INFERNIX_NGRAM_RESIDENCY_OPTIONS: readonly EnumOption[];
|
|
37
|
+
/**
|
|
38
|
+
* The reasoning-loop guard modes. The guard ends a reply, or closes the
|
|
39
|
+
* thinking, when the open thinking keeps repeating whole passages.
|
|
40
|
+
*/
|
|
41
|
+
export declare const INFERNIX_REASONING_LOOP_OPTIONS: readonly EnumOption[];
|
|
42
|
+
/**
|
|
43
|
+
* The gate message the form shows while the speculation fields are greyed
|
|
44
|
+
* out. It names the fix (pick a backend) and the backends that unlock the
|
|
45
|
+
* fields, so a first-time user knows the next click, not just the constraint.
|
|
46
|
+
*/
|
|
47
|
+
export declare const SPEC_GATE_MESSAGE = "Pick a speculation backend first (mtp, dflash, or dflash2)";
|
|
48
|
+
/**
|
|
49
|
+
* The gate message the form shows while the dflash2-only fields are greyed
|
|
50
|
+
* out. It names the fix (pick dflash2) and the reason, so a first-time user
|
|
51
|
+
* knows the next click, not just the constraint.
|
|
52
|
+
*/
|
|
53
|
+
export declare const DFLASH2_GATE_MESSAGE = "Pick the dflash2 speculation backend first; the DFlash2 drafter loads with dflash2";
|
|
54
|
+
/**
|
|
55
|
+
* InfernixModelArtifact is the per-model deploy data: the `.infernix` (or
|
|
56
|
+
* `.ninfer`) artifact files, the Hugging Face repo the model download pulls
|
|
57
|
+
* them from, and the model id the server advertises on its OpenAI endpoint.
|
|
58
|
+
* A multi-file artifact (Qwen3.8-Flash-Next) names every shard in `files`
|
|
59
|
+
* and the engine loads the first shard from the model directory. The data
|
|
60
|
+
* is the surface; adding a model is a data edit here, never an adapter
|
|
61
|
+
* rewire.
|
|
62
|
+
*/
|
|
63
|
+
export interface InfernixModelArtifact {
|
|
64
|
+
file: string;
|
|
65
|
+
files?: string[];
|
|
66
|
+
repo: string;
|
|
67
|
+
modelId: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The Infernix model artifacts, keyed by the config model key. The 27B
|
|
71
|
+
* NVIDIA NVFP4 entry is the default the DEFAULT_MODELS list names; an id no
|
|
72
|
+
* entry names falls back to it, so a bare config always renders a plan. The
|
|
73
|
+
* Flash-Next entry is the recommended Dense8 conversion: its download pulls
|
|
74
|
+
* the whole repo, which carries the FP8 n-gram volume beside the shards, so
|
|
75
|
+
* the `--ngram-volume` flag points at a file the same download left on disk.
|
|
76
|
+
*/
|
|
77
|
+
export declare const INFERNIX_MODEL_ARTIFACTS: Record<string, InfernixModelArtifact>;
|
|
78
|
+
/**
|
|
79
|
+
* InfernixDFlash2Model is one common DFlash2 drafter the form's DFlash2 model
|
|
80
|
+
* dropdown offers: the `.infernix` artifact file the hf CLI pulls, the Hugging
|
|
81
|
+
* Face repo it lives in, and the label the dropdown shows. The DFlash2 drafter
|
|
82
|
+
* is a companion model that runs beside a Flash-Next conversion, so it
|
|
83
|
+
* downloads separately from the main model and loads through `--draft-model`.
|
|
84
|
+
* The data is the surface; adding a drafter is a data edit here, never an
|
|
85
|
+
* adapter rewire.
|
|
86
|
+
*/
|
|
87
|
+
export interface InfernixDFlash2Model {
|
|
88
|
+
file: string;
|
|
89
|
+
repo: string;
|
|
90
|
+
label: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* The common DFlash2 drafters the Infernix DFlash2 model dropdown offers, in
|
|
94
|
+
* dropdown order. The Flash-Next DFlash2 is Inco AI's drafter (the 776 MB
|
|
95
|
+
* `.infernix` artifact) that the Infernix README recommends beside any
|
|
96
|
+
* Flash-Next conversion. The list is the single source the dropdown, the
|
|
97
|
+
* `--draft-model` path resolver, and the Get download step read.
|
|
98
|
+
*/
|
|
99
|
+
export declare const INFERNIX_DFLASH2_MODELS: readonly InfernixDFlash2Model[];
|
|
100
|
+
/**
|
|
101
|
+
* The dropdown value the DFlash2 model field's Custom entry carries. A
|
|
102
|
+
* selection of this value (or no selection) makes the effective `--draft-model`
|
|
103
|
+
* path fall through to the Draft model path field, so a drafter no list entry
|
|
104
|
+
* names still loads.
|
|
105
|
+
*/
|
|
106
|
+
export declare const DFLASH2_CUSTOM_VALUE = "custom";
|
|
107
|
+
/**
|
|
108
|
+
* dflash2PresetOptions renders the DFlash2 model dropdown options: one entry
|
|
109
|
+
* per common drafter (the label, the repo as the note) plus the Custom entry
|
|
110
|
+
* last. The option value is the drafter's artifact file, so the selection
|
|
111
|
+
* resolves back to the model data by file name.
|
|
112
|
+
*/
|
|
113
|
+
export declare function dflash2PresetOptions(): readonly EnumOption[];
|
|
114
|
+
/**
|
|
115
|
+
* InfernixNgramVolume is the PLE n-gram table a model key reads: the `.ngram`
|
|
116
|
+
* file and the Hugging Face repo the Get step pulls it from. The volume is kept
|
|
117
|
+
* apart from the model shards and read from an NVMe drive, so the
|
|
118
|
+
* `--ngram-volume` flag points at a file the same download leaves on disk.
|
|
119
|
+
*/
|
|
120
|
+
export interface InfernixNgramVolume {
|
|
121
|
+
file: string;
|
|
122
|
+
repo: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The PLE n-gram volumes, keyed by the config model key. The Flash-Next entry
|
|
126
|
+
* is the FP8 volume (the recommended one), which ships beside the Dense8 model
|
|
127
|
+
* shards in the same repo, so a Get of the Flash-Next model pulls the table
|
|
128
|
+
* into the model directory.
|
|
129
|
+
*/
|
|
130
|
+
export declare const INFERNIX_NGRAM_VOLUMES: Record<string, InfernixNgramVolume>;
|
|
131
|
+
/**
|
|
132
|
+
* infernixDraftModelPath resolves the effective `--draft-model` path a config
|
|
133
|
+
* carries: the selected DFlash2 preset's artifact (the model directory plus the
|
|
134
|
+
* drafter file, the layout the hf CLI download leaves) when a preset is
|
|
135
|
+
* selected, else the Custom Draft model path field. Returns null when neither
|
|
136
|
+
* names a path, which is the misconfiguration the dflash2 guideline names.
|
|
137
|
+
*/
|
|
138
|
+
export declare function infernixDraftModelPath(config: Config): string | null;
|
|
139
|
+
/**
|
|
140
|
+
* infernixGetDownloads renders the hf CLI download commands a Get run pulls
|
|
141
|
+
* for a config: the selected DFlash2 drafter (into the model directory, the
|
|
142
|
+
* layout the `--draft-model` path expects) when a preset is selected, and the
|
|
143
|
+
* model key's PLE n-gram volume (into the model directory) when the key names
|
|
144
|
+
* one. The commands are the single source the Get route streams, so a Get
|
|
145
|
+
* leaves the model directory ready to launch.
|
|
146
|
+
*/
|
|
147
|
+
export declare function infernixGetDownloads(config: Config, modelDir: string): string[];
|
|
148
|
+
/**
|
|
149
|
+
* The Infernix `ParameterSpec` surface, in form order. The `group` field is
|
|
150
|
+
* the form section; specs without a group render under `General`. The
|
|
151
|
+
* Infernix-only fields (ngramVolume, draftModel, the n-gram proposal set,
|
|
152
|
+
* the expert memory tiers, the quality routes) appear only on this surface,
|
|
153
|
+
* so the form shows them only while the Infernix engine is selected.
|
|
154
|
+
*/
|
|
155
|
+
export declare const INFERNIX_PARAMETERS: readonly ParameterSpec[];
|
|
156
|
+
/**
|
|
157
|
+
* The Infernix model key a config carries: the string model value, falling
|
|
158
|
+
* back to the 27B artifact key so a bare config always renders a plan. A
|
|
159
|
+
* value that names a local artifact file (a directory-scanned model, a
|
|
160
|
+
* `.ninfer` or `.infernix` name) passes through unchanged.
|
|
161
|
+
*/
|
|
162
|
+
export declare function infernixModelKey(config: Config): string;
|
|
163
|
+
/**
|
|
164
|
+
* infernixArtifactFor resolves the artifact a model key deploys. A key that
|
|
165
|
+
* names a local artifact file passes through the artifact map's 27B entry
|
|
166
|
+
* for the model id, and an id no entry names falls back to the 27B entry, so
|
|
167
|
+
* a bare config always renders a plan.
|
|
168
|
+
*/
|
|
169
|
+
export declare function infernixArtifactFor(modelKey: string): InfernixModelArtifact;
|
|
170
|
+
//# sourceMappingURL=infernix.d.ts.map
|