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

Open kernels should run a model family from its config, not one hand-fitted model

Open Cyronius opened this issue 2 months ago • 0 comments

After #5 / #6 landed, the open kernels ran exactly one model: the Qwen3.6 MoE. Every layout, buffer size and kernel build was written down for that model, and nothing else could use them without someone going back into both the kernel designs and the C++ engine by hand.

That's the wrong shape for a project whose point is replacing the closed engines. Each of those covers a whole model family from a config file, and we should be able to do the same.

What I'd like to see

  • The engine stops knowing anything about a specific model. It reads a description (which kernels, which buffers, in what order) that a script produces from the model's config.json.
  • Adding a new size of an existing family is a config change, not a code change.
  • Adding a new family means writing one recipe (and a kernel design if the family needs an operation we don't have yet), and nothing else.
  • Kernel builds are cached by what they were built from, so re-running the export does not rebuild things that haven't changed.
  • The recipes refuse to emit a kernel configuration nobody has run on hardware, so "it produced a manifest" never gets mistaken for "it works".

A good test of whether it worked

Get three more families running on it: Qwen3 dense (the plain 4B), Llama 3.1 8B, and Gemma 3 4B. Gemma is the interesting one because it needs things the MoE never did: a different activation, extra norms around each block, sliding-window attention on most layers, and two sets of rotary positions. If all of that fits as recipe knobs and small kernels, the shape is right.

There's a PR attached with all of the above.

Cyronius avatar Sep 06 '26 00:09 Cyronius