[PR #275] [MERGED] DeepSeek-V4.1-Flash-1017: Maya-S, unsloth's GGUFs and EXL3, on NVIDIA and AMD, Linux and Windows #440

Closed
opened 2026-10-29 21:25:26 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/275
Author: @mw00
Created: 10/19/2026
Status: ✅ Merged
Merged: 10/19/2026
Merged by: @mw00

Base: main ← Head: ds4-v4.1


📝 Commits (2)

  • a0b10f7 DeepSeek-V4.1-Flash-1017: Maya-S, unsloth's GGUFs and EXL3, on NVIDIA and AMD, Linux and Windows
  • 1b8f5ec DeepSeek's GGUFs after unsloth's re-upload of 2026-10-19: the Engram tables as one tensor (per_layer_token_embd, its metadata under ple.*, MXFP8 as ggml type 43) split back by the pack into each layer's table, the same bytes read in place; UD-Q8_K_XL / UD-Q4_K_XL and the Engram-only shard re-pinned to the new revision (the earlier one is gone)

📊 Changes

91 files changed (+15168 additions, -903 deletions)

View changed files

📝 CMakeLists.txt (+33 -12)
📝 README.md (+58 -20)
📝 cmake/hip_backend.cmake (+9 -9)
📝 docs/AMD_EXPERT_KERNELS.md (+7 -7)
📝 docs/AMD_MAYA.md (+35 -22)
📝 docs/AMD_RDNA4.md (+7 -7)
📝 docs/AMD_UPSTREAM.md (+1 -1)
📝 docs/GLM-KDA-GRAPHS.md (+3 -3)
📝 docs/GLM5-FLASH.md (+6 -6)
📝 docs/QUANT-PLAN.md (+2 -2)
📝 docs/SETTINGS.md (+121 -117)
📝 docs/SETUP.md (+11 -2)
📝 docs/WINDOWS.md (+3 -1)
📝 include/strata/kernels/exl3.hpp (+5 -0)
➕ include/strata/platform/env_alias.hpp (+42 -0)
📝 maya.py (+605 -104)
📝 maya.sh (+1 -2)
📝 serve/ds4_vision.py (+2 -2)
📝 serve/server.py (+30 -13)
📝 serve/test_dashboard.py (+1 -1)

...and 71 more files

📄 Description

DeepSeek-V4.1-Flash-1017: Maya-S, unsloth's GGUFs and EXL3, on NVIDIA and AMD, Linux and Windows

DeepSeek-V4.1-Flash-1017 support for v1.1.16, on top of #271's basic EXL3 path.

The model's engine (maya-ds4)

  • DeepSeek's sliding-window and compressed sparse attention with the two-level indexer, hyper-connections, the Engram n-gram tables, the DSpark drafter and the vision tower; the router in F32 as in DeepSeek's reference.
  • The attention caches as DeepSeek stores them: the compressed cache and the index keys in FP4, the window in FP8 (3.5x smaller; tested against the BF16 rows bit for bit).

The quants

  • Maya-S (the default): Project Maya's own quant, 178 GB, the routed experts in IQ2_XXS / IQ3_XXS with error-feedback rounding, everything else 8-bit or as released. Pinned to its Hugging Face revision, every file with its size and sha256; the drafter comes from the same repo, the Engram tables from unsloth's two Engram-only files.
  • unsloth's UD-Q8_K_XL / UD-Q4_K_XL (MXFP4 experts, MXFP8 Engram) and LibertAIDAI's EXL3 2.9 bpw: --ds4-quant maya-s | gguf-q8 | gguf-q4 | exl3.

Memory

  • The most-used experts go to the GPUs, the rest are read in place from the mapped files (RAM through the page cache, the SSD for the rest) and computed by the CPU lane: 8-bit integer dot products, each CPU on its fastest tier (AVX2, AVX-VNNI, AVX-512 VNNI) with the same results on every one.
  • Prompts stream only the experts they pick, read side by side; short prompts take whichever path is faster on the PC.
  • Several GPUs: layers split across them; pairs of equal GPUs also split each layer where the formats allow, otherwise the split falls back to one GPU a layer.
  • Windows on an APU (Strix Halo / Gorgon Halo): the GPU's share counts against the page file; the setup says the size it needs and the engine caps its placement without one.

Platforms and setup

  • Windows (the engine's OS calls through src/ds4/ds4_os.hpp) and AMD (HIP, gfx1151 validated); pictures on NVIDIA and AMD.
  • The drafter's speed calibration keeps it only where drafting is faster; the Monitor, the terminal screen and the Chat per model; downloads four files at once, resumed and retried.
  • Name scope adjustments: the programs are maya, maya-ds4, maya-vision and the settings MAYA_*; existing installs and settings are carried over.

Fixes found on the way

  • A new device buffer is zeroed before anything is loaded into it (the zeroing raced the weight copies).
  • The indexer's top-k writes its picks in position order, and prompt batches have fixed bounds: a run no longer depends on read timing.
  • GLM-5.3-Flash: the expert usage record is saved on Windows again.
  • unsloth's re-upload of 2026-10-19 (the Engram tables as one tensor under new metadata names, the earlier revision gone): the pack reads both layouts, the files are pinned to the new revision.

Checked

  • Against DeepSeek's reference implementation on the original weights: the engine's own gap KL 0.047 (96.4% the same next token); Maya-S KL 0.120, 92.6%, on held-out text.
  • Drafting checked token for token against answers without it; GLM-5.3-Flash gives the same tokens as v1.1.15.
  • Builds: Linux CUDA, Windows CUDA, Windows HIP; the engine's kernel tests on a Tesla V100 and a Radeon 8065S; the setup's and server's tests.

🔄 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/mw00/project-maya/pull/275 **Author:** [@mw00](https://github.com/mw00) **Created:** 10/19/2026 **Status:** ✅ Merged **Merged:** 10/19/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `ds4-v4.1` --- ### 📝 Commits (2) - [`a0b10f7`](https://github.com/mw00/project-maya/commit/a0b10f7daf41b001456188e9864771df8474cdc2) DeepSeek-V4.1-Flash-1017: Maya-S, unsloth's GGUFs and EXL3, on NVIDIA and AMD, Linux and Windows - [`1b8f5ec`](https://github.com/mw00/project-maya/commit/1b8f5ec2bc4d1e4ba18c3d538fa5d44470c7296c) DeepSeek's GGUFs after unsloth's re-upload of 2026-10-19: the Engram tables as one tensor (per_layer_token_embd, its metadata under ple.*, MXFP8 as ggml type 43) split back by the pack into each layer's table, the same bytes read in place; UD-Q8_K_XL / UD-Q4_K_XL and the Engram-only shard re-pinned to the new revision (the earlier one is gone) ### 📊 Changes **91 files changed** (+15168 additions, -903 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+33 -12) 📝 `README.md` (+58 -20) 📝 `cmake/hip_backend.cmake` (+9 -9) 📝 `docs/AMD_EXPERT_KERNELS.md` (+7 -7) 📝 `docs/AMD_MAYA.md` (+35 -22) 📝 `docs/AMD_RDNA4.md` (+7 -7) 📝 `docs/AMD_UPSTREAM.md` (+1 -1) 📝 `docs/GLM-KDA-GRAPHS.md` (+3 -3) 📝 `docs/GLM5-FLASH.md` (+6 -6) 📝 `docs/QUANT-PLAN.md` (+2 -2) 📝 `docs/SETTINGS.md` (+121 -117) 📝 `docs/SETUP.md` (+11 -2) 📝 `docs/WINDOWS.md` (+3 -1) 📝 `include/strata/kernels/exl3.hpp` (+5 -0) ➕ `include/strata/platform/env_alias.hpp` (+42 -0) 📝 `maya.py` (+605 -104) 📝 `maya.sh` (+1 -2) 📝 `serve/ds4_vision.py` (+2 -2) 📝 `serve/server.py` (+30 -13) 📝 `serve/test_dashboard.py` (+1 -1) _...and 71 more files_ </details> ### 📄 Description ## DeepSeek-V4.1-Flash-1017: Maya-S, unsloth's GGUFs and EXL3, on NVIDIA and AMD, Linux and Windows DeepSeek-V4.1-Flash-1017 support for v1.1.16, on top of #271's basic EXL3 path. **The model's engine (`maya-ds4`)** - DeepSeek's sliding-window and compressed sparse attention with the two-level indexer, hyper-connections, the Engram n-gram tables, the DSpark drafter and the vision tower; the router in F32 as in DeepSeek's reference. - The attention caches as DeepSeek stores them: the compressed cache and the index keys in FP4, the window in FP8 (3.5x smaller; tested against the BF16 rows bit for bit). **The quants** - **Maya-S** (the default): Project Maya's own quant, 178 GB, the routed experts in IQ2_XXS / IQ3_XXS with error-feedback rounding, everything else 8-bit or as released. Pinned to its Hugging Face revision, every file with its size and sha256; the drafter comes from the same repo, the Engram tables from unsloth's two Engram-only files. - unsloth's UD-Q8_K_XL / UD-Q4_K_XL (MXFP4 experts, MXFP8 Engram) and LibertAIDAI's EXL3 2.9 bpw: `--ds4-quant maya-s | gguf-q8 | gguf-q4 | exl3`. **Memory** - The most-used experts go to the GPUs, the rest are read in place from the mapped files (RAM through the page cache, the SSD for the rest) and computed by the CPU lane: 8-bit integer dot products, each CPU on its fastest tier (AVX2, AVX-VNNI, AVX-512 VNNI) with the same results on every one. - Prompts stream only the experts they pick, read side by side; short prompts take whichever path is faster on the PC. - Several GPUs: layers split across them; pairs of equal GPUs also split each layer where the formats allow, otherwise the split falls back to one GPU a layer. - Windows on an APU (Strix Halo / Gorgon Halo): the GPU's share counts against the page file; the setup says the size it needs and the engine caps its placement without one. **Platforms and setup** - Windows (the engine's OS calls through `src/ds4/ds4_os.hpp`) and AMD (HIP, gfx1151 validated); pictures on NVIDIA and AMD. - The drafter's speed calibration keeps it only where drafting is faster; the Monitor, the terminal screen and the Chat per model; downloads four files at once, resumed and retried. - Name scope adjustments: the programs are `maya`, `maya-ds4`, `maya-vision` and the settings `MAYA_*`; existing installs and settings are carried over. **Fixes found on the way** - A new device buffer is zeroed before anything is loaded into it (the zeroing raced the weight copies). - The indexer's top-k writes its picks in position order, and prompt batches have fixed bounds: a run no longer depends on read timing. - GLM-5.3-Flash: the expert usage record is saved on Windows again. - unsloth's re-upload of 2026-10-19 (the Engram tables as one tensor under new metadata names, the earlier revision gone): the pack reads both layouts, the files are pinned to the new revision. **Checked** - Against DeepSeek's reference implementation on the original weights: the engine's own gap KL 0.047 (96.4% the same next token); Maya-S KL 0.120, 92.6%, on held-out text. - Drafting checked token for token against answers without it; GLM-5.3-Flash gives the same tokens as v1.1.15. - Builds: Linux CUDA, Windows CUDA, Windows HIP; the engine's kernel tests on a Tesla V100 and a Radeon 8065S; the setup's and server's tests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:25:26 +07:00
Sign in to join this conversation.
No labels
pull-request
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
mw00/project-maya#440
No description provided.