[GH-ISSUE #1995] Request: Add Q4_1 PLE Dequantization Support #795

Closed
opened 2026-11-04 01:45:55 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @dororo1989 on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1995

I am running Strata on Windows with an AMD Radeon RX 9070 (16 GB VRAM), 64 GB of system RAM, and the HIP backend. This setup makes it possible to run certain 4-bit quantized MoE models locally, even with relatively limited GPU memory.

While testing the [Qwen3.8 Flash-Next AD IQ4_XS M64 model](https://huggingface.co/AtomicChat/Qwen3.8-Flash-Next-GGUF), I discovered that its per_layer_token_embd.weight tensor uses Q4_1 quantization and requires Q4_1 PLE dequantization support in Strata.

With AI-assisted development, I implemented the missing Q4_1 PLE dequantization path and tested it against the actual GGUF data. The validation passed with bit-identical results.

Would you consider integrating Q4_1 PLE dequantization support into Strata upstream?

Full official M64 support would be welcome, but it is not a requirement for this request. Adding Q4_1 PLE support alone would already make the engine more compatible with models that use this format and would save users from maintaining custom patches across releases.

I can provide the patch and validation details if helpful.

Thank you for your work on Strata!

Originally created by @dororo1989 on GitHub (Oct 11, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1995 I am running Strata on Windows with an AMD Radeon RX 9070 (16 GB VRAM), 64 GB of system RAM, and the HIP backend. This setup makes it possible to run certain 4-bit quantized MoE models locally, even with relatively limited GPU memory. While testing the [[Qwen3.8 Flash-Next AD IQ4_XS M64 model](https://huggingface.co/AtomicChat/Qwen3.8-Flash-Next-GGUF)](https://huggingface.co/AtomicChat/Qwen3.8-Flash-Next-GGUF), I discovered that its `per_layer_token_embd.weight` tensor uses Q4_1 quantization and requires Q4_1 PLE dequantization support in Strata. With AI-assisted development, I implemented the missing Q4_1 PLE dequantization path and tested it against the actual GGUF data. The validation passed with bit-identical results. Would you consider integrating Q4_1 PLE dequantization support into Strata upstream? Full official M64 support would be welcome, but it is not a requirement for this request. Adding Q4_1 PLE support alone would already make the engine more compatible with models that use this format and would save users from maintaining custom patches across releases. I can provide the patch and validation details if helpful. Thank you for your work on Strata!
Author
Owner

@Niko1221 commented on GitHub (Oct 11, 2026):

Thank you for testing that model on the RX 9070 and for checking your path against the real GGUF data. Yes, we would like to take Q4_1 for the PLE table upstream. Please open a pull request with your patch.

The PLE formats are table-driven since 0.1.40.1, so the change should be small:

  • The format table: one new entry in kPleFormats in src/kernels/ngram.cpp, next to Q4_0 / Q5_0 / Q5_1 / Q8_0. A Q4_1 block is 20 bytes for 32 values, so a 160-value row is 100 bytes. The dequantizer would be dequant_blocks<..., 20> with a Q4_1 block function written in the same form as the others. The SYCL build compiles the same ngram.cpp, so Intel gets it too.
  • The test: src/ngram/ple_reader_test.cpp already knows the Q4_1 type id. With the table entry added, its format_round_trip runs Q4_1 through both --ple-io modes and checks every row against the dequantizer. Please also say in the PR how you compared against the GGUF data (for example llama.cpp's dequantize_row_q4_1 on the same rows), and on which build you ran it.
  • The GPU paths: if your patch touches a GPU-side PLE read too, please name it in the PR description, so we test it on CUDA, HIP and SYCL.

We will run it through our usual gates before it ships: same answers for the existing PLE formats, plus a run of the AtomicChat file you used. Thanks again!

<!-- gh-comment-id:6113922395 --> @Niko1221 commented on GitHub (Oct 11, 2026): Thank you for testing that model on the RX 9070 and for checking your path against the real GGUF data. Yes, we would like to take Q4_1 for the PLE table upstream. Please open a pull request with your patch. The PLE formats are table-driven since 0.1.40.1, so the change should be small: - **The format table:** one new entry in `kPleFormats` in `src/kernels/ngram.cpp`, next to Q4_0 / Q5_0 / Q5_1 / Q8_0. A Q4_1 block is 20 bytes for 32 values, so a 160-value row is 100 bytes. The dequantizer would be `dequant_blocks<..., 20>` with a Q4_1 block function written in the same form as the others. The SYCL build compiles the same `ngram.cpp`, so Intel gets it too. - **The test:** `src/ngram/ple_reader_test.cpp` already knows the Q4_1 type id. With the table entry added, its `format_round_trip` runs Q4_1 through both `--ple-io` modes and checks every row against the dequantizer. Please also say in the PR how you compared against the GGUF data (for example llama.cpp's `dequantize_row_q4_1` on the same rows), and on which build you ran it. - **The GPU paths:** if your patch touches a GPU-side PLE read too, please name it in the PR description, so we test it on CUDA, HIP and SYCL. We will run it through our usual gates before it ships: same answers for the existing PLE formats, plus a run of the AtomicChat file you used. Thanks again!
Author
Owner

@Niko1221 commented on GitHub (Nov 5, 2026):

Thanks for taking the time to report this.

Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.

To reopen it takes about two minutes:

  1. Re-test on 0.2.11. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6659224417 --> @Niko1221 commented on GitHub (Nov 5, 2026): Thanks for taking the time to report this. Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected. To reopen it takes about two minutes: 1. Re-test on 0.2.11. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
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#795
No description provided.