Skip to main content

Ms.MoE

Multi-Specified Mixture of Experts. Five deliberate experts instead of a hundred lottery tickets.

The design thesis is the inverse of a frontier MoE. Instead of training many experts and hoping specialisation emerges — then fighting dead and collapsed experts with a load-balancing auxiliary loss — you hand-assign the domains. Every expert has a guaranteed constituency, so none of them can go dead, because none of them was speculative.

The corollary is what makes it maintainable by one person: because each expert does exactly one thing, you can retrain one and re-splice without touching the others.

Not a coding model. A coding model shaped like your stack.

The real product is the factory, not the model. Swap the expert list and someone else gets their own Ms.MoE.


Install

pip install ms-moe-maker

That gets you the CLI and the contract — about a megabyte, no torch. The heavy machinery lives in the pipeline this forks, in whatever venv you train in. That split is the point: ms-moe-maker validate runs on a laptop, so you can check a recipe and see what it will cost before going near a machine that can run it.

Use

ms-moe-maker describe                  # one line of JSON, exit 0, no side effects
ms-moe-maker validate recipe.yaml      # parse, check, translate — touches nothing
ms-moe-maker build recipe.yaml         # run it
ms-moe-maker build recipe.yaml --json  # JSON Lines on stdout, prose on stderr

ms-moe-maker build recipe.yaml is the literal command. It's what's in this README, it's what a person types, and it's exactly what seren-theatre[stagehand] forks — no separate API path with different defaults. If those two ever diverged, the hand-run path would rot, because it's the one with no automated users. Making them identical removes the possibility.

The recipe

A build, as a document. The point is that you can hand it to someone who doesn't have your box and they get your run — that's the difference between "it works, look" and a result.

schema_version: 1
name: msmoe-coder-5x-dryrun
size: 0.5B
base: huihui-ai/Qwen2.5-Coder-0.5B-Instruct-abliterated

experts:
  - name: powershell
    source: { kind: hf, repo: SaeedRahmani/codeparrot_github_code_powershell, text_field: code }
  - name: python
    source: { kind: stack, language: Python }
  # ...

budget:
  target_steps: 150        # 1200 for a real rung; 150 is the shakedown
  max_seq_length: 2048
  per_device_batch: 4
  grad_accum: 2

See recipe.example.yaml for the annotated version — every field carries the measurement that chose it.

Budgets are in tokens, derived from steps. Capping documents instead looked like balance and wasn't: at 10,000 documents each, PowerShell received 4.3× the gradient updates Shell did, and a different LR curve besides.

Refusals — read this bit

Right now ms-moe-maker build drives an existing pipeline script by setting environment variables and forking it. That script exposes sixteen levers. A recipe declares far more than sixteen things.

So the naive wrapper would accept per_device_batch: 8, run the build at 4, and report success — leaving you with a document that looks authoritative and silently isn't. That's the worst possible place to put that trap, in the one file whose entire selling point is reproducing someone else's run.

So a recipe field is honoured, or the build refuses. Never ignored.

The check isn't "is there a lever" — it's "will the run actually do what the document says". Ms.MoE reads the pipeline's own constants statically (via ast, never importing — importing it would cost you a CUDA context) and compares each field against the value that will really be used. Agreement is silence. Only disagreement refuses.

$ ms-moe-maker build recipe.yaml
   2 recipe field(s) cannot be honoured by fraunkenstein_universal.py:
     · budget.per_device_batch=8 cannot be applied: the pipeline uses 4 from
       PER_DEVICE_BATCH and exposes no environment lever for it.
     · gates.main_evals='manual' cannot be honoured: the pipeline runs end to
       end with no stage boundary a gate could pause at.
   REFUSED - nothing was run.

--allow-refusals proceeds anyway. The refusals are recorded in the run manifest either way, because the person who needs to know a lever was ignored is the one reading the dashboard six hours later, not the one who saw the terminal at kickoff.

The refusal list is the roadmap. Each entry is a field somebody wanted to set and couldn't — which is exactly the priority order for pulling that part of the script into a real stage. When the list is empty, the decomposition is finished, and nobody had to guess when.

The run manifest

A build writes msmoe-run.json into its run directory: what the run is, the ordered stage list, each stage's status and artifact, and any refusals.

That file is the only interface between this package and any viewer. Nothing imports anything. seren-theatre reads the manifest when it's there and falls back to reading the directory when it isn't — so an instrumented run is exact and an uninstrumented directory still works. Neither package is required, and neither knows the other exists.

Events

Under --json: one JSON object per line on stdout, prose on stderr, never interleaved.

event when
started the build begins; carries the resolved env and run dir
stage a stage changes status
progress something worth knowing inside a stage
refused recipe fields that couldn't be honoured
warning / error trouble
done terminal, with ok

Every line is flushed. A consumer following a six-hour build through a pipe would otherwise see nothing until the buffer filled — and that looks exactly like a hang.

Status

The stage machinery, contract and CLI are real. The pipeline itself is still the original 2483-line script, driven from the outside — wrap-then-carve. The contract is the product; the internals move behind it without anything downstream noticing.

Licence

GPL-3.0-only.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ms_moe_maker-0.5.0.tar.gz (68.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ms_moe_maker-0.5.0-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

Details for the file ms_moe_maker-0.5.0.tar.gz.

File metadata

  • Download URL: ms_moe_maker-0.5.0.tar.gz
  • Upload date:
  • Size: 68.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ms_moe_maker-0.5.0.tar.gz
Algorithm Hash digest
SHA256 a9fc43f5ba0f5ef3ed0512338152dbae6aa990b94025e471fb5d8bd30abd2684
MD5 2ca6d0570c8be8d41df13e03de367c71
BLAKE2b-256 486ef19264df94a68876df637ac09cacddb93e93c9ed2018242a948678aa4d98

See more details on using hashes here.

Provenance

The following attestation bundles were made for ms_moe_maker-0.5.0.tar.gz:

Publisher: release.yml on ChadRoesler/MsMoEMaker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ms_moe_maker-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: ms_moe_maker-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for ms_moe_maker-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5cd27935661125447074b9bfea3c82cba522b4c9381c1e24f8ba7edb470129e
MD5 2aef43f8c5a569c4db432ec34e6008f1
BLAKE2b-256 3d39db45e840968530025340642ff625790dc5b45339dcafdb6206814ae5725a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ms_moe_maker-0.5.0-py3-none-any.whl:

Publisher: release.yml on ChadRoesler/MsMoEMaker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.0

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

This release

0.5.0 This release

2 files

0.4.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page