Fix KDA equivalence tests and add accelerate dependency#488
Merged
jlamypoirier merged 1 commit intomainfrom Apr 23, 2026
Merged
Fix KDA equivalence tests and add accelerate dependency#488jlamypoirier merged 1 commit intomainfrom
jlamypoirier merged 1 commit intomainfrom
Conversation
…endency - Add "activation": "sigmoid" to kda_mixer_config normalization in test_mixer_equivalence.py to match FLA's hardcoded sigmoid gate; Apriel2's default is silu but the test must be explicit about which activation it's comparing against. - Align fla_kda.mode with Apriel2's auto-heuristic (fused_recurrent for seq_len<=64 in eval) instead of forcing chunk mode, which both implementations override anyway. - Add accelerate>=1.4.0 to HUGGINGFACE deps; transformers 4.57 now auto-detects a CUDA device context and requires accelerate when device_map is set implicitly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
kda_mixer_configtest fixture was missing"activation": "sigmoid"in its normalization config. Apriel2 defaults tosilubut FLA'sKimiDeltaAttentionhardcodessigmoid, causing ~0.5 max diff and 324 test failures on GPU. Fixed by making the test explicit about the activation it's testing against.mode = "chunk"on both models since both FLA and Apriel2 share the samefused_recurrentauto-heuristic forseq_len <= 64in eval — the override was always silently ignored on Apriel2's side.acceleratedependency: transformers 4.57 introduced auto-detection of the torch CUDA context and setsdevice_mapimplicitly, which then requiresaccelerate. Addedaccelerate>=1.4.0to theHUGGINGFACEextras insetup.cfg.Test plan
🤖 Generated with Claude Code