Preface¶
Integrating local inference into DeepSeek Harness (DSH) typically involves starting a separate inference service and then configuring the endpoint and model name within the Harness. The NInfer engine has its own runtime, model package format (.ninfer), and a long list of CLI arguments; manually editing scripts or remembering ports for every configuration change makes maintenance and reproducibility difficult. dsh-ninfer is a community-maintained Cordis plugin package that registers NInfer as a local inference provider for DSH. It allows you to manage models and engine options using editable server profiles within Settings → Models → NInfer, and saved models can be selected directly from the conversation model selector.
What is this¶
- Name: dsh-ninfer (npm package name
dsh-ninfer, current version 0.1.7) - Maintainer: averyjohnkucan-arch
- Category: Model Inference
- Positioning: NInfer local inference provider and model manager for DeepSeek Harness (Manage local NInfer models and editable service configurations within DSH)
- Directory Page: https://www.skillhub.cn/plugins/averyjohnkucan-arch/dsh-ninfer
- Source Code: https://github.com/averyjohnkucan-arch/dsh-ninfer (MIT)
The plugin is a directly installable Cordis bundle: it does not patch the DSH main program, replace built-in UI, or install a second copy of DSH. It does not require compiling the plugin itself locally; dependencies use the peers already provided by DSH, so installation will not pull a separate provider stack or run provider dependency build scripts.
Core Features¶
Model and Profile Management¶
On the NInfer settings page, you can Add model, browse the host model directory via Select model files, multi-select shards, or Select all model files here; selections are retained when browsing across directories. Inspect and assign reads file headers to assign the main model, ordered shards, vision projector, and MTP, and reports missing shards, mixed main model sets, or unsupported MTP formats.
After saving a profile, Start prepares the runtime/model pack if missing and then starts the service; progress can be canceled. Installed engines and prepared packs can be selected under Runtime and imported model data. Once saved, the model appears in the DSH conversation model selector.
Edit reopens saved configurations; Remove profile deletes the saved configuration and stops plugin-owned processes, while downloaded model files are retained. Attach running server can explicitly attach to an already running server that advertises the profile’s model IDs; stopping or disabling the attachment only detaches and does not terminate external processes, nor do launch parameters apply to external services.
Engine CLI and Full Configuration¶
Inference flags documented in the engine executable’s help have corresponding controls under All engine CLI options; leaving a field blank implies the engine default. For boolean items, Omit flag indicates that the flag is not passed to the process, which is not equivalent to “forcefully disabling the engine’s default behavior.” The full JSON editor supports arrays for repeated flags and {"argv":["first","second"]} for multi-value flags; extra argv is an array, not a shell string. Environment variables and full server configurations are also editable.
Reasoning Levels¶
You can add or remove reasoning levels within the model profile, set display names and backend reasoning_effort values, and specify a default level or Engine default (the field is not passed in the request). Custom names and values are declared per profile and do not assume support across all models; the engine/template must accept the configured backend values.
Agent and Permissions¶
The Host registers an LlmAdapter via ctx.llm.registerAdapter, delegating wire conversion, images, and replay to the publicly available PiAiAdapter in DSH, and separately registers ctx.webServer.register routes. The ninfer_models tool for agents shares the same operations as the settings page cards and utilizes DSH’s approveEscalation; host management calls require Full access or a one-time explicit approval. UI operations require the capability of the owning page. The initial version targets the local Web profile; remote delegation and Electron-only profiles have not yet been verified.
Built-in Qwen3.8 27B Reference Configuration¶
When the profile storage is empty on first run, a reference configuration is seeded with model ID qwen3.8-27b, port 8188, text input, including a performance-oriented power-profile hold and example environment/calibration paths (absolute paths are editable; users must select their own artifacts and runtime libraries locally). The reference CLI snippet includes:
--max-context 262144 --kv-capacity 262144 --max-concurrency 1
--kv-dtype rk4v4 --spec dflash2 --draft-tokens 7 --lm-head-draft
--embedding-q4 --gdn-state-fp16 --prefill-cublas --prefill-chunk 512
--ngram-draft-tokens 0
Weight source: neroued/Qwen3.8-27B-NInfer (revision 1cbd84e7221e51186bd7f093a149912d2489625b). The README notes that inference or calibration was not re-run during import; reinstalling the plugin retains edited profiles.
If a service is already running on the saved port, Start or conversation will only automatically reuse it if the model IDs advertised in /v1/models exactly match the saved values; the plugin does not take ownership of that process. Strata tuning requires a plugin-owned server and will not reuse external processes.
NInfer Runtime¶
Engine Upstream: iamwavecut/ninfer-all (Documentation tests revision 5ed86dff9fe3a5a0776f40a7aea86cf381da990d). The runtime installer compiles a pinned upstream version using the plugin’s patches/ninfer-dflash-checkpoints.patch to support DFlash/DFlash2 disk snapshots, etc.; it will not silently replace existing profiles and binaries. Model weights are still prepared by the user; the plugin does not implement GGUF-to-NInfer conversion. NInfer uses .ninfer artifacts. The optional scripts/fetch-ninfer.py can pull pinned stock OCI binaries, but these stock binaries do not support DFlash disk checkpoints.
Self-compilation prerequisites include Git, CMake 3.24+, Ninja, a compatible C++ compiler, CUDA 13.1 (including NVTX3 headers), and FFmpeg/cURL development packages; the default target is Linux x86_64 Blackwell sm120a. Example:
CMAKE=/path/to/cmake npm run build:checkpoints -- --root /path/to/runtime --arch 120a --jobs 8
NINFER_CMAKE_ARGS can pass a JSON array as additional CMake arguments. In the build output, select the build/apps/ninfer-serve executable in the profile.
Installation and Activation¶
Requires DeepSeek Harness 0.2.1-rc.2 running under the Web profile.
- Open Plugins → Add plugin → GitHub.
- Paste the repository address:
https://github.com/averyjohnkucan-arch/dsh-ninfer
- Install and enable the plugin; refresh the browser or restart DSH as prompted.
- Open Settings → Models → NInfer to configure models and the runtime.
Typical Usage Flow¶
Below is a reproducible path from “installing the plugin” to “selecting the model in a conversation,” consistent with the README description.
- Complete the installation as described in the previous section and enter Settings → Models → NInfer.
- Click Add model → Select model files, select the local
.ninferrelated files, run Inspect and assign, and save the profile after confirming shards and MTP are correct. - Select or install a Runtime in the profile (existing engines can be used, or built/prepared via the plugin flow; DFlash disk checkpoint support requires a build with the patch, not just the stock OCI binaries).
- Adjust All engine CLI options or the full JSON as needed; if the model supports reasoning, configure levels and default values.
- Click Start and wait for runtime/model pack preparation and service startup (ongoing installation/preparation can be canceled).
- Once saved, select the model in the DSH conversation interface’s model selector to start inference.
If an external ninfer-serve is already running, use Attach running server to attach, provided the port and model IDs in /v1/models match the profile.
Updates, Disabling, and Data Location¶
The repository can be updated individually via the DSH plugin manager. Turning off the plugin switch removes cards, provider registrations, and tools, and stops plugin-owned services; uninstalling the bundle removes the code. Saved profiles and runtime data default to remaining in:
~/.dsh/dsh-ninfer/
or $DSH_HOME/dsh-ninfer/. Reinstallation can restore them; to completely clear them, you must manually delete this directory.
Use Cases and Notes¶
Suitable for: Developers who are already using or plan to use NInfer to run .ninfer models locally and want to maintain profiles, engine parameters, start/attach logic, and the DSH conversation model list within a single set of Web settings.
Notes:
- The plugin runs under the current DSH process permissions; please read the source code and MIT license before installation, and ensure installation is only from the GitHub repository mentioned above.
- Requires DSH 0.2.1-rc.2 and the Web profile; the Node engine requires >=22.19 (see
package.json). - Does not provide GGUF conversion; weights and CUDA/compilation environments must meet the runtime prerequisites in the README independently.
- The community directory SkillHub has no official affiliation with DeepSeek or High-Flyer and is a third-party entry in the “Everything is a Plugin” ecosystem.
Conclusion¶
dsh-ninfer integrates NInfer’s local inference and editable server profiles into DSH’s model settings and LLM adaptation layer, accompanied by a Qwen3.8 27B reference configuration to facilitate comparison of engine parameters and directory structures. For further details, please refer to the repository README:
- Directory Page: https://www.skillhub.cn/plugins/averyjohnkucan-arch/dsh-ninfer
- GitHub: https://github.com/averyjohnkucan-arch/dsh-ninfer