Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
Merge dev: keep both the mirror and tune subcommands
JustVugg570deac8554f
diff --cc c/coliindex 764dd1b0,ff557732..44a09179--- a/c/coli+++ b/c/coli@@@ -991,16 -1144,20 +1166,28 @@@ def main()sub.add_parser("build", parents=[common]); sub.add_parser("info", parents=[common])pp=sub.add_parser("plan",parents=[common])pp.add_argument("--json",action="store_true")+ pm=sub.add_parser("mirror", parents=[common],+ help="plan, stage, or verify a usage-ranked partial model mirror")+ pm.add_argument("action", choices=("plan", "stage", "verify"))+ pm.add_argument("--mirror", default=os.environ.get("COLI_MODEL_MIRROR"))+ pm.add_argument("--source-dir", action="append", default=[])+ pm.add_argument("--usage")+ pm.add_argument("--budget-gib", type=float, default=0)+ pm.add_argument("--reserve-gib", type=float, default=10)pd=sub.add_parser("doctor",parents=[common])pd.add_argument("--json",action="store_true",help="emit a versioned JSON report")+ pd.add_argument("--deep",action="store_true",+ help="strictly check every tensor layout, model index, and configured mirror")+ pt=sub.add_parser("tune",parents=[common],+ description="measure and save the fastest quality-preserving execution profile",+ help="measure and save the fastest quality-preserving execution profile")+ pt.add_argument("--prompt",default="Explain why fixed-token replay makes a benchmark reproducible.")+ pt.add_argument("--tokens",type=int,default=16,help="calibration continuation length")+ pt.add_argument("--repeats",type=int,choices=range(1,6),default=2)+ pt.add_argument("--timeout",type=int,default=900,help="seconds allowed for each engine run")+ pt.add_argument("--min-gain",type=float,default=0.03,+ help="minimum fractional throughput gain required to accept a candidate")+ pt.add_argument("--profile-dir",default=None,help=argparse.SUPPRESS)pr=sub.add_parser("run", parents=[common]); pr.add_argument("prompt", nargs="*")pc=sub.add_parser("chat", parents=[common])pc.add_argument("--attach", nargs="?", const="http://127.0.0.1:8000", default=None,@@@ -1040,10 -1203,11 +1233,12 @@@pb.add_argument("--data",default=_bench_cache)pc=sub.add_parser("convert", parents=[common]); pc.add_argument("--repo",default="zai-org/GLM-5.2-FP8")pc.add_argument("--ebits",type=int,default=4); pc.add_argument("--io-bits",type=int,default=8); pc.add_argument("--xbits",type=int,default=0)+ pc.add_argument("--group-size",type=int,default=64,+ help="int4 scale group size: 64 (default, group-scaled quality) or 0 (legacy per-row)")pc.add_argument("--no-mtp",action="store_true",help="skip the MTP head (no speculative drafts)")a=ap.parse_args()- handler={"build":cmd_build,"info":cmd_info,"plan":cmd_plan,"doctor":cmd_doctor,"tune":cmd_tune,+ handler={"build":cmd_build,"info":cmd_info,"plan":cmd_plan,"mirror":cmd_mirror,- "doctor":cmd_doctor,++ "doctor":cmd_doctor,"tune":cmd_tune,"run":cmd_run,"chat":cmd_chat,"serve":cmd_serve,"stop":cmd_stop,"bench":cmd_bench,"convert":cmd_convert,"web":cmd_web}.get(a.cmd)if handler: sys.exit(handler(a) or 0)