Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
fix: layer_cuda_shard_kvb scale offset for fmt=4 (multi-GPU, per JustVugg review)
woolcoxmbfb80000bebc
diff --git a/c/colibri.c b/c/colibri.cindex d8108be7..334c2df0 100644--- a/c/colibri.c+++ b/c/colibri.c@@ -1647,7 +1647,7 @@ static void layer_cuda_shard_kvb(Layer *l,int H,int Q,int V){for(int d=0,h0=0;d<g_cuda_ndev;d++){int hn=H/g_cuda_ndev+(d<H%g_cuda_ndev),rows=hn*(Q+V);const void *part=weights+(int64_t)h0*(Q+V)*rb;- const float *scale=l->kv_b.s+(int64_t)h0*(Q+V);+ const float *scale=l->kv_b.s+(int64_t)h0*(Q+V)*(l->kv_b.gs>0?(l->kv_b.I+l->kv_b.gs-1)/l->kv_b.gs:1);if(!coli_cuda_tensor_upload(&l->kv_b_shard[d],part,scale,l->kv_b.fmt,l->kv_b.I,rows,g_cuda_devices[d],l->kv_b.gs))return;l->shard_h0[d]=h0;l->shard_hn[d]=hn;l->n_kv_b_shard++;h0+=hn;}