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

feat(olmoe): the matrices resident on the device in the exit line

JustVugg1bc4c547b745
diff --git a/c/olmoe.c b/c/olmoe.c
index ebd2654d..cd3fb557 100644
--- a/c/olmoe.c
+++ b/c/olmoe.c
@@ -344,8 +344,11 @@ static void vk_res_free(void **vk) {
*vk = NULL;
}
static void olmoe_vk_report(void) {
- if (g_vk_ready)
- fprintf(stderr, "[VK] olmoe: %llu matmuls on the GPU\n", coli_vk_matmul_calls());
+ if (!g_vk_ready) return;
+ size_t bytes = 0, tensors = 0; /* the dense matrices on the device (a partial chain: its layers' only) */
+ coli_vk_mem_info(&bytes, &tensors);
+ fprintf(stderr, "[VK] olmoe: %llu matmuls on the GPU (%zu matrices resident, %.1f MiB)\n", coli_vk_matmul_calls(),
+ tensors, bytes / 1048576.0);
}
#define MATMUL_RES(y, x, W, vk, S, I, O) matmul_res(y, x, W, &(vk), S, I, O)
#else