Skip to main content

kieve-moe

Expert-parallel Mixture-of-Experts training over iroh-tinker, built for the GCP fleet (CPU/GPU mix) and integrating with elasticgrid for launch/placement.

kieve-moe scales a BertBM/Kieve-style MoE encoder: experts are sharded across ranks, tokens are routed to the rank that owns their selected experts over an iroh-tinker transport, and gradients are averaged with the ring allreduce on the same transport — no NCCL/gloo process group required.

Features

  • Expert-parallel MoE (expert_parallel.py): top-k GeGLU MoE with a load-balancing auxiliary loss; remote experts are served by an aggregator rank over a dedicated transport (requests and replies ride disjoint channels).
  • Distributed trainer (distributed.py): data-parallel gradient sync, barriers, per-rank procedural data shards, resume-from-step checkpointing.
  • Fractal tiling routing (fractal.py): self-similar hierarchical routing (branch^levels expert tree) mirroring the Taichi fractal-tiling playground — a cheap router for very large expert pools.
  • Procedural generation (procedural.py): seeded pattern/LFSR token streams, so the fleet trains without shipping a dataset.
  • Discrete diffusion head (diffusion.py): masked-absorbing-state (MDLM) denoising objective + iterative unmasking sampler, adding generative token modeling on top of the MoE encoder.
  • Parametric sizing (scaling.py): the flagship 4.5B configuration (15 layers, H=768, I=4096, E=32) with a live parameter estimate.

Install

pip install kieve-moe
pip install -e ".[dev]"     # from a checkout

Train (local, in-process simulated world)

kieve-moe train --config configs/moe-4-5b.json --world 2 --steps 20

Train on the GCP fleet

Use iroh-tinker's SocketTransport (--transport socket) with a shared rendezvous dir, and elasticgrid for placement/launch:

kieve-moe train --config configs/moe-4-5b.json --world 4 \
  --transport socket --rdv /tmp/rdv --host 0.0.0.0

Or build an elasticgrid LaunchSpec for the same config (see scripts/launch_elasticgrid.py).

Tests

pytest tests -q — 15 tests covering dense↔parallel MoE equivalence, procedural streams, fractal routing, diffusion sampling, scale estimates, and the distributed trainer loop.

Metadata

Release files for kieve-moe 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kieve-moe 0.1.0
File Size Uploaded Provenance
kieve_moe-0.1.0.tar.gz 17.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kieve-moe 0.1.0
File Interpreter ABI Platform
kieve_moe-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 35.9 kB

Release files / kieve_moe-0.1.0.tar.gz

Download URL kieve_moe-0.1.0.tar.gz
Size 17.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9c080047976e1581644b9016d4b86b1ae73b189f377436e90156acf2b0715bea
BLAKE2b-256 checksum
How to use checksums
5902d8ae00534cb73f0b2dc8a27b8ae9266586322f3777194f9720f0ea0a7c71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / kieve_moe-0.1.0-py3-none-any.whl

Download URL kieve_moe-0.1.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf0bed6a61fc80137b321a36a3b11e07aa4f21acca64b9a69be132c808ce5d8e
BLAKE2b-256 checksum
How to use checksums
05e6b61f2334f216d7084a975cb5fa8a55e30d25d34d29a94304f959e2250218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for kieve-moe 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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