linxuhao 10c8cc629f Prefill fused IQ experts: opt-in f16 mma path STRATA_PF_FUSED_F16=1 and warp-specialized kernel STRATA_PF_FUSED_WS=1 (#3779, #3712)
Problem: the NT = 256 kernels still decode every 32 values to int8 and scale
the int32 products in FP32.

Change, both opt-in and both rounding-level (the output is not bit-identical to the
int8 kernels; they are the PR's "rounding-level" switches):
- STRATA_PF_FUSED_F16=1 (implies the NT = 256 set): the decoded weights times
  their block scales and the activations times theirs as F16, m16n8k16 F16
  products into FP32 accumulators. The k order inside a 16-value group is
  permuted the same way for both operands.
- STRATA_PF_FUSED_WS=1: native_ws_kernel, producer warps decode into an F16 ring
  in shared memory and consumer warps run the same F16 products (named barriers),
  so it has the F16 path's rounding. One block per multiprocessor; about 101 KB of
  shared memory at its defaults, so it is set up on sm_80 / sm_90 cards and
  says "not available" and keeps the 512-thread kernels on an sm_86 / sm_89 /
  sm_120 card (99 KB). Compile-time knobs STRATA_WS_PROD / _SLOTS / _NB / _KS / _HTAB.
- Both take a WideBatch like the NT = 256 kernels, so STRATA_PF_BATCH above 128
  reaches them. CUDA only (under !__HIPCC__); the Turing pass compiles the F16
  instances against __trap() stubs and never runs them (dev_info stops before the
  NT = 256 setup on Turing).
- With neither variable set the kernels, their launches and their shared-memory
  sizes are as before (the F16 template parameter defaults to false).

Differs from the PR as submitted: when STRATA_PF_FUSED_Q2N=1 is on as well
(#3809, after the PR was written) the WS setup also sets up the Q2_0 gate/up
instance.

Tests: prefill_fused_iq_test_f16 and prefill_fused_iq_test_ws (ctest) run the
fused-experts test (double-precision reference and MMQ) with the switch set. The
test now skips (77) when a requested NT / F16 / WS kernel set is not set up on the
device, so a card that cannot run WS does not report a pass for the 512-thread
kernels.

Limits of the test for these two arms only: with STRATA_PF_FUSED_F16=1 or _WS=1 the
test uses the limits it already has for STRATA_PF_F16 (F16 products): fused against the
int8-rounded model rel RMS 5e-3 (2e-3 otherwise) and against MMQ 5e-3 (1e-3 otherwise).
Measured with F16 on an RTX A4000 (sm_86, z440), over the 11 pairs: against the int8-rounded
model rel RMS 2.85e-3 to 2.90e-3 and worst row 5.9e-3 to 8.1e-3; against MMQ the same;
against the FP32 reference 1.438e-2 to 1.480e-2 with MMQ at 1.435e-2 to 1.478e-2 (the
fused path stays within 1.003x of MMQ's rel RMS and 1.03x of its worst row). The rounding is the F16 rounding of the
weights times their scales and of the activations times theirs (an 11-bit mantissa, about
2^-11 relative per operand), which the int8-rounded model does not have; it is not a
different summation order. The same arm on an RTX PRO 5000 (sm_120): up to 2.90e-3 (rel RMS), worst row up to 8.1e-3.
The default path and the NT=256 arm keep the old limits and their printed errors are
unchanged: with no switch set the test prints identical output (52 lines) from the base
tree and this tree, on an RTX A4000 (sm_86) and on an RTX PRO 5000 (sm_120).

Reporter's numbers (linxuhao, CMP 170HX): one MoE layer of 3,256 tokens 8.27 ms
(NT = 256) to 7.90 ms (F16) and 7.65 ms (WS); prompts +2..+6 % over the
256-thread kernels, 1 of 11 greedy answers changes. Teacher-forced KL against the
bitwise base on their 20-prompt set: F16 / WS mean 0.0062, median 0.00006, max
0.076, top-1 100 %. Theirs, not measured here.

Original change by linxuhao (PR #3779, commit 579cbfbb).
2026-10-27 00:52:52 +01:00
2026-10-13 04:36:28 +02:00
2026-10-13 04:36:30 +02:00

Strata

Run powerful AI on your own computer.

Chat, code and work with images, locally.

Models · Install · Hardware · Tools · Help · Support

Download Strata MIT license Support Strata on Buy Me a Coffee

English · 简体中文 · 日本語 · Deutsch · Français · Español · PortuguĂŞs

Free, open source, and yours to run. Use Strata on your desktop or with your favorite coding tools. No account needed.

Models

We recommend ISTA-DASLab first, then Unsloth and other providers, where a compatible model fits.

 Qwen3.8-Flash-Next
Provider Choices
ISTA-DASLab · recommended Q2_0, IQ2_XS, IQ3_XXS, IQ3_S. Coder: IQ1_M for coding.
Unsloth UD-IQ4_XS, UD-Q4_K_XL, UD-Q5_K_XL, UD-Q6_K_XL, Q8_0
Gyro · agentionai Gyro-S, Gyro-M. Lower memory use but slower.
Other options Swift 1.5, NVFP4, OrcaRouter

Compare sizes, memory needs and compatibility.

 Qwen3.6-35B-A3B

Unsloth: UD-Q4_K_XL, UD-Q6_K_XL, Q8_0. These are the currently documented packs for this model.

Model guide and compatibility.

 DeepSeekV4.1-Flash-1017

In the desktop app and the Terminal. What does not fit in memory is read from your SSD, so it needs a lot of free disk space.

Set (IST-DAS) Download Free disk needed
1.75 bpw 239 GB about 245 GB
2.00 bpw 257 GB about 265 GB
2.25 bpw 274 GB about 280 GB

Runs on NVIDIA RTX 30, 40 and 50 series (Windows and Linux), AMD Radeon AI PRO R9700 (Linux), and AMD Ryzen AI Max — Strix Halo (Windows). Setup downloads the files and the DeepSeek engine, then starts the model.

strata launch --family deepseek41 --model ist-das-2.00bpw --plan

Measured with the 2.00 bpw set on Strata 0.2.5 (Strix Halo: 0.2.7). Output is the speed of the answer, prompt is how fast Strata reads your input.

Hardware Output Prompt
RTX 5070 12 GB, 64 GB RAM 4 to 6 tokens/s about 110 tokens/s (4K)
RTX 3060 12 GB, 46 GB RAM 9 to 11 tokens/s about 155 tokens/s (4K)
1x Radeon AI PRO R9700, 251 GB RAM 21 to 25 tokens/s 320 to 360 tokens/s (8K)
4x Radeon AI PRO R9700 74 to 77 tokens/s 400 to 450 tokens/s (8K)
Ryzen AI Max+ 395 (Strix Halo), 128 GB unified 19 to 21 tokens/s (code), 11 (chat) 87 tokens/s (4K), 125 tokens/s (8K)

Memory, disk and details · Release notes

Not sure what fits? Choose a model for your computer.

Install

Desktop app

Download Strata for Windows, Linux or Mac →

Install the app, choose a model, and start chatting. There is one installer for each system. On first start the app downloads the engine for your graphics card. Help with the installer.

Files: Strata-0.2.6-windows-x64-setup.exe · Strata-0.2.6-linux-x86_64.AppImage · Strata-0.2.6-macos-arm64.dmg

Strata desktop app with a chat and live code preview side by side
Chat, files and a live preview in one window.

Terminal app

Prefer the terminal? Install Strata, then run strata launch.

Install commands

Linux / Mac

curl -fsSL https://github.com/Niko1221/Strata/releases/latest/download/install.sh -o install.sh && sh install.sh

Windows PowerShell

irm https://github.com/Niko1221/Strata/releases/latest/download/install.ps1 | iex

On Windows, open a new terminal afterwards. Then:

strata launch

Follow the prompts to download and start a model. Terminal guide.

Strata terminal app showing model activity, speed, memory and recent requests
Watch your model and hardware while it runs.

Build from source · Docker · Full install guide

Hardware

Supported hardware Guide
NVIDIA GeForce RTX 20 / 30 / 40 / 50 series NVIDIA setup
AMD Radeon RX 7700 / 7800 / 7900, RX 9060 / 9070, AI PRO R9700 AMD setup
AMD Radeon RX 6800 / 6900 · experimental RX 6000 setup
Intel Arc · Linux Intel setup
Apple Silicon · M1 or newer Mac setup
AMD Ryzen AI Max · Strix Halo Strix Halo setup

Tools

Claude Code · Codex CLI · OpenCode · oh-my-pi · pi.dev · Hermes Agent · OpenClaw, and more through the OpenAI- and Anthropic-compatible APIs.

Run strata connect to see setup instructions for your tool. Connection guide.

Help

All guides · Troubleshooting · Report a bug · Benchmarks · How it works · Contribute

Support Strata

Help keep local AI open to everyone. A coffee helps fund development and testing on more hardware.

Buy Me a Coffee: support Strata

MIT license · Credits and model licenses · Privacy

For AI tools and automated readers: technical reference · setup instructions.

Sponsorships, hardware partnerships or collaborations: niko.veit@outlook.com.

S
Description
AImighty fork of Niko1221/Strata (KVA+batch)
Readme MIT
81 MiB
0 Stars 3 Watchers 0 Forks
Languages
C++ 42.9%
Python 28.9%
Cuda 11.5%
JavaScript 8.3%
TypeScript 3.5%
Other 4.5%