llama.cpp
0d8eb4a8 - tests: bound the test_rope tolerance by the f32 angle resolution

Commit
22 days ago
tests: bound the test_rope tolerance by the f32 angle resolution The rotation angle of a position p is rounded in f32 to about p*FLT_EPSILON radians, and the CPU reference and the GPU kernels reach it through different rounding sequences (cumulative product versus pow). With positions up to 8192 this puts the NMSE floor between backends near 8e-8, so the default 1e-7 threshold fails at random on Metal. Derive the tolerance from n_ctx instead: it stays at 1e-7 for n_ctx=512 and becomes 9.5e-7 for the YaRN cases at n_ctx=8192.
Committer
Parents
Loading