Run frontier MoE models on hardware you already own — pure C, zero deps, experts streamed from disk. Tiny engine, immense model. 🐦
C
fix(metal): bit-exact fp8-e4m3 decode via ieee754 exponent bitcast
SyedYousufFaizanabe3ca8fa25d
diff --git a/c/backend_metal.mm b/c/backend_metal.mmindex e04847a0..f4cb807e 100644--- a/c/backend_metal.mm+++ b/c/backend_metal.mm@@ -137,7 +137,7 @@ kernel void mm_gemv(device const uchar* w [[buffer(0)]], // raw weight bywv = as_type<float>(0x7fc00000u); // qNaN -- matches quant.h's e4m3_decode} else {float mag = (exp == 0) ? (float(mant) * 0.001953125f) // subnormal: mant*2^-9- : (1.0f + float(mant)*0.125f) * exp2(float(int(exp) - 7));+ : (1.0f + float(mant)*0.125f) * as_type<float>((uint(exp) + 120u) << 23);wv = sign ? -mag : mag;}acc += wv * xr[i] * scl[i/128];