Feature Extraction
Transformers
Safetensors
PyTorch
reve
eeg
neuroscience
foundation-model
custom_code
Eval Results (legacy)
Instructions to use brain-bzh/reve-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use brain-bzh/reve-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="brain-bzh/reve-large", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("brain-bzh/reve-large", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Fix bug with empty slice if amount of dimensions matches amount of frequencies, but is not equal to 512
#1
by isemenkov - opened
Currently, in FourierEmb4D if self.dimension != 512, but self.freqs ** 4 == self.dimensions // 2 (no harmonics should be cut off), model will have diff == 0 and a slice loc = loc[:, :, :-diff] will become loc = loc[:, :, :0] where ":0" part will return empty slice instead of all harmonics. Changed:
- Fixed empty slice bug: now slicing is only performed if diff > 0
- Added ValueError if diff < 0 during forward and similar ValueError if self.dimension > harmonics during init. Both cases represent the case where there are not enough harmonics for positional encoding)
- Fixed hardcoding special preprocessing only if self.harmonics != 512 (harmonics cut off) during forward. Now for any self.dimension the same cut off logic is generalized.
- Added ValueError during init if rqeuested self.dimension is not even as dimensionality of output Fourier embeddings is always even 2 * self.freqs ** 4 because of doubling while using both sine and cosine
- Added small comment of how and why is harmonics cut off performed
jonathan-lys changed pull request status to closed