dsh-plugin-local-infer 0.0.0-stage → 0.1.0
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 +92 -2
- package/cordis.patch.yml +42 -0
- package/dsh/client.js +3649 -0
- package/dsh/host.js +15 -0
- package/package.json +101 -3
- package/packages/core/lib/adapter.d.ts +156 -0
- package/packages/core/lib/adapter.js +12 -0
- package/packages/core/lib/config.d.ts +20 -0
- package/packages/core/lib/config.js +2 -0
- package/packages/core/lib/debug.d.ts +44 -0
- package/packages/core/lib/debug.js +43 -0
- package/packages/core/lib/defaults.d.ts +101 -0
- package/packages/core/lib/defaults.js +95 -0
- package/packages/core/lib/deps.d.ts +151 -0
- package/packages/core/lib/deps.js +168 -0
- package/packages/core/lib/estimator.d.ts +138 -0
- package/packages/core/lib/estimator.js +238 -0
- package/packages/core/lib/guideline.d.ts +64 -0
- package/packages/core/lib/guideline.js +118 -0
- package/packages/core/lib/hardware.d.ts +67 -0
- package/packages/core/lib/hardware.js +60 -0
- package/packages/core/lib/index.d.ts +35 -0
- package/packages/core/lib/index.js +21 -0
- package/packages/core/lib/launch-record.d.ts +83 -0
- package/packages/core/lib/launch-record.js +80 -0
- package/packages/core/lib/logs.d.ts +44 -0
- package/packages/core/lib/logs.js +71 -0
- package/packages/core/lib/models.d.ts +76 -0
- package/packages/core/lib/models.js +92 -0
- package/packages/core/lib/parameter.d.ts +96 -0
- package/packages/core/lib/parameter.js +2 -0
- package/packages/core/lib/registrar.d.ts +157 -0
- package/packages/core/lib/registrar.js +208 -0
- package/packages/core/lib/reserve.d.ts +89 -0
- package/packages/core/lib/reserve.js +93 -0
- package/packages/core/lib/status.d.ts +65 -0
- package/packages/core/lib/status.js +54 -0
- package/packages/core/package.json +31 -0
- package/packages/providers/lib/adapters.d.ts +232 -0
- package/packages/providers/lib/adapters.js +858 -0
- package/packages/providers/lib/debug.d.ts +35 -0
- package/packages/providers/lib/debug.js +112 -0
- package/packages/providers/lib/deps.d.ts +224 -0
- package/packages/providers/lib/deps.js +221 -0
- package/packages/providers/lib/engines.d.ts +27 -0
- package/packages/providers/lib/engines.js +46 -0
- package/packages/providers/lib/guidelines.d.ts +29 -0
- package/packages/providers/lib/guidelines.js +61 -0
- package/packages/providers/lib/hyperqwen.d.ts +31 -0
- package/packages/providers/lib/hyperqwen.js +161 -0
- package/packages/providers/lib/index.d.ts +53 -0
- package/packages/providers/lib/index.js +75 -0
- package/packages/providers/lib/llamacpp.d.ts +52 -0
- package/packages/providers/lib/llamacpp.js +151 -0
- package/packages/providers/lib/model-defaults.d.ts +33 -0
- package/packages/providers/lib/model-defaults.js +84 -0
- package/packages/providers/lib/ninfer.d.ts +49 -0
- package/packages/providers/lib/ninfer.js +343 -0
- package/packages/providers/lib/presets.d.ts +35 -0
- package/packages/providers/lib/presets.js +161 -0
- package/packages/providers/lib/strata.d.ts +15 -0
- package/packages/providers/lib/strata.js +14 -0
- package/packages/providers/lib/vram.d.ts +24 -0
- package/packages/providers/lib/vram.js +250 -0
- package/packages/providers/package.json +43 -0
- package/packages/service/lib/index.d.ts +405 -0
- package/packages/service/lib/index.js +1253 -0
- package/packages/service/lib/types.d.ts +230 -0
- package/packages/service/lib/types.js +2 -0
- package/packages/service/package.json +41 -0
- package/packages/tool/lib/index.d.ts +27 -0
- package/packages/tool/lib/index.js +25 -0
- package/packages/tool/package.json +41 -0
- package/packages/ui/lib/deps.d.ts +66 -0
- package/packages/ui/lib/deps.js +39 -0
- package/packages/ui/lib/form.d.ts +98 -0
- package/packages/ui/lib/form.js +101 -0
- package/packages/ui/lib/index.d.ts +41 -0
- package/packages/ui/lib/index.js +45 -0
- package/packages/ui/lib/meter.d.ts +60 -0
- package/packages/ui/lib/meter.js +43 -0
- package/packages/ui/lib/route.d.ts +406 -0
- package/packages/ui/lib/route.js +1486 -0
- package/packages/ui/lib/warnings.d.ts +56 -0
- package/packages/ui/lib/warnings.js +69 -0
- package/packages/ui/package.json +42 -0
package/README.md
CHANGED
|
@@ -1,3 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-plugin-local-infer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[中文 (Chinese)](docs/zh/README.md)
|
|
4
|
+
|
|
5
|
+
> For those who want more performance out of their specific hardware than what Unsloth gives out of the box.
|
|
6
|
+
|
|
7
|
+
A DeepSeek Harness plugin that manages local inference engines:
|
|
8
|
+
|
|
9
|
+
- llama.cpp
|
|
10
|
+
- NInfer
|
|
11
|
+
- Hyper-Qwen (vLLM)
|
|
12
|
+
- Strata
|
|
13
|
+
- ...with more coming soon.
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
Pick a model and an engine, tune the parameters, watch a live **VRAM Est.** meter, see **hardware warnings** the moment a value (or a parameter itself) is unsafe for the detected hardware, then the plugin manages **build, deploy, and health-check** for each engine and **automatically register it as a DSH model** once it is confirmed working. No hand-editing of finicky yaml or launchers.
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
Command line:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
dsh plugin --profile web add https://github.com/cybtachyon/dsh-plugin-local-infer
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Web UI: click **Plugins** → **Add Plugin** → paste `https://github.com/cybtachyon/dsh-plugin-local-infer`.
|
|
28
|
+
|
|
29
|
+
## Using the plugin
|
|
30
|
+
|
|
31
|
+
The **Engine settings** card mounts on the Plugins page (older hosts: the Settings page).
|
|
32
|
+
|
|
33
|
+
- **Pick an engine and model**, then tune the parameters. Each field renders by its type: checkboxes, dropdowns, sliders, text, directory pickers, and a chat-template combo (known templates plus free text).
|
|
34
|
+
- **Watch the VRAM Est. meter.** It prices weights, KV cache, overhead, and workspace against your card as you adjust values, and shows the verdict (`fits` / `tight` / `over`) and the largest context that fits.
|
|
35
|
+
- **Read the warnings.** Red banners and inline field warnings fire when a parameter value, or the presence of a parameter, is unsafe for your detected hardware.
|
|
36
|
+
- **Satisfy the system dependencies.** The panel lists each missing host dependency (docker, CUDA toolkit, ffmpeg, hf CLI, ...) with its purpose, a copy/paste install string for your OS, and an optional one-click **Run** (sudo). The **Get** button stays disabled until every dependency reports satisfied.
|
|
37
|
+
- **Launch / Stop.** `Launch` clones or pulls the engine, downloads the model, starts it, and polls its health endpoint. `Stop` shuts it down.
|
|
38
|
+
- **Register / Remove.** `Register` publishes the confirmed-working engine to DSH as a model (optionally as the agent default model) through the settings service, so the change is revision-tracked and undoable. `Remove` pulls the entry back.
|
|
39
|
+
|
|
40
|
+
All values persist to `~/.dsh/local-infer/config.json`; the browser never sees a value it did not store.
|
|
41
|
+
|
|
42
|
+
## Supported Platforms
|
|
43
|
+
|
|
44
|
+
### Operating systems
|
|
45
|
+
|
|
46
|
+
| OS | State | Notes |
|
|
47
|
+
|------------------------------|-----------|---------------------------------------------------------------------------------------------------------------------|
|
|
48
|
+
| Linux (Debian/Ubuntu, `apt`) | Supported | Install blocks mirror the working NInfer launcher: the CUDA keyring sequence plus the compile toolchain. |
|
|
49
|
+
| Linux (Arch, `pacman`) | Supported | `pacman` blocks plus the `/opt/cuda` export lines. |
|
|
50
|
+
| Linux (Fedora, `dnf`) | Untested | Command set present, flagged untested on a live host. |
|
|
51
|
+
| macOS (`brew`) | Partial | CPU/docker path (llama.cpp). No NVIDIA Container Toolkit on macOS, so the CUDA engines' docker path is unavailable. |
|
|
52
|
+
| Windows (WSL2) | Untested | WSL2 is detected and the dflash2 pin-memory rule fires; the command set is flagged untested. |
|
|
53
|
+
| Windows | Partial | Code paths are only partially written; further development needed. |
|
|
54
|
+
|
|
55
|
+
### Engines
|
|
56
|
+
|
|
57
|
+
| Engine | Docker | Local build | State |
|
|
58
|
+
|-------------------|---------------|--------------------|------------------------------------------------------------------------------|
|
|
59
|
+
| NInfer | Yes | Yes (cmake + CUDA) | The reference engine. Measured VRAM models for the Qwen 27B/35B artifacts. |
|
|
60
|
+
| Hyper-Qwen (vLLM) | Yes (compose) | No | `.env`-driven docker-compose profiles. |
|
|
61
|
+
| vLLM | No | No | Work-in-progress. |
|
|
62
|
+
| llama.cpp | Yes | Yes | Specified, not verified until the binary is available. |
|
|
63
|
+
| Strata | Yes | No | Placeholder engine; its parameter surface is empty until the flag set lands. |
|
|
64
|
+
|
|
65
|
+
Runtime requirements: Node `^22.19.0 || >=24.0.0`, pnpm 12.11.2 (pinned by `mise.toml`), and the `@deepseek-ai/cordis >= 4.0.1` peer dependency.
|
|
66
|
+
|
|
67
|
+
## Hardware guide
|
|
68
|
+
|
|
69
|
+
What each common machine gets you in practice. Capability impressions are sourced from [r/LocalLLaMA](https://www.reddit.com/r/LocalLLaMA/) user threads. "Shared" means unified memory (the model and the OS share the pool).
|
|
70
|
+
|
|
71
|
+
| Hardware | Memory | What you get |
|
|
72
|
+
| ------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
73
|
+
| NVIDIA RTX 5090 | 32 GB VRAM | Reliably fits model weights up to 23 GB with 240k+ context and vision. Handles complex coding and vision tasks, but needs special tooling for very long or complex tasks. |
|
|
74
|
+
| NVIDIA RTX 4090 | 24 GB VRAM | The community workhorse. 30B-class models fit at Q4 and drive coding agents; 70B needs slow CPU offload. Best speed-per-dollar single card. |
|
|
75
|
+
| NVIDIA RTX 3090 | 24 GB VRAM | The used-card value king. Same 24 GB as a 4090 but an older generation: 32B at Q4 with modest context, no FP8. A single card is limiting; the common advice is to pair two. |
|
|
76
|
+
| NVIDIA RTX PRO 6000 | 96 GB VRAM | Near-frontier dense models (70B–80B) fit fully in memory with long context, and 32B models can even be fine-tuned (LoRA, full FT). The prosumer ceiling. |
|
|
77
|
+
| NVIDIA RTX PRO 5500 | 84 GB VRAM | The rack-oriented 84 GB tier: 70B-class models with headroom, close to the PRO 6000 at a lower price point. |
|
|
78
|
+
| NVIDIA Tesla V100 | 32 GB VRAM | Cheap used HBM2 server card. 30B-class at Q4/Q8 at respectable speed (bandwidth is what matters for inference); no FP8, power-hungry. A budget homelab pick. |
|
|
79
|
+
| NVIDIA Tesla V100 | 16 GB VRAM | The budget entry. 13B–14B at Q8, or 30B with offload. NVLink pairs double the capacity. Slow by modern standards, surprisingly solid for inference. |
|
|
80
|
+
| NVIDIA RTX 5090 Laptop | 24 GB VRAM | The mobile 4090. 32B at Q4 just fits; realistically ~17B at Q4 once you subtract context. |
|
|
81
|
+
| NVIDIA RTX 4090 Laptop | 16 GB VRAM | The GPU is overkill for LLMs and the VRAM is underkill: 8B–14B at Q4/Q5 with small context. |
|
|
82
|
+
| NVIDIA GB10 (DGX Spark) | 128 GB shared | The desktop AI dev box. A 35B MoE runs at ~100 tok/s; 120B+ MoE fits but is slow. Capacity over speed. |
|
|
83
|
+
| NVIDIA GB10 (DGX Spark) | 64 GB shared | Half the pool: 32B–35B MoE with context; 70B is tight. |
|
|
84
|
+
| NVIDIA RTX N1X | 128 GB shared | The next-generation GB10-class laptop: DGX Spark-class capacity in a laptop. Very new, little real-world data. |
|
|
85
|
+
| NVIDIA RTX N1X | 64 GB shared | The 64 GB tier: 32B-class with context. |
|
|
86
|
+
| Apple M4 Ultra | 256 GB shared | The capacity king. 200B+ MoE and 70B at 128K context fit; expect ~5 tok/s on 70B. Slow per token, unmatched capacity. |
|
|
87
|
+
| Apple M4 Ultra | 128 GB shared | 70B–120B-class fits with room; ~5 tok/s. Great for capacity, slow for speed. |
|
|
88
|
+
| AMD Radeon AI PRO R9700 | 32 GB VRAM | AMD's 32 GB Vulkan card. 32B at Q8 around $1,300, good value; the `radv` driver is not a conformant Vulkan implementation. |
|
|
89
|
+
| AMD Ryzen AI Max+ PRO 495 | 160 GB shared | The UMA monster. 120B+ MoE fits and coding agents run well (Qwen3-Coder-class models are tuned for UMA); $7k+ systems, slower than a discrete GPU. |
|
|
90
|
+
| 2x NVIDIA RTX 3090 | 48 GB VRAM | The community's "minimum for a usable local LLM": 70B at Q4/Q5. |
|
|
91
|
+
| 2x NVIDIA RTX 4090 | 48 GB VRAM | 70B at Q4 with context; exllama2 quantizations run fast. |
|
|
92
|
+
| 2x NVIDIA RTX 5090 | 64 GB VRAM | 120B MoE (GPT-OSS-120B) with 128k context at ~10 tok/s with offload. |
|
|
93
|
+
| 2x NVIDIA Tesla V100 (NVLink) | 64 GB VRAM | The budget 64 GB: 70B at lower quant with NVLink bandwidth; older arch, no FP8. |
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# The @dsh/dsh-plugin-local-infer bundle patch: mounts the whole local-inference
|
|
2
|
+
# capability as ONE layer over an existing dsh profile.
|
|
3
|
+
#
|
|
4
|
+
# Row order carries no load semantics — activation is service-availability
|
|
5
|
+
# driven — so the seam may appear before or after the providers that fill it.
|
|
6
|
+
# The user's own profile patch layer can address any row below by `id` to
|
|
7
|
+
# retune it (last write per row wins).
|
|
8
|
+
|
|
9
|
+
- insert:
|
|
10
|
+
# Client carrier: mounts the bare package name so the client-module scan
|
|
11
|
+
# keys the `dsh.client` declaration on it and loads dsh/client.js (the
|
|
12
|
+
# browser "Engine settings" card) into the boot graph. The scan only maps
|
|
13
|
+
# a bare package-root entry to its `dsh.client` field, never a subpath, so
|
|
14
|
+
# this row is what makes the client half reachable. The host module is a
|
|
15
|
+
# no-op; the capability lives in the four subpath rows below.
|
|
16
|
+
- id: local-infer
|
|
17
|
+
name: '@dsh/dsh-plugin-local-infer'
|
|
18
|
+
|
|
19
|
+
# Service Definition: publishes ctx.localInfer, the engine/preset/guideline
|
|
20
|
+
# registries, and the orchestration entry points (estimate, guidelines,
|
|
21
|
+
# deps, installString, runInstall, launch, registerModel). Carries no store
|
|
22
|
+
# of its own.
|
|
23
|
+
- id: local-infer-service
|
|
24
|
+
name: '@dsh/dsh-plugin-local-infer/service'
|
|
25
|
+
|
|
26
|
+
# Service Providers: the concrete engine adapters (ninfer, hyperqwen,
|
|
27
|
+
# llamacpp, strata), the NInfer VramModel, the built-in presets, the
|
|
28
|
+
# built-in guidelines, and the per-OS SystemDep install command data. Each
|
|
29
|
+
# registers itself with ctx.localInfer.
|
|
30
|
+
- id: local-infer-providers
|
|
31
|
+
name: '@dsh/dsh-plugin-local-infer/providers'
|
|
32
|
+
|
|
33
|
+
# Consumer: the model-facing local_infer_* tools (estimate, launch, status,
|
|
34
|
+
# register), their system-prompt section, and their per-tool timeout budgets.
|
|
35
|
+
- id: local-infer-tool
|
|
36
|
+
name: '@dsh/dsh-plugin-local-infer/tool'
|
|
37
|
+
|
|
38
|
+
# Web UI: the parameter form (form-type aware), the VRAM meter, the
|
|
39
|
+
# red-warning banner, the engine lifecycle controls, and the register-as-
|
|
40
|
+
# model confirmation.
|
|
41
|
+
- id: local-infer-ui
|
|
42
|
+
name: '@dsh/dsh-plugin-local-infer/ui'
|