Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
serve: a SUBMIT on a busy slot gets SLOT_BUSY on every engine
JustVugg1a48d7ac45a4
diff --git a/c/inkling.c b/c/inkling.cindex c3a57f2a..2b204dbe 100644--- a/c/inkling.c+++ b/c/inkling.c@@ -3500,7 +3500,7 @@ static void serve_mux(Model *m, Tok *T) {for (int i = 0; i < n; i++) if (rq[i].active && !strcmp(rq[i].q.id, command.id)) rq[i].cancel = 1;} else if (command.kind == COLI_SERVE_COMMAND_SUBMIT) {if (command.slot < 0 || command.slot >= n) coli_serve_write_error(stdout, command.id, "invalid cache slot");- else if (rq[command.slot].active) coli_serve_write_error(stdout, command.id, "cache slot busy");+ else if (rq[command.slot].active) coli_serve_write_error(stdout, command.id, "SLOT_BUSY");else {InkMuxReq *t = &rq[command.slot];memset(t, 0, sizeof *t);diff --git a/c/kimi_k3.c b/c/kimi_k3.cindex 12703ea7..22dadcca 100644--- a/c/kimi_k3.c+++ b/c/kimi_k3.c@@ -3987,7 +3987,7 @@ static void serve_mux(Model *m, Tok *T){for(int i=0;i<n;i++) if(rq[i].active&&!strcmp(rq[i].q.id,command.id)) rq[i].cancel=1;} else if(command.kind==COLI_SERVE_COMMAND_SUBMIT){if(command.slot<0||command.slot>=n) coli_serve_write_error(stdout,command.id,"invalid cache slot");- else if(rq[command.slot].active) coli_serve_write_error(stdout,command.id,"cache slot busy");+ else if(rq[command.slot].active) coli_serve_write_error(stdout,command.id,"SLOT_BUSY");else {K3MuxReq *t=&rq[command.slot];memset(t,0,sizeof *t);diff --git a/c/olmoe.c b/c/olmoe.cindex 9796156d..b43fbf41 100644--- a/c/olmoe.c+++ b/c/olmoe.c@@ -2681,7 +2681,7 @@ static void serve_mux(Model *m, Tok *T, int ctx_cap) {for (int i = 0; i < n; i++) if (rq[i].active && !strcmp(rq[i].q.id, command.id)) rq[i].cancel = 1;} else if (command.kind == COLI_SERVE_COMMAND_SUBMIT) {if (command.slot < 0 || command.slot >= n) coli_serve_write_error(stdout, command.id, "invalid cache slot");- else if (rq[command.slot].active) coli_serve_write_error(stdout, command.id, "cache slot busy");+ else if (rq[command.slot].active) coli_serve_write_error(stdout, command.id, "SLOT_BUSY");else {OlmMuxReq *t = &rq[command.slot];memset(t, 0, sizeof *t);diff --git a/c/qwen36.c b/c/qwen36.cindex 8ab5f796..9b6f5220 100644--- a/c/qwen36.c+++ b/c/qwen36.c@@ -5917,7 +5917,7 @@ static void serve_mux(Model *m){} else if (r == 2 || r == 3) {int bad = q.slot < 0 || q.slot >= n;if (bad || rq[q.slot].active) {- printf("ERROR %s %s\n", q.id, bad ? "invalid cache slot" : "cache slot busy"); fflush(stdout);+ printf("ERROR %s %s\n", q.id, bad ? "invalid cache slot" : "SLOT_BUSY"); fflush(stdout);} else if (r == 3) {q36_mux_bind(m, q.slot); clef_serve_one(m, &q);} else {diff --git a/c/qwen38.c b/c/qwen38.cindex 2508e0c1..900ed18b 100644--- a/c/qwen38.c+++ b/c/qwen38.c@@ -2108,7 +2108,7 @@ static int q38_mux_read(Model *m,Q38MuxReq *rq,int n){}Q38MuxReq *r=&rq[command.slot];if(r->active){- coli_serve_write_error(stdout,command.id,"cache slot busy");+ coli_serve_write_error(stdout,command.id,"SLOT_BUSY");coli_serve_command_dispose(&command);return 0;}memset(r,0,sizeof *r);