transformers
39cd596f - [Gemma3n] Fix FA2 vs eager equivalence tests

Commit
26 days ago
[Gemma3n] Fix FA2 vs eager equivalence tests Gemma3n's last hidden states are large enough that bf16 rounding alone exceeds the common 3e-2 tolerance (eager vs sdpa drift the same way, fp32 matches to ~1e-6), and its `hidden_states` have a leading altup dim that the common padded check slices as the batch, comparing the padded token. Compare `last_hidden_state` on non-padded tokens with bf16-appropriate tolerances instead. Fixes #50015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Parents
Loading