[PR #314] [CLOSED] feat: Qwen3.8-Flash-Next dense model, native Qwen3.5 attention kernel, strata-dense CLI #2568

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

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/314
Author: @perronemirko
Created: 9/30/2026
Status: ❌ Closed

Base: main ← Head: qwen3.8-27b


📝 Commits (10+)

  • 32d7ffa feat: add Qwen3.8-Flash-Next integration
  • 06d441e feat: add strata-dense for dense Qwen3.8-27B
  • a7015a2 feat: dense model reads quantized alpha/beta (Q8_0)
  • 1787b31 feat: dense model splits weights across VRAM and pinned host
  • aa9f81b feat: dense model --selftest and STRATA_DENSE_DEBUG tracing
  • f27e3ab fix: dense model GDN closes norm with SiLU (Qwen3.5 gated delta)
  • ca2041b 🔧 chore(tools): sposta compare_llama.py nella cartella tools per organizzazione
  • bb32ed9 fixing build issues
  • 9715a6a fix(build): link qwen35 attention + dense model
  • 430969a feat(tools): generate the default expert-cache profile

📊 Changes

41 files changed (+251651 additions, -130 deletions)

View changed files

📝 .gitignore (+4 -0)
📝 CMakeLists.txt (+16 -22)
➕ HOWTO_IT.md (+504 -0)
➖ data/draft_vocab.bin (+0 -0)
➖ data/draft_vocab_en.bin (+0 -0)
➖ data/experimental-speed-projection/Qwen3.8-Flash-Next-experimental-speed-projection.gguf (+0 -0)
➖ data/experimental-speed-projection/Qwen3.8-Flash-Next-experimental-speed-projection.json (+0 -26)
➖ data/experimental-speed-projection/README.md (+0 -21)
➖ data/expert-profile-coder.bin (+0 -0)
➖ data/expert-profile.bin (+0 -0)
➕ data/packs/qwen3.8-27b/tokenizer/chat_template.jinja (+184 -0)
➕ data/packs/qwen3.8-27b/tokenizer/merges.txt (+247587 -0)
➕ data/packs/qwen3.8-27b/tokenizer/token_type.json (+1 -0)
➕ data/packs/qwen3.8-27b/tokenizer/tokenizer.json (+14 -0)
➕ data/packs/qwen3.8-27b/tokenizer/vocab.json (+1 -0)
➕ include/strata/core/dense_model.hpp (+91 -0)
📝 include/strata/core/layer.hpp (+1 -0)
➕ include/strata/core/qwen35.hpp (+138 -0)
➕ include/strata/kernels/dense_kernels.hpp (+52 -0)
➕ include/strata/kernels/qwen35_attention.hpp (+47 -0)

...and 21 more files

📄 Description

What

Qwen3.8-Flash-Next (dense, Qwen3.5 architecture) as a first-class model path in Strata — no experts, same server protocol as strata --serve.

New

  • src/core/qwen35.cpp (+ header): the Qwen3.5 graph
  • src/core/dense_model.{cpp,hpp}: dense model; weights split across VRAM and pinned host, quantized alpha/beta (Q8_0)
  • src/kernels/cuda/qwen35_attention.cu (+ header): native Qwen3.5 attention kernel — GDN with the SiLU-gated delta norm closure
  • src/kernels/cuda/dense_kernels.cu: dense-path kernels
  • src/program/dense_main.cpp: strata-dense executable (new CMake target)

Changed

  • layer.{cpp,hpp}: new g_qwen35_gdn flag + layer_set_qwen35_gdn(); the GDN output-norm path branches to qwen35_gdn_out_norm
  • verify.cpp: the volatile pointer in raise_flag moved inside the _WIN32 guard (was unused on non-Windows)
  • CMakeLists.txt: new sources in strata_kernels/strata_engine, strata-dense target; dropped the mmvq_multi_parity and sampler one-block/old parity tests, simplified two EXISTS guards
  • Dead code out: softplus_f (gdn.cu), double warp_sum/block_sum (gr.cu), to_f16_kernel + f16 include (shared_expert.cu), CODES_PER_BYTE_S2, unused helpers in gdn/ple/rope parity
  • .gitignore: /data/expert-profile.bin — regenerate with tools/make_default_profile.py

Tools

  • qwen35_pack.py, qwen35_setup.py — pack + setup for Qwen3.8-Flash-Next
  • dense_setup.py — dense model setup
  • compare_llama.py — comparison against llama.cpp
  • dump_mtp.py, make_default_profile.py

Data

  • Added: tokenizer pack under data/packs/qwen3.8-27b/tokenizer/ (merges, vocab, chat template)
  • Removed: committed draft vocabs, expert profiles, experimental speed projection — now generated by the tools above

40 files changed; ~251k insertions (tokenizer merges.txt dominates). 10 commits on qwen3.8-27b.


🔄 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/314 **Author:** [@perronemirko](https://github.com/perronemirko) **Created:** 9/30/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `qwen3.8-27b` --- ### 📝 Commits (10+) - [`32d7ffa`](https://github.com/Niko1221/Strata/commit/32d7ffa72f171e40517e8119224afdc06b166ac1) feat: add Qwen3.8-Flash-Next integration - [`06d441e`](https://github.com/Niko1221/Strata/commit/06d441e5ab6d7ff74f50b959ce4d3beb42f0dca6) feat: add strata-dense for dense Qwen3.8-27B - [`a7015a2`](https://github.com/Niko1221/Strata/commit/a7015a20c7826d535f5d74ca763ccda30cf7465e) feat: dense model reads quantized alpha/beta (Q8_0) - [`1787b31`](https://github.com/Niko1221/Strata/commit/1787b31c1a5c7e1aaa2b3dd836239ad15bab1c8a) feat: dense model splits weights across VRAM and pinned host - [`aa9f81b`](https://github.com/Niko1221/Strata/commit/aa9f81bdb68e5efc261e779c8157aaf80293768e) feat: dense model --selftest and STRATA_DENSE_DEBUG tracing - [`f27e3ab`](https://github.com/Niko1221/Strata/commit/f27e3ab181eeb9bd89a3eff1b2676ef475fee6d4) fix: dense model GDN closes norm with SiLU (Qwen3.5 gated delta) - [`ca2041b`](https://github.com/Niko1221/Strata/commit/ca2041b8a9921db1af18be741a14634bfd65e151) 🔧 chore(tools): sposta compare_llama.py nella cartella tools per organizzazione - [`bb32ed9`](https://github.com/Niko1221/Strata/commit/bb32ed96daf83a67c81287fccc92fce8d545d688) fixing build issues - [`9715a6a`](https://github.com/Niko1221/Strata/commit/9715a6affaecf45de15c90a145d929b2e6bb68b2) fix(build): link qwen35 attention + dense model - [`430969a`](https://github.com/Niko1221/Strata/commit/430969a1466afa81692a8cbc8ad2bf3c1a9f73ec) feat(tools): generate the default expert-cache profile ### 📊 Changes **41 files changed** (+251651 additions, -130 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+4 -0) 📝 `CMakeLists.txt` (+16 -22) ➕ `HOWTO_IT.md` (+504 -0) ➖ `data/draft_vocab.bin` (+0 -0) ➖ `data/draft_vocab_en.bin` (+0 -0) ➖ `data/experimental-speed-projection/Qwen3.8-Flash-Next-experimental-speed-projection.gguf` (+0 -0) ➖ `data/experimental-speed-projection/Qwen3.8-Flash-Next-experimental-speed-projection.json` (+0 -26) ➖ `data/experimental-speed-projection/README.md` (+0 -21) ➖ `data/expert-profile-coder.bin` (+0 -0) ➖ `data/expert-profile.bin` (+0 -0) ➕ `data/packs/qwen3.8-27b/tokenizer/chat_template.jinja` (+184 -0) ➕ `data/packs/qwen3.8-27b/tokenizer/merges.txt` (+247587 -0) ➕ `data/packs/qwen3.8-27b/tokenizer/token_type.json` (+1 -0) ➕ `data/packs/qwen3.8-27b/tokenizer/tokenizer.json` (+14 -0) ➕ `data/packs/qwen3.8-27b/tokenizer/vocab.json` (+1 -0) ➕ `include/strata/core/dense_model.hpp` (+91 -0) 📝 `include/strata/core/layer.hpp` (+1 -0) ➕ `include/strata/core/qwen35.hpp` (+138 -0) ➕ `include/strata/kernels/dense_kernels.hpp` (+52 -0) ➕ `include/strata/kernels/qwen35_attention.hpp` (+47 -0) _...and 21 more files_ </details> ### 📄 Description ## What Qwen3.8-Flash-Next (dense, Qwen3.5 architecture) as a first-class model path in Strata — no experts, same server protocol as `strata --serve`. ## New - **`src/core/qwen35.cpp`** (+ header): the Qwen3.5 graph - **`src/core/dense_model.{cpp,hpp}`**: dense model; weights split across VRAM and pinned host, quantized alpha/beta (Q8_0) - **`src/kernels/cuda/qwen35_attention.cu`** (+ header): native Qwen3.5 attention kernel — GDN with the SiLU-gated delta norm closure - **`src/kernels/cuda/dense_kernels.cu`**: dense-path kernels - **`src/program/dense_main.cpp`**: `strata-dense` executable (new CMake target) ## Changed - `layer.{cpp,hpp}`: new `g_qwen35_gdn` flag + `layer_set_qwen35_gdn()`; the GDN output-norm path branches to `qwen35_gdn_out_norm` - `verify.cpp`: the volatile pointer in `raise_flag` moved inside the `_WIN32` guard (was unused on non-Windows) - `CMakeLists.txt`: new sources in `strata_kernels`/`strata_engine`, `strata-dense` target; dropped the `mmvq_multi_parity` and sampler one-block/old parity tests, simplified two `EXISTS` guards - Dead code out: `softplus_f` (gdn.cu), double `warp_sum`/`block_sum` (gr.cu), `to_f16_kernel` + f16 include (shared_expert.cu), `CODES_PER_BYTE_S2`, unused helpers in gdn/ple/rope parity - `.gitignore`: `/data/expert-profile.bin` — regenerate with `tools/make_default_profile.py` ## Tools - `qwen35_pack.py`, `qwen35_setup.py` — pack + setup for Qwen3.8-Flash-Next - `dense_setup.py` — dense model setup - `compare_llama.py` — comparison against llama.cpp - `dump_mtp.py`, `make_default_profile.py` ## Data - Added: tokenizer pack under `data/packs/qwen3.8-27b/tokenizer/` (merges, vocab, chat template) - Removed: committed draft vocabs, expert profiles, experimental speed projection — now generated by the tools above 40 files changed; ~251k insertions (tokenizer merges.txt dominates). 10 commits on `qwen3.8-27b`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:01:24 +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#2568
No description provided.