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(dsv4): state expert index ownership invariant

JustVuggd014e303c823
diff --git a/c/deepseek_v4.c b/c/deepseek_v4.c
index 5b5017e9..6a5a93f1 100644
--- a/c/deepseek_v4.c
+++ b/c/deepseek_v4.c
@@ -6980,7 +6980,8 @@ typedef struct {
uint64_t record_bytes;
V4ExpertRecord *records;
V4ExpertSlot *slots;
- int *slot_by_expert; /* global slot index for resident or in-flight expert */
+ int *slot_by_expert; /* resident/in-flight slot; every StoreOps variant that
+ * mutates slot identity must maintain this index */
uint64_t clock;
unsigned active_leases;
ColiExpertStoreStats stats;