by vintagedave · 12mo ago · 0 comments
It won't; FMA is available from AVX2-era onwards. If you target 32-bit, you'd only be "safe" with SSE2... if you really want a challenge, you'd use the Pentium Pro CPU feature set, ie the FPU.
I have to admit I'd be really curious what that looked like! You'd definitely want to use the fast math option.
This is an awesome effort, btw, and I enjoyed reading your blog immensely.
The Pentium Pro challenge though... pure x87 FPU inference? That would be gloriously cursed. You'd basically be doing matrix math like it's 1995. `-mfpmath=387` and pray.
I'm genuinely tempted to try this now. The build flags would be something like:
-DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF \
-DGGML_F16C=OFF -DGGML_SSE42=OFF -DGGML_SSSE3=OFF \
-DGGML_SSE3=OFF -DGGML_SSE2=OFF # pain begins here
And then adding `-ffast-math` to `CMAKE_C_FLAGS` because at that point, who cares about IEEE 754 compliance, we're running a transformer on hardware that predates Google.If someone actually has a Pentium Pro lying around and wants to see Qwen-0.5B running on it... that would be the ultimate read for me as well.
Thanks for the kind words. Always fun to find fellow retro computing degenerates in the wild.