[PR #528] [CLOSED] Add lapadatbogdan's RCO-152E coder prune to the setup's model list #584

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

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/528
Author: @woodsonl
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: rco-152e-downloads


📝 Commits (3)

  • ce934ca lapadatbogdan's RCO-152E coder prune in the setup's model list: llama.cpp's Q3_K / Q4_K_M / Q8_0 of GLM-5.3-Flash with 152 of 288 experts a layer, pinned to the commit their hashes belong to - no shipped expert profile (a prune is another geometry), the card's "hmm" ban at Q3_K / Q4_K_M in the config's sampling defaults
  • 267017b the server reads the config's sampling.logit_bias instead of naming it an unknown key: RCO-152E's hmm ban reached no request - parsed and checked as a request's is (logit_bias_of), a bad value refusing to start; the prune's chooser text says whose quant it is
  • b8d10d5 ./setup.py starts the installer, as ./setup.sh and START-MAYA.bat do: a main that execs maya.py with whatever Python ran it, and maya.py hands itself to ./maya.sh when that is not the venv's

📊 Changes

8 files changed (+148 additions, -9 deletions)

View changed files

📝 README.md (+6 -0)
📝 docs/SETUP.md (+4 -1)
📝 maya.py (+57 -5)
📝 serve/server.py (+10 -2)
📝 serve/test_server.py (+21 -1)
📝 setup.py (+6 -0)
📝 tools/test_maya_models.py (+31 -0)
📝 tools/test_maya_profile.py (+13 -0)

📄 Description

Adds lapadatbogdan's RCO-152E coder prune of GLM-5.3-Flash (MIT license) to the setup's model choices. RCO keeps 152 of the full model's 288 routed experts a layer (~170B-A17B of the 321B MoE); the GGUFs are llama.cpp's own quants, text only - the repo publishes no vision files. Every file is pinned to the commit it was hashed at and sha256-checked per shard, exactly like Maya's own downloads.

The three choices

Choice Quant Shards Download "hmm" ban
RCO-152E-Q3_K Q3_K 2 75.1 GB yes
RCO-152E-Q4_K_M Q4_K_M 3 102.6 GB yes
RCO-152E-Q8_0 Q8_0 4 180.4 GB no (the card: Q8_0 needs none)

Sizes are decimal GB summed from the published file sizes. The repo re-uploaded its files under the same names once already (its card warns about truncated Oct 22 files, re-uploaded Oct 25), so "revision" is pinned to 94613287f523a52b5a8d7843db3ff4a1bc8d58c6 - the commit every sha256 below was verified against through the Hugging Face API - rather than main. The entries carry no "was" names and no "vision" (a setup then says the model reads text only, which is what the repo says itself).

Per-shard sha256 as published at that commit (the registry holds the same values; a download is verified against them):

GLM-5.3-Flash-Coder-RCO-152E-Q3_K-00001-of-00002.gguf   a20fc5ba55bc59212ef703af183a9e26b2e6db9fc5e0f541e5a7ea679edb5795
GLM-5.3-Flash-Coder-RCO-152E-Q3_K-00002-of-00002.gguf   bb8ff823c35d6d40a8d84cdd5a75b396161350459452df4afc4ed83d9d952811
GLM-5.3-Flash-Coder-RCO-152E-Q4_K_M-00001-of-00003.gguf e1d3aa5fe0585ee19f45e206b589ac123dd80df33fdaf6b6ac9f415a48e39783
GLM-5.3-Flash-Coder-RCO-152E-Q4_K_M-00002-of-00003.gguf cb21bb4b700ecf9264a4cfb3b71677f4005d14899014dd9ddd9928306e5c98f3
GLM-5.3-Flash-Coder-RCO-152E-Q4_K_M-00003-of-00003.gguf 5f4a4ff35b75a133da4345d403faf8aa574522096ffef6a96e53bd0c890ca74d
GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00001-of-00004.gguf   16b0410cd2af42264813ac209687cafb36d2ab14cc3f74c14150ce0b1ff89a82
GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00002-of-00004.gguf   e5a815e3bbc62c347d452dedd88db0e48204f078ea11814158e59ac9a11f3756
GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00003-of-00004.gguf   6a77d3328a9eab2c7944d4be5a66952f856ed3d9706be9d76996ce3ac675e992
GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00004-of-00004.gguf   1bd0db0cf92039950cafbead6f7243bf54b6aee5439f704d58c4aac0481caba7

Why these entries carry "profile": False

read_expert_profile (src/core/expert_cache.cpp) refuses a profile whose n_layers x n_expert is not the model's own - "a profile for a different artifact" - and the shipped data/expert-profile-glm.bin ranks the unpruned model's 288 experts a layer. A prune is another geometry, so a config for these entries gets no profile: write_config passes none and add_profile (the update path that wires the shipped profile into older configs at their next start) adds none. The engine then learns this PC's routing from scratch, as it does without any profile. A --gguf-dir setup of these exact files is covered too: quant_of matches the entries by shard name, so the same flag governs both paths.

The "hmm" ban

The model card says that at Q3_K / Q4_K_M the model loops on "hmm" unless three tokens are banned - 86776 (" hmm"), 79380 ("Hmm"), 87459 (" Hmm") - and that Q8_0 needs none. The per-entry "logit_bias" goes into the config's sampling defaults. The server side of this PR is what makes it reach requests: sampling_defaults_from_config whitelists the config's sampling keys and had no logit_bias branch, so without it the key was named at startup ("unknown key, ignored") and never reached a single request - the ban silently did nothing. With it, the key is parsed and checked by logit_bias_of exactly as a request's own is (ids, biases in -100..100, not the whole vocabulary; a bad value refuses to start, like every other bad sampling value), merged under every request, greedy ones included - the bias rides the temperature=0 engine line too (server.py's sampling_keys appends it) - and a request's own logit_bias replaces the default wholesale. Verified live after the fix: the startup line reads [maya] sampling defaults from the config: temperature=1.0, top_p=0.95, logit_bias={86776: -100.0, 79380: -100.0, 87459: -100.0}.

