Repository navigation
FIX ZUNA: pos_bins defaults to 100 (ZUNA1.1); re-hosted ZUNA1.1 checkpoint - #1557
Merged
bruAristimunha merged 2 commits intoNov 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An offline regression test is needed to confirm the default rotary buffers match explicit pos_bins=100 and differ from pos_bins=50 on a real montage, since existing tests would not catch a reversion.
1 open issue
What changed in this PR
Aligns ZUNA’s default spatial encoding with ZUNA1.1 and documents the separately updated Hub checkpoint.
Changes:
- Changes
pos_binsfrom 50 to 100 and explains the version-specific default. - Adds a release note covering the spatial-bin correction and corrected Hub checkpoint.
| File | Description |
|---|---|
docs/whats_new.rst |
Documents the default correction and re-hosted ZUNA1.1 checkpoint. |
braindecode/models/zuna.py |
Updates the pos_bins default and its parameter documentation. |
Review effort: Balanced
| max_seqlen: int = 256, | ||
| rope_theta: float = 10000.0, | ||
| pos_bins: int = 50, | ||
| pos_bins: int = 100, |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1557 +/- ##
=======================================
Coverage 91.48% 91.48%
=======================================
Files 170 170
Lines 22277 22277
=======================================
Hits 20379 20379
Misses 1898 1898 🚀 New features to boost your workflow:
|
bruAristimunha
added a commit
to bruAristimunha/braindecode
that referenced
this pull request
Nov 9, 2026
Brings in dba9d42 (braindecode#1559, braindecode#1557). No conflicts; NOTICE.txt and docs/whats_new.rst differ from master only by the MEGGPT lines.
bruAristimunha
added a commit
to bruAristimunha/braindecode
that referenced
this pull request
Nov 9, 2026
Brings in the ch_mask series (braindecode#1545, braindecode#1548, braindecode#1540, braindecode#1542-braindecode#1544, braindecode#1549, braindecode#1550) and braindecode#1557/braindecode#1559. No conflicts.
bruAristimunha
added a commit
to bruAristimunha/braindecode
that referenced
this pull request
Nov 9, 2026
Brings in the ch_mask series (braindecode#1545 braindecode#1548 braindecode#1540 braindecode#1549 braindecode#1542 braindecode#1543 braindecode#1544 braindecode#1550), braindecode#1557 and braindecode#1559 (master dba9d42). No conflicts; NOTICE.txt and docs/whats_new.rst carry only this PR's additions over master.
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
braindecode.models.ZUNAports the ZUNA1.1 encoder, but two things did not match ZUNA1.1:braindecode/ZUNA(revision10cd7745) held the raw ZUNA1 file ofZyphra/ZUNA, with Zyphra's key names (model.encoder.*, 463 tensors). None of them matches a parameter of the class (encoder.*, 215), andfrom_pretrainedloads non-strictly, soZUNA.from_pretrained("braindecode/ZUNA")kept a randomly initialised encoder without any error.pos_bins. ZUNA1.1 buckets electrode coordinates into 100 bins per axis (arXiv:2607.27308, Table II; Zyphra's ZUNA1.1 training and inference configs); 50 was ZUNA1's value. With 50 the encoder output is up to 5.2 away from the original.Changes
pos_binsdefaults to 100 (docstring says why);docs/whats_new.rstentry.braindecode/ZUNAnow holds the ZUNA1.1 encoder (Zyphra/ZUNA1.1@10b9d6c8, sha256295fcddb…) in braindecode's parameter names, revisiondaf5cccf. Itsconfig.jsonsetspos_bins: 100, so the checkpoint is right even with the old default; the conversion script is at the repo root and the card has a Revisions note.Checks
final_layer.1.{weight,bias}missing, nothing unexpected; all 213 tensors bit-equal to the upstream file.['TUEG'].test_models.py test_return_features.py test_integration.py test_huggingface.py -k "ZUNA and not compiled": 19 passed, 2 skipped. pre-commit clean.