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

olmoe: the dense chain on by default on an integrated GPU with the tier

JustVugge07d657a838a
diff --git a/c/backend_vulkan.c b/c/backend_vulkan.c
index 20178258..7f931a6c 100644
--- a/c/backend_vulkan.c
+++ b/c/backend_vulkan.c
@@ -1233,8 +1233,10 @@ int coli_vk_dense(void) { return g_dense_on; }
* 38.7 s, and lost decode, 3.2 against 3.8 tok/s: the device's GEMV at the GPU's
* 800 MHz floor is slower than the CPU's int8 one on a 4.3 GB trunk; prompts only
* still lost 5% of decode, the trunk's device copy taking from the tier's budget).
+ * olmoe ON (OLMoE-1B-7B: the chain decoded 17.3 against 12.8 tok/s and prefilled 512
+ * tokens in 5.5 against 6.4 s; the CPU alone decodes 23.1 tok/s, its trunk being f32).
* An engine that has no measurement there passes COLI_VK_CHAIN_UNMEASURED: off, and
- * the line says it was not measured.
+ * the line says it was not measured (inkling: no checkpoint of it runs on the box).
* Unset, a CPU device (Lavapipe): off.
* Printed as a [VK] line with an engine name (NULL: silent). */
int coli_vk_chain_decide(const char *engine, int tier_on, int igpu) {
diff --git a/c/olmoe.c b/c/olmoe.c
index 4de89ec6..ebd5a6f8 100644
--- a/c/olmoe.c
+++ b/c/olmoe.c
@@ -894,7 +894,7 @@ static void expert_get(Model *m, int layer, int eid, Slot **out) {
s = &lc->slots[lc->n++];
slot_ensure_allocated(m, s);
} else {
- /* LRU eviction — skip pinned, in-flight (eid==-1) and busy slots */
+ /* LRU eviction: skip pinned, in-flight (eid==-1) and busy slots */
int lru = -1;
for (int i = 0; i < lc->n; i++) {
if (lc->slots[i].pinned || lc->slots[i].eid < 0 || lc->slots[i].busy) continue;
@@ -1433,7 +1433,7 @@ static void pilot_realload(Model *m, int layer, int eid) {
s = &lc->slots[lc->n++];
slot_ensure_allocated(m, s);
} else {
- /* LRU eviction — skip pinned, in-flight (eid==-1) and busy slots */
+ /* LRU eviction: skip pinned, in-flight (eid==-1) and busy slots */
int lru = -1;
for (int i = 0; i < lc->n; i++) {
if (lc->slots[i].pinned || lc->slots[i].eid < 0 || lc->slots[i].busy) continue;
diff --git a/c/olmoe_chain.h b/c/olmoe_chain.h
index cb5c27b6..f39b9914 100644
--- a/c/olmoe_chain.h
+++ b/c/olmoe_chain.h
@@ -36,9 +36,12 @@
* COLI_VK_CHAIN_FAULT=n (vk_chain.c) fakes the loss at the n-th frame, for tests. */
#include "vk_chain.h"
-/* COLI_VK_CHAIN unset on an integrated GPU with the expert tier (coli_vk_chain_decide) */
+/* COLI_VK_CHAIN unset on an integrated GPU with the expert tier (coli_vk_chain_decide):
+ * on. Measured on a Radeon 780M with OLMoE-1B-7B (docs/vulkan.md, "OLMoE and Inkling"):
+ * against the tier alone the chain decodes 17.3 tok/s to 12.8 and prefills 512 tokens
+ * in 5.5 s to 6.4 (the CPU alone decodes 23.1 tok/s: its f32 trunk) */
#ifndef OLMOE_CHAIN_IGPU
-#define OLMOE_CHAIN_IGPU COLI_VK_CHAIN_UNMEASURED
+#define OLMOE_CHAIN_IGPU COLI_VK_CHAIN_ON
#endif
typedef struct {