MTP

The GGUF ships no NextN/MTP draft block - the pack step logs glm5-next: block_count 45, nextn 0 -> trunk layers 0..44 - and the engine's MTP path simply stays off when the block is absent, so the default draft answer needs no change and costs nothing; the model decodes undrafted. The Maya quants keep the block; this one does not, and nothing special-cases it.

Files changed

  • setup.py - a __main__ block, so ./setup.py starts the installer the same way ./setup.sh and START-MAYA.bat do: it execs maya.py with whatever Python ran it, and maya.py hands itself to ./maya.sh (its own existing start-up path) when that Python is not the private venv. Before, running ./setup.py printed nothing and exited - the file is the installer's helpers library, but nothing on a fresh clone tells you that.
  • maya.py - the three MODELS entries (pinned revision, per-shard sha256, "profile": False, "logit_bias" on Q3_K / Q4_K_M); "profile"/"logit_bias" documented in the registry's header comment; one guard line each in write_config (no shipped profile, the bias into cfg["sampling"]) and add_profile (no profile added at an update restart); the Q3_K chooser text says whose quant it is.
  • serve/server.py - the logit_bias branch in sampling_defaults_from_config (parse + logit_bias_of check + SystemExit on a bad value), docstring updated. No engine change: the request path already spoke logit_bias on the engine line.
  • tools/test_maya_models.py - RcoPruneDownload: three quants pinned and hashed (shard count, download size, no vision, pinned URLs), quant_of mapping for --gguf-dir, the bias exactly where the card says and nowhere else, every other model still on the shipped profile.
  • tools/test_maya_profile.py - a pruned-model write_config: no --expert-profile, the bias in the sampling defaults, the rest of the sampling unchanged, add_profile adds none.
  • serve/test_server.py - SamplingDefaultsFromConfig: the bias kept as the engine line takes it (int ids, float biases), five bad shapes refusing to start, an unknown key still ignored with the rest kept.
  • README.md (models section), docs/SETUP.md (the GLM bullet) - the prune, its sizes, text-only, not our quants, not measured by us.

End to end (measured, per CONTRIBUTING)

