[PR #943] [CLOSED] Add experimental deepMoE Vulkan backend for DeepSeek text chat #2926

Closed
opened 2026-11-04 02:04:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/943
Author: @cklxx
Created: 10/5/2026
Status: ❌ Closed

Base: main ← Head: codex/deepmoe-backend


📝 Commits (10+)

  • 749d957 setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446)
  • 5a30024 calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447)
  • 9f60d13 serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448)
  • eb8da1d /metrics: each request's speculative draft counts, and their sums in the totals (#457)
  • 6a09387 setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444)
  • d6a91e2 docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438)
  • d8d4ad3 Merge branch 'f-135-eng' into rel-0.1.35
  • 7b600d5 Merge branch 'f-135-small' into rel-0.1.35
  • d9ab843 Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it
  • 57bd713 sycl: pipeline the expert cache's profile fill (model load 3-4x faster)

📊 Changes

3 files changed (+39 additions, -2 deletions)

View changed files

📝 serve/server.py (+5 -1)
📝 serve/test_deepmoe.py (+32 -0)
📝 serve/web/app.js (+2 -1)

📄 Description

Strata's existing engine boundary can also drive a native DeepSeek process. This adds an explicit --engine deepmoe backend for deepMoE, a C++20 Vulkan/Slang engine that streams the native FP4/FP8 DeepSeek-V4.1-Flash checkpoint through an NVMe expert cache on a 128 GB AMD Strix Halo PC.

The same Strata web app and OpenAI/Anthropic/Responses service paths can serve text chat. The adapter uses the checkpoint's own prompt renderer, a CPU tokenizer, native EOS IDs, incremental UTF-8 output, progress events, persistent subprocess reuse, and cancellation with drain before the next request. The web app disables unsupported top-k sampling for this backend. Existing Qwen engines and installer behaviour remain the defaults.

Scope is deliberately experimental and explicit: source-built Linux/RADV, text chat, one engine. DeepSeek DSML tools, images, MCP, parallel slots, lazy loading, and the one-click installer are not integrated. Unsupported controls are rejected. This does not port DeepSeek kernels into the CUDA/HIP engine, claim compatibility with Qwen's hardware requirements, or enable approximate mask/speculative modes. docs/DEEPMOE.md has setup, a config example, supported controls, and quality/performance links.

Validation:

  • python -m unittest serve.test_server serve.test_detok serve.test_deepmoe: 158 tests, passed; 5 environment-dependent skips.
  • DEEPMOE_MODEL_DIR=... python -m unittest serve.test_deepmoe_native: 2 CPU checkpoint checks passed (tokenization, split UTF-8, ordinary quoted thinking tags, native prompt/effort).
  • JavaScript syntax check and diff whitespace check passed.
  • The fake-process tests cover consecutive turns, early iterator close, cancellation, process restart, EOS, unsupported sampling, OpenAI streaming/non-streaming, and Anthropic output.

Real-process smoke passed on Linux/RADV with an AMD Radeon 8060S (128 GB Strix Halo), two checkpoint read sources, 5,000 expert slots, exact routing, and a 4K context capacity. OpenAI chat returned “2 + 3 equals 5.”, Anthropic chat returned “3 + 4 equals 7.”, and OpenAI streaming returned a separate thought process followed by “4 + 5 equals 9.” The native HTML identifies this backend so the web app uses supported sampling defaults. A fresh engine also restored a saved 75-token KV snapshot and answered successfully. These are interoperability checks, not a throughput or quality benchmark. Hardware/KV receipt.

