Introduction¶
DeepSeek Harness (DSH) adopts a “everything is a plugin” architecture, and integrating local model capabilities into the Web UI has become a common need. Many developers want to use a locally running translation model for conversation or document processing scenarios while retaining DSH’s plugin ecosystem and UI style.
dsh-localllmtranslate is a plugin that provides local Hy-MT2 translation capabilities to DSH. It runs the Hy-MT2-1.8B model locally via llama.cpp, offering real-time side-by-side/top-bottom split translation, paragraph alignment, glossaries, history, and Agent tools—suited for scenarios that require completing translation tasks within DSH.
Feature Overview¶
A “Translate” entry in the left sidebar. The panel’s internal navigation defaults to the right side and can be switched to the left or collapsed via settings.
Real-time Translation¶
After you stop typing for about 0.8 seconds, the translation is automatically generated and displayed paragraph by paragraph in a streaming fashion. You can cancel or re-translate at any time.
Layout & Paragraph Alignment¶
Default left-right layout: source on the left, translation on the right. You can switch to a top-bottom split (translation on top, source on bottom) via “Settings → Interface”.
Hovering over or selecting a passage in the source highlights the corresponding translation. A frosted-glass overlay below the translation column displays the source fragment (without shifting the translation lines). Click the overlay to pin it; click again to dismiss.
Glossary¶
Supports manual add/edit/delete, search, and CSV/JSON import/export. Scope supports “current language pair” and “global”.
After a manual translation, the local model lists terms and translates them one by one into a “Pending Confirmation” list. Only adopted terms participate in subsequent translations.
History¶
Manual translations are saved automatically. For real-time translation, use the “Save History” button to save the current result. The second-level menu in the sidebar allows quick loading of past entries.
Toast Notifier¶
Temporary notifications are aggregated in the bottom-right corner with a CLI-style typing/backspace animation. Click a toast to pin it; × to dismiss. Can also be disabled entirely via settings.
Settings & Model Management¶
Settings are organized into three categories: Model, Interface, and Diagnostics. Supports restoring defaults.
The model status card in the sidebar supports double-click to load/stop the model (can be disabled in settings).
Import/Export¶
Supports importing .txt, .md, and .srt files, and exporting pure translation, bilingual side-by-side, or bilingual subtitles.
Agent Tools¶
Provides a translate_text tool that can be invoked directly in DSH conversations for local translation.
Environment Requirements¶
- DSH version:
>=0.2.2-rc.5 <0.3.0(current baseline verified on 0.2.2-rc.5) - Local llama.cpp (llama-server)
- The plugin automatically searches PATH, WinGet install directory,
$DSH_HOME/local-model/runtime, and the path specified in settings - At least 6 GB of available VRAM/RAM recommended; the default F16 model is approximately 3.34 GiB
- The plugin itself has no npm runtime dependencies and no build step; the model and llama.cpp runtime are not distributed with the package
On Windows, install llama.cpp directly with:
winget install ggml.llamacpp
On other platforms, download the appropriate package from https://github.com/ggml-org/llama.cpp/releases and place llama-server in your PATH or $DSH_HOME/local-model/runtime/.
Installation & Activation¶
Install from npm (Recommended)¶
dsh plugin --profile web add dsh-localllmtranslate
Replace web with your profile name (e.g., desktop). After installation, restart DSH for “Translate” to appear in the left sidebar.
The desktop profile in the desktop edition (Electron) is managed exclusively by the application. The global dsh CLI will show profile "desktop" is managed exclusively by the Electron application; in this case, please install or upgrade via the “Plugins” panel within the application.
Install from a Git Mirror (Gitee Fallback)¶
Gitee can serve as a Git mirror, suitable for users without an npm account. Pin to the baseline version:
dsh plugin --profile web add git+https://gitee.com/leoncolond/dsh-localllmtranslate.git#v0.1.3
If dsh plugin does not accept a Git URL, clone first and install as a local directory:
git clone https://gitee.com/leoncolond/dsh-localllmtranslate.git
dsh plugin --profile web add ./dsh-localllmtranslate
After installation, open “Translate” in the left sidebar. On first launch:
- If no model is found, the plugin will automatically download the default model per settings (can be disabled); you can also download manually via “Settings → Model”.
- After the download completes, the model starts automatically (can be disabled in settings); status is displayed in the sidebar model card and in settings.
- Type in the source column on the left; the translation appears in real time on the right.
If llama.cpp is not installed locally, you will see a three-step wizard at “Settings → Model → First-time Setup”:
- Install Runtime: On Windows, one-click
winget install ggml.llamacpp; on macOS, one-click Homebrew; on other platforms, copy the command or open llama.cpp Releases to install manually, then click “Re-detect”. - Prepare Model: Download the default Hy-MT2-1.8B F16 model.
- Start Model: After a successful start, click “Start Translating”.
Model Notes¶
Model files are not distributed with the repository. The default model is a community-converted Hy-MT2-1.8B.f16.gguf (~3.34 GiB, F16 non-quantized), sourced from:
https://hf-mirror.com/mradermacher/Hy-MT2-1.8B-GGUF/resolve/main/Hy-MT2-1.8B.f16.gguf
- The download URL and file name can be changed in “Settings → Model”
- The
Auto-download default modelandAuto-start after downloadtoggles are under “Settings → Interface” - Models are stored in
$DSH_HOME/localllmtranslate/models/; you can also manually place any*.gguffile and point to it in settings - This F16 GGUF’s tokenizer metadata lacks a correct EOS token; the plugin automatically appends
--override-kv tokenizer.ggml.eos_token_id=int:120020at startup, otherwise the model may continue generating content after the translation. This can be disabled in settings. - After download, the file size is verified; incomplete files left by interrupted downloads are kept as
.partfor resume support and will not be launched as a complete model - Model weights follow the upstream Apache-2.0 license; plugin code is licensed under MIT
Usage Tips¶
- Real-time translation is enabled by default; clicking “Translate” runs the full pipeline (saves history, extracts terms per settings)
- Real-time translation does not automatically write to history; use the “Save History” button in the translation column when needed
- The top language selector supports 38 languages; the middle button swaps them; when source language is set to Auto, it maps Chinese→English, others→Chinese
- Auto-detection is based on the character ratio of the full text: a single Chinese sentence in a long mixed Chinese-English document will not cause the whole text to be classified as Chinese; code blocks, inline code, URLs, and Windows paths are excluded from the count
- “Settings → Interface” allows adjusting layout direction, sidebar position, toast notifications, model card double-click, and auto-download/auto-start
- “Restore Default Settings” preserves the model file path but resets all other parameters and interface options
Data & Privacy¶
- All translation inference runs on local llama.cpp; text is not uploaded to the cloud
- Glossaries, history, settings, and model logs are stored in
$DSH_HOME/localllmtranslate/: models/: model filesstate/glossary.json,state/history.json,state/settings.jsonstate/llama-server.loghistory.jsonhas an 8 MiB cap: when exceeded, the oldest records are discarded in chronological order (oversized individual records are still retained)- The plugin’s HTTP endpoints are registered only under DSH’s same-origin Web service, inheriting DSH’s connection trust checks
Use Cases & Notes¶
Suited for DSH users who need to run translation models locally, especially for batch translation, terminology consistency, and privacy-sensitive scenarios.
The plugin runs with the permissions of the current DSH process. Before installing, review the source code and licenses (plugin code MIT, model weights Apache-2.0, llama.cpp MIT) to confirm they meet your usage requirements.
Ecosystem Note¶
DSH’s plugin directory has no official affiliation with DeepSeek or High-Flyer; it serves only as a community plugin index and reference source.
References¶
- Plugin directory page: https://www.skillhub.cn/plugins/leoncolond/dsh-localllmtranslate
- GitHub repository: https://github.com/leoncolond/dsh-localllmtranslate