One RTX 4080 SUPER (16 GB), i9-14900K, 61 GB RAM, NVMe, CUDA 13.4, driver 615.71.09. ./maya.sh --setup --model RCO-152E-Q3_K --yes --download-model:

  • the 75.1 GB Q3_K downloaded resumable (two shards at once, ~48 MB/s) and passed the per-shard sha256 check; the pack built into the model folder (tools/iq_pack.py, the experts stay in the GGUF files);
  • the engine started and answered over /v1/chat/completions - e.g. a correct two-sentence chmod 755 answer, 63 tokens, clean stop;
  • glm stat on that request: decode 89.50 ms/tok (11.17 tok/s) | vram hit 43.26% | ram fetches 42.81/tok | disk 15.94 reads/tok in 14.00 waits/tok, 30.62 ms/tok | promotions 51.24/tok | cpu lane 126.27/tok in 31.91 ms/tok | prompt 40.6 ms/tok | vram 749/798 ram 4918/5019 - the first uncalibrated start at the setup's recommended 32K context, nothing tuned;
  • prefill 28 tok/s on a cold 28-token prompt;
  • the written config maya-rco-152e-q3_k.json has no --expert-profile and the ban in its sampling defaults; run-maya-rco-152e-q3_k.sh starts it;
  • a second ./maya.sh --setup --model RCO-152E-Q3_K --yes keeps everything (packages, llama.cpp source, compiled engine, downloaded model, pack) and rewrites only the config.

Both suites green locally exactly as CI runs them (.venv/bin/python -m unittest discover -s tools -p "test_*.py": 410 tests OK; ... discover -s serve -p "test_*.py" -t .: 390 tests OK).

Measured / not measured

Measured: every file name, size and sha256 against the Hugging Face API at the pinned commit; the whole install-to-answer path above on Q3_K; setup idempotence; both Python suites.

Not measured: Q4_K_M and Q8_0 (the same code path at other sizes - only the shard counts, sizes and the absence of the ban differ); decode speed against a Maya quant on the same box (no before/after pair, so no claim of relative speed); the prune's quality (its card reports RCO's own pruning measurements; nothing re-measured here).

Known edge (pre-existing on main, out of this PR's scope)

A --gguf-dir prune whose shard names do not byte-match the registry (renamed files, a different split) is not recognized by quant_of, so it gets the shipped profile and the engine then refuses to start with the clear geometry error until the flag is removed. That fail-open exists on main for any unrecognized GGUF; a geometry-reading gate would be its own change.


🔄 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/528 **Author:** [@woodsonl](https://github.com/woodsonl) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `rco-152e-downloads` --- ### 📝 Commits (3) - [`ce934ca`](https://github.com/mw00/project-maya/commit/ce934ca36d3321a10362ad351a43798dec34dd5b) lapadatbogdan's RCO-152E coder prune in the setup's model list: llama.cpp's Q3_K / Q4_K_M / Q8_0 of GLM-5.3-Flash with 152 of 288 experts a layer, pinned to the commit their hashes belong to - no shipped expert profile (a prune is another geometry), the card's "hmm" ban at Q3_K / Q4_K_M in the config's sampling defaults - [`267017b`](https://github.com/mw00/project-maya/commit/267017b14fc7cd335b886f60ed9d3d20ce720ae7) the server reads the config's sampling.logit_bias instead of naming it an unknown key: RCO-152E's hmm ban reached no request - parsed and checked as a request's is (logit_bias_of), a bad value refusing to start; the prune's chooser text says whose quant it is - [`b8d10d5`](https://github.com/mw00/project-maya/commit/b8d10d5dbbfc5d13c6442fe44227a36c41d58396) ./setup.py starts the installer, as ./setup.sh and START-MAYA.bat do: a __main__ that execs maya.py with whatever Python ran it, and maya.py hands itself to ./maya.sh when that is not the venv's ### 📊 Changes **8 files changed** (+148 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+6 -0) 📝 `docs/SETUP.md` (+4 -1) 📝 `maya.py` (+57 -5) 📝 `serve/server.py` (+10 -2) 📝 `serve/test_server.py` (+21 -1) 📝 `setup.py` (+6 -0) 📝 `tools/test_maya_models.py` (+31 -0) 📝 `tools/test_maya_profile.py` (+13 -0) </details> ### 📄 Description Adds [lapadatbogdan's RCO-152E coder prune of GLM-5.3-Flash](https://huggingface.co/lapadatbogdan/GLM-5.3-Flash-Coder-RCO-152E-GGUF) (MIT license) to the setup's model choices. RCO keeps 152 of the full model's 288 routed experts a layer (~170B-A17B of the 321B MoE); the GGUFs are llama.cpp's own quants, text only - the repo publishes no vision files. Every file is pinned to the commit it was hashed at and sha256-checked per shard, exactly like Maya's own downloads. ## The three choices | Choice | Quant | Shards | Download | "hmm" ban | |---|---|---:|---:|---| | `RCO-152E-Q3_K` | Q3_K | 2 | 75.1 GB | yes | | `RCO-152E-Q4_K_M` | Q4_K_M | 3 | 102.6 GB | yes | | `RCO-152E-Q8_0` | Q8_0 | 4 | 180.4 GB | no (the card: Q8_0 needs none) | Sizes are decimal GB summed from the published file sizes. The repo re-uploaded its files under the same names once already (its card warns about truncated Oct 22 files, re-uploaded Oct 25), so `"revision"` is pinned to `94613287f523a52b5a8d7843db3ff4a1bc8d58c6` - the commit every sha256 below was verified against through the Hugging Face API - rather than `main`. The entries carry no `"was"` names and no `"vision"` (a setup then says the model reads text only, which is what the repo says itself). Per-shard sha256 as published at that commit (the registry holds the same values; a download is verified against them): ``` GLM-5.3-Flash-Coder-RCO-152E-Q3_K-00001-of-00002.gguf a20fc5ba55bc59212ef703af183a9e26b2e6db9fc5e0f541e5a7ea679edb5795 GLM-5.3-Flash-Coder-RCO-152E-Q3_K-00002-of-00002.gguf bb8ff823c35d6d40a8d84cdd5a75b396161350459452df4afc4ed83d9d952811 GLM-5.3-Flash-Coder-RCO-152E-Q4_K_M-00001-of-00003.gguf e1d3aa5fe0585ee19f45e206b589ac123dd80df33fdaf6b6ac9f415a48e39783 GLM-5.3-Flash-Coder-RCO-152E-Q4_K_M-00002-of-00003.gguf cb21bb4b700ecf9264a4cfb3b71677f4005d14899014dd9ddd9928306e5c98f3 GLM-5.3-Flash-Coder-RCO-152E-Q4_K_M-00003-of-00003.gguf 5f4a4ff35b75a133da4345d403faf8aa574522096ffef6a96e53bd0c890ca74d GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00001-of-00004.gguf 16b0410cd2af42264813ac209687cafb36d2ab14cc3f74c14150ce0b1ff89a82 GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00002-of-00004.gguf e5a815e3bbc62c347d452dedd88db0e48204f078ea11814158e59ac9a11f3756 GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00003-of-00004.gguf 6a77d3328a9eab2c7944d4be5a66952f856ed3d9706be9d76996ce3ac675e992 GLM-5.3-Flash-Coder-RCO-152E-Q8_0-00004-of-00004.gguf 1bd0db0cf92039950cafbead6f7243bf54b6aee5439f704d58c4aac0481caba7 ``` ## Why these entries carry "profile": False `read_expert_profile` (`src/core/expert_cache.cpp`) refuses a profile whose `n_layers x n_expert` is not the model's own - "a profile for a different artifact" - and the shipped `data/expert-profile-glm.bin` ranks the unpruned model's 288 experts a layer. A prune is another geometry, so a config for these entries gets no profile: `write_config` passes none and `add_profile` (the update path that wires the shipped profile into older configs at their next start) adds none. The engine then learns this PC's routing from scratch, as it does without any profile. A `--gguf-dir` setup of these exact files is covered too: `quant_of` matches the entries by shard name, so the same flag governs both paths. ## The "hmm" ban The model card says that at Q3_K / Q4_K_M the model loops on "hmm" unless three tokens are banned - 86776 (" hmm"), 79380 ("Hmm"), 87459 (" Hmm") - and that Q8_0 needs none. The per-entry `"logit_bias"` goes into the config's `sampling` defaults. The server side of this PR is what makes it reach requests: `sampling_defaults_from_config` whitelists the config's sampling keys and had no `logit_bias` branch, so without it the key was named at startup ("unknown key, ignored") and never reached a single request - the ban silently did nothing. With it, the key is parsed and checked by `logit_bias_of` exactly as a request's own is (ids, biases in -100..100, not the whole vocabulary; a bad value refuses to start, like every other bad sampling value), merged under every request, greedy ones included - the bias rides the `temperature=0` engine line too (`server.py`'s `sampling_keys` appends it) - and a request's own `logit_bias` replaces the default wholesale. Verified live after the fix: the startup line reads `[maya] sampling defaults from the config: temperature=1.0, top_p=0.95, logit_bias={86776: -100.0, 79380: -100.0, 87459: -100.0}`. ## MTP The GGUF ships no NextN/MTP draft block - the pack step logs `glm5-next: block_count 45, nextn 0 -> trunk layers 0..44` - and the engine's MTP path simply stays off when the block is absent, so the default draft answer needs no change and costs nothing; the model decodes undrafted. The Maya quants keep the block; this one does not, and nothing special-cases it. ## Files changed - `setup.py` - a `__main__` block, so `./setup.py` starts the installer the same way `./setup.sh` and `START-MAYA.bat` do: it execs `maya.py` with whatever Python ran it, and `maya.py` hands itself to `./maya.sh` (its own existing start-up path) when that Python is not the private venv. Before, running `./setup.py` printed nothing and exited - the file is the installer's helpers library, but nothing on a fresh clone tells you that. - `maya.py` - the three `MODELS` entries (pinned revision, per-shard sha256, `"profile": False`, `"logit_bias"` on Q3_K / Q4_K_M); `"profile"`/`"logit_bias"` documented in the registry's header comment; one guard line each in `write_config` (no shipped profile, the bias into `cfg["sampling"]`) and `add_profile` (no profile added at an update restart); the Q3_K chooser text says whose quant it is. - `serve/server.py` - the `logit_bias` branch in `sampling_defaults_from_config` (parse + `logit_bias_of` check + `SystemExit` on a bad value), docstring updated. No engine change: the request path already spoke `logit_bias` on the engine line. - `tools/test_maya_models.py` - `RcoPruneDownload`: three quants pinned and hashed (shard count, download size, no vision, pinned URLs), `quant_of` mapping for `--gguf-dir`, the bias exactly where the card says and nowhere else, every other model still on the shipped profile. - `tools/test_maya_profile.py` - a pruned-model `write_config`: no `--expert-profile`, the bias in the sampling defaults, the rest of the sampling unchanged, `add_profile` adds none. - `serve/test_server.py` - `SamplingDefaultsFromConfig`: the bias kept as the engine line takes it (int ids, float biases), five bad shapes refusing to start, an unknown key still ignored with the rest kept. - `README.md` (models section), `docs/SETUP.md` (the GLM bullet) - the prune, its sizes, text-only, not our quants, not measured by us. ## End to end (measured, per CONTRIBUTING) One RTX 4080 SUPER (16 GB), i9-14900K, 61 GB RAM, NVMe, CUDA 13.4, driver 615.71.09. `./maya.sh --setup --model RCO-152E-Q3_K --yes --download-model`: - the 75.1 GB Q3_K downloaded resumable (two shards at once, ~48 MB/s) and passed the per-shard sha256 check; the pack built into the model folder (`tools/iq_pack.py`, the experts stay in the GGUF files); - the engine started and answered over `/v1/chat/completions` - e.g. a correct two-sentence chmod 755 answer, 63 tokens, clean `stop`; - `glm stat` on that request: `decode 89.50 ms/tok (11.17 tok/s) | vram hit 43.26% | ram fetches 42.81/tok | disk 15.94 reads/tok in 14.00 waits/tok, 30.62 ms/tok | promotions 51.24/tok | cpu lane 126.27/tok in 31.91 ms/tok | prompt 40.6 ms/tok | vram 749/798 ram 4918/5019` - the first uncalibrated start at the setup's recommended 32K context, nothing tuned; - prefill 28 tok/s on a cold 28-token prompt; - the written config `maya-rco-152e-q3_k.json` has no `--expert-profile` and the ban in its sampling defaults; `run-maya-rco-152e-q3_k.sh` starts it; - a second `./maya.sh --setup --model RCO-152E-Q3_K --yes` keeps everything (packages, llama.cpp source, compiled engine, downloaded model, pack) and rewrites only the config. Both suites green locally exactly as CI runs them (`.venv/bin/python -m unittest discover -s tools -p "test_*.py"`: 410 tests OK; `... discover -s serve -p "test_*.py" -t .`: 390 tests OK). ## Measured / not measured Measured: every file name, size and sha256 against the Hugging Face API at the pinned commit; the whole install-to-answer path above on Q3_K; setup idempotence; both Python suites. Not measured: Q4_K_M and Q8_0 (the same code path at other sizes - only the shard counts, sizes and the absence of the ban differ); decode speed against a Maya quant on the same box (no before/after pair, so no claim of relative speed); the prune's quality (its card reports RCO's own pruning measurements; nothing re-measured here). ## Known edge (pre-existing on main, out of this PR's scope) A `--gguf-dir` prune whose shard names do not byte-match the registry (renamed files, a different split) is not recognized by `quant_of`, so it gets the shipped profile and the engine then refuses to start with the clear geometry error until the flag is removed. That fail-open exists on main for any unrecognized GGUF; a geometry-reading gate would be its own change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:27:11 +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#584
No description provided.