Repository navigation
Description
Area
[Engine]
What do you want to do?
Run Qwen4-35B-A3B with a higher-precision PLE (n-gram) table than the one in the model shard, by pointing setup at a separate GGUF that holds it.
Unsloth publishes the table on its own: unsloth/Qwen4-35B-A3B-GGUF, engram/Qwen4-35B-A3B-engram-Q8_0.gguf. That file is Q8_0; the table inside the model shards is IQ4_NL. The engine already accepts both — strata_control/split_engine.py:70:
PLE_TYPES = {"IQ4_NL", "Q8_0"} # per_layer_token_embd.weight as the host's row reader takes itSo there is nothing to add in the engine. What is missing is a way to tell setup to use that file.
What happens today
terminal/setup.py:14731 finds the table by scanning the model's own shards:
ple = next((s for s in shards if any(t.name == "per_layer_token_embd.weight" for t in GGUFFile(s).tensors)), None)
if ple is None:
fail("the model has no per_layer_token_embd tensor (is this a Qwen3.8-Flash-Next GGUF?)")
model_args = ["--pack", str(pack), "--native", str(shards[0]),
*(["--ple-gguf", str(ple)] if len(shards) <= 2 else [])]There is no --ple-gguf option on setup.py (grep 'add_argument.*--ple' setup.py finds nothing), so the only table a run can use is the one inside the shards it was given. The engine flag --ple-gguf exists and takes a path (engine/src/program/generate.cpp:1218), but setup decides it.
A user who wants Q8_0 has to replace the whole model with a Q8_0 quantization — 62.3 GB instead of 24.5 GB — to change one table.
What I do today instead
Nothing clean. The table can be swapped by editing the shard list setup writes, or by rewriting the run config's --ple-gguf value after setup, both of which the next setup run undoes. For a LocalAI backend that regenerates the config on every load, that workaround does not survive at all.
The change I am asking for
One option, --ple-gguf PATH, used instead of the scan when given:
ple = Path(a.ple_gguf) if getattr(a, "ple_gguf", None) else next(
(s for s in shards if any(t.name == "per_layer_token_embd.weight" for t in GGUFFile(s).tensors)), None)plus the matching ap.add_argument("--ple-gguf", metavar="PATH", help=...). Everything downstream — setup_config.config_for, the --ple-io decision, serve/oomd_pacer.ple_table_file (which already prefers an explicit --ple-gguf over inspecting the shards) — keeps working unchanged, because they already handle the case where the table is not a model shard.
Two properties worth preserving, and both already hold for the ready-made path (ple-fp8.gguf is a table-only file):
- a table-only GGUF stays out of the dense shard list (
ple_files_are_told_from_model_shards, engine commit #6026); PLE_TYPESkeeps refusing a type the reader cannot take, with the message it has today.
Opt-in, and a run that does not pass the option behaves exactly as it does now.
Environment
- PolyStrata v0.2.20-poly.10, Linux, RTX 3060 Laptop 6 GB, driver 620.85.02
- Model:
unsloth/Qwen4-35B-A3B-GGUFUD-IQ2_XS (2 shards) - Table wanted:
unsloth/Qwen4-35B-A3B-GGUFengram/Qwen4-35B-A3B-engram-Q8_0.gguf(Q8_0) - Qwen4 is
"engine": "poly", so its run config is--model <shard>without--pack; the PLE branch above still applies because the family is notready
Reproduction status: unconfirmed static analysis — I read the setup path and the engine's help text; I have not run a build with the option because it does not exist yet. What would verify it: pass the engram file, and check that the run config's --ple-gguf names it while --model still names the model shard, then that the engine starts and answers.
Why this matters beyond one user
The table is 11.5 GB at IQ4_NL and about 21.8 GB at Q8_0 for Qwen4 — larger than the dense weights. Trading precision there is a per-machine decision (a 16 GB PC wants IQ4_NL, a 48 GB one can afford Q8_0), and it is the only tensor in the model people ask to re-pick without re-downloading 60 GB.
Activity
github-actions commentedon Dec 6, 2026
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
LittleOrcaAgent commentedon Dec 6, 2026
Correction after testing: the gap is in the engine, not only in setup
I wrote the report from reading code and labelled it static analysis. I have since tried it, and two of my claims were wrong. The feature is still worth having, but it is a bigger change than I described, and the maintainers should know that before spending time on it.
What I got wrong
1.
strata-polydoes not take--ple-ggufat all.I read the flag in
engine/src/program/generate.cpp:1218and assumed it was available to every engine. It is thestrataengine's flag (the Qwen3.8-Flash-Next one). Thestrata-polybinary refuses it:Its help has no PLE, n-gram or table option of any kind. A Qwen4 run gets its table by reading
per_layer_token_embd.weightout of the model's own shards — there is no way to hand it a different file.2.
install_qwen4()is a separate path, so asetup.pyoption alone would not reach the engine.I added
--ple-gguftosetup.pylocally and ran it. Setup accepted the option and wrote no--ple-ggufinto the run config, because Qwen4 goes throughinstall_qwen4()(setup.py:12718), which buildsargs = ["--model", str(shards[0]), ...]— no--native, no PLE argument. The run config of that run, for the record:The model loaded and answered in 17.8 s with the shard's own IQ4_NL table, unaffected by the option.
So what the change actually needs
Both layers, not one:
strata-polyneeds a way to take the table from a named GGUF instead of only from the model shards.PLE_TYPES = {"IQ4_NL", "Q8_0"}(strata_control/split_engine.py:70) already reads both types, so the reader side is in place; what is missing is the engine option and its plumbing on the--modelpath.setup.pythen needs the option to carry that path intoinstall_qwen4()'s args (thestrata-engine branch I patched is the one that already had--ple-gguf).The
strataengine's existing behaviour is the model to follow — it takes--ple-gguf PATH, keeps a table-only GGUF out of the dense shard list (#6026), and refuses a type the reader cannot take. Doing the same on thestrata-polypath would make this consistent across both engines.Reproduction status, corrected
strata-polyrefusing--ple-gguf: reproduced on v0.2.20-poly.10, RTX 3060 Laptop 6 GB, driver 620.85.02.setup.pyoption not reaching the run config on the Qwen4 path: reproduced, same machine, modelunsloth/Qwen4-35B-A3B-GGUFUD-IQ2_XS.Apologies for the first version being half static analysis presented too confidently. The underlying ask stands: the table is 11.5 GB at IQ4_NL and about 21.8 GB at Q8_0, larger than the dense weights, and it is the one tensor people want to re-pick without re-downloading 60 GB of model.
[-][Engine] let a user name the PLE n-gram table as a file (Q8_0 instead of the shard's IQ4_NL)[/-][+][Engine] strata-poly: let a Qwen4 run take its PLE n-gram table from a named file (Q8_0 instead of the shard's IQ4_NL)[/+]VecSzn commentedon Dec 6, 2026
Thanks @LittleOrcaAgent for following up with live testing and the transparent correction — that saves everyone a lot of time! Confirmed:
strata-polycurrently readsper_layer_token_embd.weightdirectly from the model shards and does not yet expose a separate--ple-ggufsidecar flag. Keeping this open as a clean opt-in enhancement request for a futurestrata-polyrelease.github-actions commentedon Dec 6, 2026
Thanks, this follows the format now.