dsh-plugin-huihui-gemma: Integrating a Local Huihui Gemma 4 12B Model into DeepSeek Harness

Introduction

Running local models in DeepSeek Harness (DSH) usually involves mounting an OpenAI-compatible endpoint. If fine-tuning uses text-based tool calls instead of native function calling, the tool loop in agent presets often doesn’t align. Weights like Huihui Gemma 4 12B Coder (abliterated GGUF) are suitable for local llama.cpp, but to connect DSH’s chat and tool capabilities, an adapter layer is needed. Below, we introduce how the community plugin dsh-plugin-huihui-gemma handles provider registration, config patching, and adapter responsibilities.

Plugin Positioning

dsh-plugin-huihui-gemma is published by maintainer niko4244 and falls under the category of Model & Reasoning. It adds the huihui-gemma provider and model gemma4-12b-huihui-coder-abliterated-q5 to DSH, and provides an OpenAI-compatible adapter to make this fine-tune usable as an agent model: converting its text-based tool syntax to OpenAI tool_calls and handling streaming SSE and other llama.cpp template-related behaviors.

The target DSH version is 0.2.2-rc.3 (or compatible releases). The current npm version of the plugin is 0.1.1, license MIT, and it supports Windows, macOS, and Linux.

Core Capabilities

After installing the bundle, Huihui Gemma 4 12B Coder Q5_K_M (local, abliterated) will appear in the model selectors for the desktop, Web UI, and headless profiles.

Verified behaviors on the adapter side include:

  • Parsing forms like <|tool|>call:name{...} and <|tool>name(key="value")</|tool> into OpenAI tool_calls.
  • Narrowing the harness’s 22 tool directories down to four single-parameter tools (run_command, read_file, write_file, list_files) and mapping them back to the actual harness tools.
  • Removing the harness skill directory for this provider to prevent the 12B model from returning empty rounds due to this.
  • When the model repeats schema keys (e.g., "command":"command"), additionally requesting the actual shell command from the model.
  • Since llama.cpp does not produce content deltas in streaming mode for this chat template, the adapter synthesizes SSE.

Reproducible verification recorded in the README:

> Reply with exactly: HUIHUI_APP_OK
HUIHUI_APP_OK

> Run the command echo HUIHUI_APP_TOOL_9 and report its output.
The output of the command is HUIHUI_APP_TOOL_9.

The harness records completed pwsh tool calls and reads the results back into the response.

Environment Requirements

  1. DeepSeek Harness 0.2.2-rc.3 (or compatible version)
  2. Node.js 22 or later (where engines.node in package.json is >=22)
  3. llama-server from llama.cpp, and the Huihui Gemma 4 12B GGUF with the corresponding chat template
  4. Sufficient memory: e.g., Q5_K_M quantization requires approximately 9–10 GB

The local endpoint still requires setting the API key variable (harness requires this variable to exist):

HUIHUI_API_KEY=local-no-auth

Installation and Configuration

Add the plugin under the web profile (command from README):

dsh plugin --profile web add github:niko4244/dsh-plugin-huihui-gemma

Can also be used after the npm package is published:

dsh plugin --profile web add dsh-plugin-huihui-gemma

The bundle patches the Huihui routing configuration in the llm-pi-ai line. If the target profile already has a custom provider in that line, the original entry needs to be merged back after installation, because the bundle patch replaces the entire line configuration.

Restart DeepSeek Harness after installation, then select the above Huihui model in the model selector; both Standard and Creator agent presets can be used.

Typical Usage: Three-Step Startup

1. Start llama-server

First, start the model service locally (the path and filename must match the local weights and template):

llama-server \
  --host 127.0.0.1 --port 8766 \
  --model Huihui-gemma-4-12B-coder-fable5-v1-abliterated.Q5_K_M.gguf \
  --chat-template-file huihui-gemma4-minja-chat-template.jinja --jinja \
  --ctx-size 65536 --cache-type-k q8_0 --cache-type-v q8_0 --parallel 1 \
  --flash-attn on --temp 0.35 --top-p 0.9 \
  --alias gemma4-12b-huihui-coder-abliterated-q5

Use a health check to confirm the service is running:

curl http://127.0.0.1:8766/health

2. Start the Adapter

Run in a separate terminal (the huihui-gemma-adapter executable entry point is provided with the plugin):

npx huihui-gemma-adapter

It listens on http://127.0.0.1:8769/v1 by default and prints HUIHUI_DSH_PROXY_READY when ready. The process needs to remain running while using the model.

Common environment variables (excerpted from README):

Variable Default Meaning
HUIHUI_LLAMA_URL http://127.0.0.1:8766 llama-server base URL
HUIHUI_ADAPTER_HOST 127.0.0.1 adapter bind host
HUIHUI_ADAPTER_PORT 8769 adapter port
HUIHUI_BASE_URL http://127.0.0.1:8769/v1 URL pointed to by provider line
HUIHUI_MODEL gemma4-12b-huihui-coder-abliterated-q5 Model ID exposed by adapter
HUIHUI_DEBUG_DIR unset If set, will dump request/response JSON

3. Select Model in DSH

After the above steps, select Huihui Gemma 4 12B Coder Q5_K_M (local, abliterated) in the harness to chat and trigger tool calls.

Use Cases and Notes

Suitable for developers who want to run Huihui Gemma 4 12B Coder (abliterated GGUF) on local llama.cpp and use chat + limited toolset in DSH agents. The DSH ecosystem emphasizes “everything is a plugin”; the community directory site skillhub.cn is an independent index with no official affiliation with DeepSeek or Huafan. It is recommended to check the GitHub source code and MIT license yourself before installing the plugin; the plugin runs with the permissions of the current dsh process, and installation implies trusting the maintainer’s code.

Limitations stated in the README:

  • Tool support is a compatibility layer: the model writes tool calls as text, and unusual formats may still fail to parse.
  • Only the four tools mentioned above are exposed on the model side; other harness tools in the session still exist, but the model cannot see them.
  • Slower first token: a harness prompt of about 5–6k tokens may take several seconds in the first round of prefill.
  • Windows: When the workspace is on an exFAT volume (e.g., I:), dsh’s ACL sandbox cannot grant write permissions; you can switch to an NTFS workspace, or set DSH_PERMISSION_MODE=danger-full-access (tool commands are no longer sandboxed; you assume the risk).
  • The Skill directory is only removed for this provider; other models are not affected.

Conclusion

dsh-plugin-huihui-gemma brings local Huihui Gemma 4 12B into the DSH model list and uses an adapter to complete the chat, tool, and streaming behaviors, suitable for scenarios where you have GGUF and llama-server operational experience and want to try local coder models in the harness.

  • Directory page: https://www.skillhub.cn/plugins/niko4244/dsh-plugin-huihui-gemma
  • Source code and documentation: https://github.com/niko4244/dsh-plugin-huihui-gemma
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye