Skip to content

Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦

C

Point the efficiency tests at the engine's actual name

ZacharyZcR38fd944e990a
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a37fd176..6ce28cb7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -5,7 +5,9 @@ Keep changes focused and preserve Colibri's dependency-free default CPU path.
## Branches
- **`main`** is the stable branch. It's what users clone, and it stays known-good
- (engine always passes the token-exact oracle: `SNAP=./glm_tiny TF=1 ./glm 64 16 16`).
+ (engine always passes the token-exact oracle: `SNAP=./glm_tiny TF=1 ./colibri 64 16 16`,
+ run from `c/`). The `glm_tiny` fixture is generated, not committed --
+ `python3 c/tools/make_glm_oracle.py` builds it (needs torch).
- **`dev`** is the integration branch. **Open your PR against `dev`.** Reviewed PRs
land there first; once a batch is tested and stable, the maintainer fast-forwards
it into `main`. This keeps `main` clean instead of taking every PR one at a time.
diff --git a/c/tests/test_inefficiency.py b/c/tests/test_inefficiency.py
index 00d8b58b..70fadb72 100644
--- a/c/tests/test_inefficiency.py
+++ b/c/tests/test_inefficiency.py
@@ -2,7 +2,7 @@
These run against the bundled glm_tiny model (~0.6 MB resident, ~0.1s/run) and
gate CI: a regression here means something broke. They run on a plain CPU-only
-`glm.exe` build; the CUDA_* tests auto-skip if the engine wasn't built with
+`colibri` build; the CUDA_* tests auto-skip if the engine wasn't built with
CUDA_DLL=1 (see tests/README_efficiency.md for the build command).
The signals under test, and the inefficiency each catches:
@@ -26,18 +26,24 @@ from tools.efficiency import (
HERE = Path(__file__).resolve().parent
C_DIR = HERE.parent
-ENGINE = C_DIR / "glm.exe"
+# The engine was renamed glm -> colibri, and this file kept pointing at
+# "glm.exe" -- a name that does not exist on Linux or macOS (no .exe) and no
+# longer exists on Windows either. _engine_present() was therefore always
+# False, so every test in this file has been skipping on every platform
+# instead of running. Resolve the real name, both extensions.
+ENGINE = next((p for p in (C_DIR / "colibri", C_DIR / "colibri.exe") if p.exists()),
+ C_DIR / "colibri")
TINY = C_DIR / "glm_tiny"
def _engine_present() -> bool:
"""True iff BOTH the built engine AND the tiny fixture are available.
- These tests need glm.exe (a build artifact) AND glm_tiny/ (a generated
+ These tests need the colibri engine (a build artifact) AND glm_tiny/ (a generated
fixture, gitignored). CI runs `make check` = "dependency-free tests, no
model downloads" (workflow .github/workflows/check.yml, by design #140), so
neither is present there and these tests must SKIP rather than fail. They
- run locally after `make glm.exe` (glm_tiny ships alongside the source, or
+ run locally after `make colibri` (glm_tiny ships alongside the source, or
is regenerated by tools/make_glm_oracle.py).
"""
return ENGINE.exists() and (TINY / "config.json").exists()
@@ -46,7 +52,7 @@ def _engine_present() -> bool:
def _skip_reason() -> str:
"""Name exactly which prerequisite is missing, so the skip is actionable."""
if not ENGINE.exists():
- return "glm.exe not built (run: make glm.exe)"
+ return "colibri not built (run: make -C c colibri)"
if not (TINY / "config.json").exists():
return "glm_tiny fixture absent (gitignored; ship it locally or run tools/make_glm_oracle.py)"
return ""
@@ -84,7 +90,7 @@ def _cuda_available() -> bool:
return False
[email protected](_engine_present(), _skip_reason() or "glm.exe + glm_tiny required")
[email protected](_engine_present(), _skip_reason() or "colibri + glm_tiny required")
class TinyEfficiencyTest(unittest.TestCase):
"""Asserted regression tests on the resident tiny model. Gates CI."""
@@ -174,7 +180,7 @@ class TinyEfficiencyTest(unittest.TestCase):
@unittest.skipUnless(_cuda_available(),
- _skip_reason() or "CUDA build not present (run: make clean && make glm.exe CUDA_DLL=1 && make cuda-dll)")
+ _skip_reason() or "CUDA build not present (run: make clean && make colibri CUDA_DLL=1 && make cuda-dll)")
class TinyCudaEfficiencyTest(unittest.TestCase):
"""CUDA-path regression tests on the tiny model. Skip unless CUDA built.
diff --git a/c/tools/efficiency.py b/c/tools/efficiency.py
index 775e8cf0..1e21e51a 100644
--- a/c/tools/efficiency.py
+++ b/c/tools/efficiency.py
@@ -389,12 +389,15 @@ def run_engine(
) -> tuple[dict, subprocess.CompletedProcess]:
"""Run the engine with an env overlay; return (parsed_telemetry, proc).
- `engine` defaults to ./glm.exe (colibri's Windows host). `snap` defaults to
+ `engine` defaults to the built ./colibri (or .exe). `snap` defaults to
the bundled tiny model (glm_tiny) so callers can omit it for fast tests.
The positional argv is `cap ebits dbits`, matching the engine's main().
"""
if engine is None:
- engine = str(Path(__file__).resolve().parent.parent / "glm.exe")
+ # glm was renamed colibri; prefer whichever of the two names exists so
+ # a stale checkout still resolves, and fall back to the current one.
+ _c = Path(__file__).resolve().parent.parent
+ engine = str(next((p for p in (_c / "colibri", _c / "colibri.exe") if p.exists()), _c / "colibri"))
env = os.environ.copy()
# Strip CUDA vars by default so a CPU run isn't accidentally GPU-accelerated
# by a leftover env; callers opt in by passing them in env_overlay.