The initial hardware attempt caught Qwen's config validator rejecting native top-k=0. Native sampling is now validated before starting the subprocess, with a main-entry regression test and successful hardware rerun. The API integration test also covers a basic Responses request. There is no new throughput claim.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/943 **Author:** [@cklxx](https://github.com/cklxx) **Created:** 10/5/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/deepmoe-backend` --- ### 📝 Commits (10+) - [`749d957`](https://github.com/Niko1221/Strata/commit/749d957a1790b1a171dd4a01ab3e31b3882c9892) setup (--backend hip): a system ROCm without the HIP development files falls back to the wheels (#446) - [`5a30024`](https://github.com/Niko1221/Strata/commit/5a3002446dbb9dfcabb7d0bd9f113da90cc2f3c0) calibrate: the engine's arguments come from the server's engine_args; a failed tuning says why (#447) - [`9f60d13`](https://github.com/Niko1221/Strata/commit/9f60d13246e46b02b1dd0841980b4d18b0faaea7) serve, setup: name the small split card that caps the prompt chunk; setup recommends the big card alone (#448) - [`eb8da1d`](https://github.com/Niko1221/Strata/commit/eb8da1d8c26ec41e6ffb084fdf579dba7cad10bd) /metrics: each request's speculative draft counts, and their sums in the totals (#457) - [`6a09387`](https://github.com/Niko1221/Strata/commit/6a093874fe037020f49bd5cf053879ff6a133c21) setup (--gguf-dir): GGUFs Strata cannot run are named as such, with the --family/--model to use (#444) - [`d6a91e2`](https://github.com/Niko1221/Strata/commit/d6a91e2d1770d0f469d6ec15890acc7ee93e764c) docs: the Coder is weaker outside code, Chinese/CJK text included; the unpruned sizes for that (#438) - [`d8d4ad3`](https://github.com/Niko1221/Strata/commit/d8d4ad337d3c98ba21d3bd0af1a16e9177e112b6) Merge branch 'f-135-eng' into rel-0.1.35 - [`7b600d5`](https://github.com/Niko1221/Strata/commit/7b600d55ff801caaaa11542af1523050992e049b) Merge branch 'f-135-small' into rel-0.1.35 - [`d9ab843`](https://github.com/Niko1221/Strata/commit/d9ab8435f654c368c586340d490915f6addf56a3) Engine 0.1.35: Windows AMD uses its bundled HIP runtime (#468 #461), the low-RAM resident mode on Windows 32 GB PCs (#467), fixes #460 #459 #446 #447 #457 #448 #444; setup requires it - [`57bd713`](https://github.com/Niko1221/Strata/commit/57bd713454ddb4b965f994e95d95cacd68c93fb1) sycl: pipeline the expert cache's profile fill (model load 3-4x faster) ### 📊 Changes **3 files changed** (+39 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+5 -1) 📝 `serve/test_deepmoe.py` (+32 -0) 📝 `serve/web/app.js` (+2 -1) </details> ### 📄 Description Strata's existing engine boundary can also drive a native DeepSeek process. This adds an explicit `--engine deepmoe` backend for [deepMoE](https://github.com/acupof-ai/cachedMoE), a C++20 Vulkan/Slang engine that streams the native FP4/FP8 DeepSeek-V4.1-Flash checkpoint through an NVMe expert cache on a 128 GB AMD Strix Halo PC. The same Strata web app and OpenAI/Anthropic/Responses service paths can serve text chat. The adapter uses the checkpoint's own prompt renderer, a CPU tokenizer, native EOS IDs, incremental UTF-8 output, progress events, persistent subprocess reuse, and cancellation with drain before the next request. The web app disables unsupported top-k sampling for this backend. Existing Qwen engines and installer behaviour remain the defaults. Scope is deliberately experimental and explicit: source-built Linux/RADV, text chat, one engine. DeepSeek DSML tools, images, MCP, parallel slots, lazy loading, and the one-click installer are not integrated. Unsupported controls are rejected. This does not port DeepSeek kernels into the CUDA/HIP engine, claim compatibility with Qwen's hardware requirements, or enable approximate mask/speculative modes. `docs/DEEPMOE.md` has setup, a config example, supported controls, and quality/performance links. Validation: - `python -m unittest serve.test_server serve.test_detok serve.test_deepmoe`: 158 tests, passed; 5 environment-dependent skips. - `DEEPMOE_MODEL_DIR=... python -m unittest serve.test_deepmoe_native`: 2 CPU checkpoint checks passed (tokenization, split UTF-8, ordinary quoted thinking tags, native prompt/effort). - JavaScript syntax check and diff whitespace check passed. - The fake-process tests cover consecutive turns, early iterator close, cancellation, process restart, EOS, unsupported sampling, OpenAI streaming/non-streaming, and Anthropic output. Real-process smoke passed on Linux/RADV with an AMD Radeon 8060S (128 GB Strix Halo), two checkpoint read sources, 5,000 expert slots, exact routing, and a 4K context capacity. OpenAI chat returned “2 + 3 equals 5.”, Anthropic chat returned “3 + 4 equals 7.”, and OpenAI streaming returned a separate thought process followed by “4 + 5 equals 9.” The native HTML identifies this backend so the web app uses supported sampling defaults. A fresh engine also restored a saved 75-token KV snapshot and answered successfully. These are interoperability checks, not a throughput or quality benchmark. [Hardware/KV receipt](https://github.com/acupof-ai/cachedMoE/blob/main/docs/kv_async_receipt.json). The initial hardware attempt caught Qwen's config validator rejecting native top-k=0. Native sampling is now validated before starting the subprocess, with a main-entry regression test and successful hardware rerun. The API integration test also covers a basic Responses request. There is no new throughput claim. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:04:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2926
No description provided.