[PR #1476] [CLOSED] Port Maya v1.0.14 NVIDIA GLM updates to Strata v0.1.41 #3482

Closed
opened 2026-11-07 14:41:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/1476
Author: @apr3ndi5
Created: 10/8/2026
Status: ❌ Closed

Base: main ← Head: codex/glm5-maya-v1.0.4


📝 Commits (6)

  • f2f680d Add optional GLM-5.3-Flash support from Project Maya
  • cd2f4a9 Update GLM port to Maya v1.2.0 with experimental Windows support
  • f0fc335 Update GLM to Maya v1.0.4 tensor-core prefill and diagnostics
  • ff9f6b8 Merge Strata v0.1.41 and resolve GLM integration conflicts
  • 0db33ad Merge updated GLM base with Strata v0.1.41
  • cd297de Port compatible Maya v1.0.14 GLM updates to Strata v0.1.41

📊 Changes

78 files changed (+23595 additions, -123 deletions)

View changed files

📝 .gitignore (+2 -0)
📝 AGENTS.md (+4 -0)
📝 CMakeLists.txt (+147 -4)
📝 README.md (+5 -0)
📝 docs/AI_SETUP.md (+4 -0)
➕ docs/GLM.md (+252 -0)
📝 docs/INSTALL.md (+3 -0)
📝 docs/MODELS.md (+4 -1)
📝 include/strata/artifact/gguf_reader.hpp (+2 -0)
➕ include/strata/core/glm_model.hpp (+445 -0)
➕ include/strata/kernels/cpu/kq_avx512.hpp (+33 -0)
📝 include/strata/kernels/cpu/native_expert.hpp (+7 -1)
➕ include/strata/kernels/glm_batch.hpp (+128 -0)
➕ include/strata/kernels/glm_dsa.hpp (+63 -0)
➕ include/strata/kernels/glm_fast.hpp (+263 -0)
➕ include/strata/kernels/glm_ffn.hpp (+26 -0)
➕ include/strata/kernels/glm_hc.hpp (+80 -0)
➕ include/strata/kernels/glm_kda.hpp (+76 -0)
➕ include/strata/kernels/router_sigmoid.hpp (+30 -0)
📝 include/strata/prefill/moe_mmq.hpp (+1 -0)

...and 58 more files

📄 Description

Summary

Port compatible NVIDIA GLM updates from Project Maya cfd2f45b506be6c02d715e3198b3ff9719de25fc (v1.0.4) through 327cfa60d46f9d8eea33a1b38e76284646fbad86 (v1.0.14), integrated with Strata 0.1.41 main fb58e0dbc8399662c0e47c76578c6e878b14f6cf.

  • GLM windowed MoE prefill, CPU/PCIe balancing, 3% RAM landing buffers with a 12–96 automatic range, GPU-sized chunks and next-layer read-ahead.
  • Turing register WMMA and Ampere mma.sync attention, typed dense GEMV and contiguous CPU expert work pieces. Preserve the local synthetic Q4_0 path, latent sizing/alignment, slow diagnostic path and safe F32 fallback.
  • Layer splits for up to 16 visible NVIDIA GPUs with input validation before planning. Add opt-in SSD text conversation slots, isolated per engine process and bounded by a disk budget/free-space reserve.
  • Native GLM tool calls, streamed typed arguments, forced tool choice, and GLM tokenizer metadata at server startup. Reuse Strata 0.1.41 request hardening, API formats, dashboard and Qwen default.
  • Explicit Maya-M/GSQ-RCO-3.5bit model choices alongside the existing Maya-S v2 default, immutable Hub revisions and verified SHA-256 manifests. GSQ has no MTP weights. Keep model downloads behind explicit consent.
  • Opt-in GLM CPU-lane calibration through the existing installer and settings store. No measurement run with a model in this checkout.

Conflict resolution and PR scope

Merge commits ff9f6b8832b4d12aba40f8553204d120b7a3cc05 (PR #1420) and 0db33ad resolve conflicts against official main without rewriting published history. Resolutions preserve the upstream CUDA toolkit discovery, baseline-ISA native-expert predicates and tokenizer piece cache together with the GLM adaptations.

This draft remains cumulative while #1420 is unmerged. The latest Maya update itself is the incremental comparison. No maintainer PR was merged or closed.

Compatibility limits

This is a selective port, not a copy of the entire Maya fork. GLM continues to target native Linux/NVIDIA and experimental native Windows x64/NVIDIA; WSL, AMD/HIP and Intel remain rejected. Maya's new AMD extension requires its different HIP intrinsics/WMMA headers, tuning tables and GLM GEMM linkage, so it is not enabled here. The extra segment tokenizer cache, Maya launcher and benchmark command are not copied; Strata's existing piece cache, installer and diagnostics are retained.

No performance measurements from Maya are presented as measurements of this Strata integration. Full-model inference remains unverified. Installed models, configs and environments were preserved; MIT/OFL notices remain.

Fresh validation — 2026-10-08

These results were run for this update, separately from previous PR results, on Windows with Python 3.10.5 and MSVC 19.51 / Visual Studio 2026:

  • 1,116 distinct Python cases: 1,106 passed, 10 skipped: full serve discovery 605 (596 passed/9 skipped), all tools/test_setup_*.py unittest modules 444 passed, additional pack/oracle/tokenizer/calibration modules 67 (66 passed/1 skipped). Repeated focused runs are not counted twice.
  • The first full server run found an existing short-name/long-name Windows path comparison in the slots test. Canonicalizing the compared path fixed the expectation, and the final full run passed.
  • Five C++ CPU tests passed: conversation cache, conversation memory, native split, prefill memory (19 checks) and GLM device-list parsing (12 checks).
  • New Q2_K/Q3_K AVX-512 kernel and synthetic test compiled with MSVC. Arithmetic was explicitly skipped because this CPU lacks AVX-512.
  • Synthetic Q4_0 fixture generated and packed on CPU: 184 tensors, 15 routed expert tensors, five disk-backed MoE layers. This is fixture/packing verification, not inference.
  • CPU image encoder built; existing vendor MSBuild duplicate-source warning remains. Python/JavaScript syntax and Git whitespace checks passed.
  • CMake rejected GLM with SYCL and without CUDA. Native Windows GLM configuration reached CUDA discovery and stopped at No CUDA toolset found.

Reproduce the Python tools group with python -m unittest tools.test_glm_pack tools.test_glm_oracle tools.test_iq_pack tools.test_calibrate tools.test_calibrate_glm tools.test_strata_tokenizer; server group with python -m unittest discover -s serve -t .. Installer modules were collected from tools/test_setup_*.py and loaded with unittest.defaultTestLoader.loadTestsFromNames.

Pending hardware checks

CUDA compilation/device linking; F32/WMMA/Turing-register/Ampere-mma attention parity; synthetic Q4_0 multichunk SSD prefill parity; real pinned-allocation cleanup; SSD slot round-trips; multiple-GPU pipelines; model calibration; full-model text/image/MTP quality and performance. The CPU kernel arithmetic also needs AVX-512 hardware. This checkout has no CUDA toolkit; VS 2026 does not meet the recommended CUDA 12.8/VS 2022 combination. The PR remains a draft.

No weights were downloaded and no production engine/server started. Mock server tests and generated local fixtures were used.

Final update commit: cd297de8eaf60aea26011f50e5f4799d34d2cd42.


🔄 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/1476 **Author:** [@apr3ndi5](https://github.com/apr3ndi5) **Created:** 10/8/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/glm5-maya-v1.0.4` --- ### 📝 Commits (6) - [`f2f680d`](https://github.com/Niko1221/Strata/commit/f2f680d4d3b133d89bb21dbd96a5e6a7d1a66b9b) Add optional GLM-5.3-Flash support from Project Maya - [`cd2f4a9`](https://github.com/Niko1221/Strata/commit/cd2f4a9f540dfa94c06a0823bfacc8d2e7cad355) Update GLM port to Maya v1.2.0 with experimental Windows support - [`f0fc335`](https://github.com/Niko1221/Strata/commit/f0fc335386e51cbe9d8bd3bc951ecc2d08575ff1) Update GLM to Maya v1.0.4 tensor-core prefill and diagnostics - [`ff9f6b8`](https://github.com/Niko1221/Strata/commit/ff9f6b8832b4d12aba40f8553204d120b7a3cc05) Merge Strata v0.1.41 and resolve GLM integration conflicts - [`0db33ad`](https://github.com/Niko1221/Strata/commit/0db33ad923b6859a948a1ff3392d85b8cd6b3a5c) Merge updated GLM base with Strata v0.1.41 - [`cd297de`](https://github.com/Niko1221/Strata/commit/cd297de8eaf60aea26011f50e5f4799d34d2cd42) Port compatible Maya v1.0.14 GLM updates to Strata v0.1.41 ### 📊 Changes **78 files changed** (+23595 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+2 -0) 📝 `AGENTS.md` (+4 -0) 📝 `CMakeLists.txt` (+147 -4) 📝 `README.md` (+5 -0) 📝 `docs/AI_SETUP.md` (+4 -0) ➕ `docs/GLM.md` (+252 -0) 📝 `docs/INSTALL.md` (+3 -0) 📝 `docs/MODELS.md` (+4 -1) 📝 `include/strata/artifact/gguf_reader.hpp` (+2 -0) ➕ `include/strata/core/glm_model.hpp` (+445 -0) ➕ `include/strata/kernels/cpu/kq_avx512.hpp` (+33 -0) 📝 `include/strata/kernels/cpu/native_expert.hpp` (+7 -1) ➕ `include/strata/kernels/glm_batch.hpp` (+128 -0) ➕ `include/strata/kernels/glm_dsa.hpp` (+63 -0) ➕ `include/strata/kernels/glm_fast.hpp` (+263 -0) ➕ `include/strata/kernels/glm_ffn.hpp` (+26 -0) ➕ `include/strata/kernels/glm_hc.hpp` (+80 -0) ➕ `include/strata/kernels/glm_kda.hpp` (+76 -0) ➕ `include/strata/kernels/router_sigmoid.hpp` (+30 -0) 📝 `include/strata/prefill/moe_mmq.hpp` (+1 -0) _...and 58 more files_ </details> ### 📄 Description ## Summary Port compatible NVIDIA GLM updates from Project Maya `cfd2f45b506be6c02d715e3198b3ff9719de25fc` (v1.0.4) through `327cfa60d46f9d8eea33a1b38e76284646fbad86` (v1.0.14), integrated with Strata 0.1.41 main `fb58e0dbc8399662c0e47c76578c6e878b14f6cf`. - GLM windowed MoE prefill, CPU/PCIe balancing, 3% RAM landing buffers with a 12–96 automatic range, GPU-sized chunks and next-layer read-ahead. - Turing register WMMA and Ampere mma.sync attention, typed dense GEMV and contiguous CPU expert work pieces. Preserve the local synthetic Q4_0 path, latent sizing/alignment, slow diagnostic path and safe F32 fallback. - Layer splits for up to 16 visible NVIDIA GPUs with input validation before planning. Add opt-in SSD text conversation slots, isolated per engine process and bounded by a disk budget/free-space reserve. - Native GLM tool calls, streamed typed arguments, forced tool choice, and GLM tokenizer metadata at server startup. Reuse Strata 0.1.41 request hardening, API formats, dashboard and Qwen default. - Explicit Maya-M/GSQ-RCO-3.5bit model choices alongside the existing Maya-S v2 default, immutable Hub revisions and verified SHA-256 manifests. GSQ has no MTP weights. Keep model downloads behind explicit consent. - Opt-in GLM CPU-lane calibration through the existing installer and settings store. No measurement run with a model in this checkout. ### Conflict resolution and PR scope Merge commits `ff9f6b8832b4d12aba40f8553204d120b7a3cc05` (PR #1420) and `0db33ad` resolve conflicts against official main without rewriting published history. Resolutions preserve the upstream CUDA toolkit discovery, baseline-ISA native-expert predicates and tokenizer piece cache together with the GLM adaptations. This draft remains cumulative while #1420 is unmerged. The latest Maya update itself is [the incremental comparison](https://github.com/apr3ndi5/Strata/compare/0db33ad...cd297de8eaf60aea26011f50e5f4799d34d2cd42). No maintainer PR was merged or closed. ### Compatibility limits This is a selective port, not a copy of the entire Maya fork. GLM continues to target native Linux/NVIDIA and experimental native Windows x64/NVIDIA; WSL, AMD/HIP and Intel remain rejected. Maya's new AMD extension requires its different HIP intrinsics/WMMA headers, tuning tables and GLM GEMM linkage, so it is not enabled here. The extra segment tokenizer cache, Maya launcher and benchmark command are not copied; Strata's existing piece cache, installer and diagnostics are retained. No performance measurements from Maya are presented as measurements of this Strata integration. Full-model inference remains unverified. Installed models, configs and environments were preserved; MIT/OFL notices remain. ## Fresh validation — 2026-10-08 These results were run for this update, separately from previous PR results, on Windows with Python 3.10.5 and MSVC 19.51 / Visual Studio 2026: - **1,116 distinct Python cases: 1,106 passed, 10 skipped**: full `serve` discovery 605 (596 passed/9 skipped), all `tools/test_setup_*.py` unittest modules 444 passed, additional pack/oracle/tokenizer/calibration modules 67 (66 passed/1 skipped). Repeated focused runs are not counted twice. - The first full server run found an existing short-name/long-name Windows path comparison in the slots test. Canonicalizing the compared path fixed the expectation, and the final full run passed. - **Five C++ CPU tests passed**: conversation cache, conversation memory, native split, prefill memory (19 checks) and GLM device-list parsing (12 checks). - New Q2_K/Q3_K AVX-512 kernel and synthetic test compiled with MSVC. Arithmetic was explicitly skipped because this CPU lacks AVX-512. - Synthetic Q4_0 fixture generated and packed on CPU: 184 tensors, 15 routed expert tensors, five disk-backed MoE layers. This is fixture/packing verification, not inference. - CPU image encoder built; existing vendor MSBuild duplicate-source warning remains. Python/JavaScript syntax and Git whitespace checks passed. - CMake rejected GLM with SYCL and without CUDA. Native Windows GLM configuration reached CUDA discovery and stopped at `No CUDA toolset found`. Reproduce the Python tools group with `python -m unittest tools.test_glm_pack tools.test_glm_oracle tools.test_iq_pack tools.test_calibrate tools.test_calibrate_glm tools.test_strata_tokenizer`; server group with `python -m unittest discover -s serve -t .`. Installer modules were collected from `tools/test_setup_*.py` and loaded with `unittest.defaultTestLoader.loadTestsFromNames`. ### Pending hardware checks CUDA compilation/device linking; F32/WMMA/Turing-register/Ampere-mma attention parity; synthetic Q4_0 multichunk SSD prefill parity; real pinned-allocation cleanup; SSD slot round-trips; multiple-GPU pipelines; model calibration; full-model text/image/MTP quality and performance. The CPU kernel arithmetic also needs AVX-512 hardware. This checkout has no CUDA toolkit; VS 2026 does not meet the recommended CUDA 12.8/VS 2022 combination. The PR remains a draft. No weights were downloaded and no production engine/server started. Mock server tests and generated local fixtures were used. Final update commit: `cd297de8eaf60aea26011f50e5f4799d34d2cd42`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:41:46 +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#3482
No description provided.