8eba1750fae5de3020dd8eb5be22ec1267b9225c
Root cause from real machine test: gdn_forward.cu output abs mean = inf - gate_raw can be positive → exp(gate) > 1 → state grows exponentially - Over 64 tokens: exp(2.0)^64 = inf - PyTorch ref clamps g ∈ [-5, 2] but CUDA kernel did not Fix: gdn_forward.cu: clamp gate_raw ∈ [-5, 2] before exp (both kernel variants) gdn_forward.cu: clamp state ∈ [-65504, 65504] after update (fp16 safe range) qwen3_5.py: clamp g_3d before passing to SM70 kernel (belt + suspenders) qwen3_5.py: clamp temporal_state after decode update
project_6
Description
Languages
C++
41.8%
Cuda
31.6%
Python
22.2%
C
2.1%
CMake
1.1%
Other
1.1%