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

docs: add malloc_trim comment for musl (#1435 review)

iiEliJasa630fd58618a
diff --git a/c/colibri.c b/c/colibri.c
index 21f92a40..811dceb5 100644
--- a/c/colibri.c
+++ b/c/colibri.c
@@ -8455,6 +8455,7 @@ static void rss_guard(Model *m){
if(dropped)
fprintf(stderr,"[RAM-GUARD] RSS %.1f GB over the %.1f GB budget (#403): "
"dropped %d cached experts, cap -> %d\n", rss, lim, dropped, m->ecap);
+/* musl lacks malloc_trim, but free() returns large slabs to the OS directly */
#ifdef __GLIBC__
malloc_trim(1024);
#endif