Menu

📰
0

Technical question about Mamba Selective Scan kernel and FP16/FP32 precision

Reddit r/learnmachinelearning·u/Dry-Trouble4373·about 1 month ago
#kGw7XvYx
#kernel#fp16#mamba#fp32#precision#article
Reading 0:00
15s threshold

I'm trying to evaluate the model's accuracy when all internal operations are strictly limited to FP16. However, I noticed that the selective_scan CUDA kernel seems to use FP32 accumulators by default.

When I simulated the FP16 truncation in Python, I saw a 0.04% accuracy drop. Now I want to replicate this at the CUDA kernel level, but I'm having trouble modifying the C++ source without breaking dependencies.

Does anyone know if there is a Triton-based implementation of Mamba? Or is there a standard way to control the internal precision of these fused kernels for research purposes?

Any advice would be appreciated. Thanks!

Read More