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

test_qwen38_native_weights: pin the FP8 dispatch to the table kernel

JustVuggb8e23ac5a115
diff --git a/c/tests/test_qwen38_native_weights.c b/c/tests/test_qwen38_native_weights.c
index 2164dc63..52eb5169 100644
--- a/c/tests/test_qwen38_native_weights.c
+++ b/c/tests/test_qwen38_native_weights.c
@@ -7,6 +7,7 @@
#define COLI_SEGMENT_ADAPTER
#include <pthread.h>
#include "../qwen38.c"
+#include "../compat.h" /* setenv: MinGW has none */
#define CHECK(x) do { if(!(x)){ \
fprintf(stderr,"%s:%d: check failed: %s\n",__FILE__,__LINE__,#x);return 1; \
@@ -573,6 +574,9 @@ static int check_segment_failure_outputs(void){
}
int main(void){
+ /* this file pins storage and dispatch against the table kernel byte for
+ * byte; the vector FP8 kernel has its own tolerance test (test_qwen38_idot) */
+ setenv("Q38_FP8_KERNEL","scalar",1);
enum { S=2, I=257, O=129 };
Q38Weight fp8={0};q38_weight_reserve(&fp8,Q38_WEIGHT_FP8,O,I);
CHECK(fp8.scale_count==6);CHECK(q38_weight_bytes(&fp8)==(uint64_t)O*I+6*sizeof(float));