Add BrainOmni weights converted from OpenTSLab/BrainOmni@9a4d3c70 (braindecode PR w41/brainomni-rehost @ d6d9804d)
d111525 verified |
Download README.md from braindecode/brainomni-tiny-pretrained: direct link, hf CLI and curl.
- Browser
- Download file 2.45 kB
-
https://huggingface.co/braindecode/brainomni-tiny-pretrained/resolve/main/README.md
- Command line
-
hf download hf://braindecode/brainomni-tiny-pretrained/README.md
-
curl -L -o README.md https://huggingface.co/braindecode/brainomni-tiny-pretrained/resolve/main/README.md
2.45 kB
| license: mit | |
| library_name: braindecode | |
| tags: | |
| - braindecode | |
| - pytorch | |
| - safetensors | |
| - eeg | |
| - meg | |
| - brainomni | |
| # brainomni-tiny-pretrained | |
| Weights of BrainOmni tiny (lm_dim 256, 8 heads, 12 blocks) with its frozen tokenizer, for | |
| [`braindecode.models.BrainOmni`](https://braindecode.org/stable/generated/braindecode.models.BrainOmni.html), | |
| converted from the authors' release. The classification head is not pretrained (seeded random init); fine-tune or linear-probe before use. | |
| ```python | |
| from braindecode.models import BrainOmni | |
| model = BrainOmni.from_pretrained("braindecode/brainomni-tiny-pretrained", chs_info=raw.info["chs"], n_outputs=2) | |
| ``` | |
| `chs_info` must carry sensor positions (EEG) and coil orientations (MEG); the | |
| `chs_info` in `config.json` (19 EEG channels, 10-20) is only a default. Input is | |
| expected at 256 Hz, preprocessed as in the authors' code. | |
| ## Source and conversion | |
| - Source: [OpenTSLab/BrainOmni](https://huggingface.co/OpenTSLab/BrainOmni) at | |
| revision `9a4d3c70495370397ccfbfd6d2496f25647545a5`, file `tiny/BrainOmni.pt` (sha256 `62c67ba6a84ea0625e67a3b5e7463fe3930bfee88a612a225e9062a052542ffc`), MIT licence. | |
| - `convert_brainomni_checkpoints.py` (in this repository) renames the keys to | |
| braindecode's, drops the pretraining-only mask predictor, stores the RoPE | |
| cache as `(cos, sin)` pairs with zero sine (the released cache holds cosines | |
| only and the released code uses it as loaded) and writes `config.json`, | |
| `model.safetensors` and `pytorch_model.bin` with `save_pretrained`. | |
| - The converted model's outputs equal braindecode's loading of the original | |
| file (max-abs difference 0.0, float32 and bfloat16). | |
| - Requires a braindecode version newer than 1.8.1. | |
| ## Citation | |
| ```bibtex | |
| @inproceedings{xiao2025brainomni, | |
| title = {BrainOmni: A Brain Foundation Model for Unified EEG and MEG Signals}, | |
| author = {Xiao, Q. and Cui, Z. and Zhang, C. and Chen, S. and Wu, W. and | |
| Thwaites, A. and Woolgar, A. and Zhou, B. and Zhang, C.}, | |
| booktitle = {Advances in Neural Information Processing Systems (NeurIPS)}, | |
| year = {2025}, | |
| note = {arXiv:2505.18185}, | |
| } | |
| @article{aristimunha2025braindecode, | |
| title = {Braindecode: a deep learning library for raw electrophysiological data}, | |
| author = {Aristimunha, Bruno and others}, | |
| journal = {Zenodo}, | |
| year = {2025}, | |
| doi = {10.5281/zenodo.17699192}, | |
| } | |
| ``` | |
| ## License | |
| MIT, as the original BrainOmni release. | |