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

Merge remote-tracking branch 'origin/dev' into feat/vk-tier-exclusive

JustVuggd4df5d0df92b
diff --cc c/glm53.c
index d3165e7d,1b692319..ff005627
--- a/c/glm53.c
+++ b/c/glm53.c
@@@ -89,11 -89,12 +89,16 @@@ static uint64_t g_metal_moe_rows = 0
#include "vk_tier.h" /* the routed-expert tier the MoE engines share */
static int g_vk_ready = 0; /* COLI_VULKAN=1 and the device opened */
static int g_vk_dense = 0; /* the resident matrices run there (coli_vk_dense_decide) */
+ /* A partial chain (glm53_chain.h, vkc_fit): the device holds the first N layers only, or
+ * not the head. mv and mm then multiply on the device only what is there already: a
+ * matrix without a device copy stays on the CPU (G53_VK_MAY). */
+ static int g_g53_partial = 0;
+ #define G53_VK_MAY(w) (!g_g53_partial || (w)->vk != NULL)
#endif
+#ifndef COLI_VULKAN /* exclusive RAM/VRAM (vk_tier.h) is the Vulkan build's: no device holds an expert */
+static inline int vkt_ram_first(int layer, int eid) { (void)layer; (void)eid; return 0; }
+static inline void vkt_ram_gave(void) {}
+#endif
#include "compat.h"
#include "serve_poll.h" /* CANCEL a meta' turno (#1332) */
#include "route_trace.h"