OpenFlowLM-Next icon indicating copy to clipboard operation
OpenFlowLM-Next copied to clipboard

Run Qwen3.8-27B (dense) on the open kernels

Open Cyronius opened this issue 2 months ago • 1 comments

What

Qwen3.8-27B is the largest dense model in the Qwen3.5 / 3.8 family: hidden 5120, 64 layers, FFN 17408, and 48 linear-attention value heads over 16 key heads. The open-kernel recipe for the family (open_kernels/recipes/qwen35.py) refuses it. The four published sizes (0.8B, 2B, 4B, 9B) never needed what this one needs.

What stops it

  • The FFN down projection's activation table (K = 17408) doesn't fit in a main core's 64 KB of data memory.
  • The core that does the residual add and norm can't hold five 10 KB inputs at hidden 5120.
  • 48 value heads don't fit the 32-lane alpha / beta accumulator in the glue core. Walking the three input halves once per accumulator would also need 14 side-channel fills, and the core has 13.
  • The 5120- and 6144-wide activations are three 4 KB elements, in a FIFO that is only two deep.
  • None of its kernel shapes are in the validated catalogue.

The published container Atomic-Germ/Qwen3.8-27B-NPU2 also has a separate problem: it was converted with the value-head bug fixed in #143 (#142), so it answers in fragments even on correct kernels.

Done when

  • export_qwen36_kernels.py --model-dir <27B> builds all of the 27B's kernel sets, decode and the block prefill route. Every other model's kernels compile exactly as before.
  • On the NPU, the 27B passes OPEN-FAMILY-QWEN35's checks: the slice against the reference, the engine bit-identical to the harness, and a coherent chat. It also passes OPEN-PREFILL-BATCH's checks for a new Qwen3.5 size.

Not in this issue

  • Re-uploading a reconverted container to Atomic-Germ/Qwen3.8-27B-NPU2.
  • Registering the 27B in the app (src/model_list.json / oflm-add) so that oflm serve can load it. It isn't in the model list today, and there's no closed-kernel 27B family to link it to.

Cyronius avatar Oct 01 '26 23:10 Cyronius

@Cyronius I'm running Atomic-Germ/Qwen3.8-27B-NPU2 on my installed oflm built from #159 which includes this in it

Atomic-Germ avatar Oct 04 '26 05:10 Atomic-Germ