Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/SETTINGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ Off unless you set them. The last column says where each one is described.
| `STRATA_WDDM_BUDGET` | number | AMD, Intel Arc | [AMD_HIP.md](AMD_HIP.md) |
| `STRATA_WDDM_MARGIN_MIB` | number | AMD | [AMD_HIP.md](AMD_HIP.md) |

## Switches that go back to earlier behaviour (134)
## Switches that go back to earlier behaviour (135)

These behaviours are on by default. Setting the switch returns the earlier behaviour; the notes in the register say which
version made it the default.
Expand Down Expand Up @@ -491,6 +491,7 @@ version made it the default.
| `STRATA_QFUSE_HC_LOCAL` | text | NVIDIA and AMD | v0.2.16 | - |
| `STRATA_QSA_EARLY_EXIT` | number | NVIDIA and AMD, Intel Arc | v0.2.16 | - |
| `STRATA_QSA_FUSE_NR` | on / off | NVIDIA and AMD | v0.2.16 | - |
| `STRATA_QWEN4_KERNEL_TABLES` | on / off | NVIDIA and AMD | - | - |
| `STRATA_RDNA_KQ_ALL` | on / off | NVIDIA and AMD | v0.2.19 | - |
| `STRATA_REMOTE_SPIN` | on / off | NVIDIA, AMD, Intel Arc | v0.2.16 | - |
| `STRATA_RESIDENT_PIN` | on / off | NVIDIA and AMD, Intel Arc | v0.2.16 | [DETAILS.md](DETAILS.md), [TROUBLESHOOTING.md](TROUBLESHOOTING.md), [UNSLOTH_Q4.md](UNSLOTH_Q4.md) |
Expand Down
9 changes: 9 additions & 0 deletions engine/src/poly/qwen4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ void Qwen4::load_geometry() {
clamp_shexp_ = clamp_exp_;
lane_slots_ = true;
swiglu_q8_ = true;
#if !defined(STRATA_GPU_METAL) && !defined(STRATA_USE_HIP)
// In a prompt's read of several calls, a call's row tables go to the card by a kernel, not behind the experts'
// copies, as Inkling 2's (kernel_tables_): the same tables reach the same buffers. STRATA_QWEN4_KERNEL_TABLES=0
// turns it off.
{
const char* v = std::getenv("STRATA_QWEN4_KERNEL_TABLES");
kernel_tables_ = !(v && v[0] == '0');
}
#endif
#if !defined(STRATA_GPU_METAL) && !defined(STRATA_USE_HIP)
// Enable B6=2 (bitwise-exact 2-row-per-block multi-column MMVQ for Q4_K/Q5_K/Q6_K/IQ4_XS) on CUDA unless the user
// explicitly set STRATA_B6_MMVQ_ROWS; measured +4-5% on Qwen4 DFlash2 with 0 extra VRAM.
Expand Down
33 changes: 33 additions & 0 deletions terminal/data/settings-register.json
Original file line number Diff line number Diff line change
Expand Up @@ -42439,6 +42439,39 @@
"retire_after": "",
"retired_in": "0.2.16"
},
{
"name": "STRATA_QWEN4_KERNEL_TABLES",
"backends": [
"cuda-hip"
],
"reads": [
{
"file": "engine/src/poly/qwen4.cpp",
"line": 257,
"backend": "cuda-hip",
"fn": "getenv"
}
],
"parse": "flag",
"default_state": null,
"code_default": null,
"engine_sets": [],
"engine_defaults": [],
"launch_files": [],
"launch_sets": [],
"launch_reads": [],
"doc_mentions": [],
"first_commit": null,
"first_date": null,
"since": null,
"last_commit": null,
"last_date": null,
"status": "rollback",
"owner": "poly",
"note": "Qwen4 (qwen4exp) on CUDA: in a prompt read of several calls, moe_rows() hands a call's row tables to the card by a kernel (copy2) that reads them from pinned memory, as Inkling 2's STRATA_INK_KERNEL_TABLES, instead of a copy that waits behind the layer's expert uploads on the card's one upload copy engine. Same bits, no extra VRAM. Default on; =0 keeps the copies, as before. HIP and Metal never take it (engine/src/poly/qwen4.cpp, engine.cpp moe_rows())",
"retire_after": "",
"retired_in": ""
},
{
"name": "STRATA_RAM_ADAPT",
"backends": [
Expand Down