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, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download README.md from brain-bzh/reve-large: direct link, hf CLI and curl.
- Browser
- Download file 5.61 kB
-
https://huggingface.co/brain-bzh/reve-large/resolve/main/README.md
- Command line
-
hf download hf://brain-bzh/reve-large/README.md
-
curl -L -o README.md https://huggingface.co/brain-bzh/reve-large/resolve/main/README.md
library_name: transformers
tags:
- eeg
- neuroscience
- foundation-model
- pytorch
license: other
license_name: reve-responsible-use-license-v1.0
license_link: LICENSE
model-index:
- name: Reve-large Evaluation Results
results:
- task:
type: feature-extraction
dataset:
name: Mumtaz-LP
type: Mumtaz-LP
metrics:
- type: Accuracy
value: 0.985
name: Accuracy
- task:
type: feature-extraction
dataset:
name: MAT-LP
type: MAT-LP
metrics:
- type: Accuracy
value: 0.712
name: Accuracy
- task:
type: feature-extraction
dataset:
name: TUAB-LP
type: TUAB-LP
metrics:
- type: Accuracy
value: 0.821
name: Accuracy
- task:
type: feature-extraction
dataset:
name: PhysionetMIT-LP
type: PhysionetMIT-LP
metrics:
- type: Accuracy
value: 0.617
name: Accuracy
- task:
type: feature-extraction
dataset:
name: BCIC-IV-2a-LP
type: BCIC-IV-2a-LP
metrics:
- type: Accuracy
value: 0.603
name: Accuracy
- task:
type: feature-extraction
dataset:
name: ISRUC-LP
type: ISRUC-LP
metrics:
- type: Accuracy
value: 0.758
name: Accuracy
- task:
type: feature-extraction
dataset:
name: HMC-LP
type: HMC-LP
metrics:
- type: Accuracy
value: 0.71
name: Accuracy
- task:
type: feature-extraction
dataset:
name: BCIC2020-3A-LP
type: BCIC2020-3A-LP
metrics:
- type: Accuracy
value: 0.39
name: Accuracy
- task:
type: feature-extraction
dataset:
name: TUEV-LP
type: TUEV-LP
metrics:
- type: Accuracy
value: 0.63
name: Accuracy
- task:
type: feature-extraction
dataset:
name: FACED-LP
type: FACED-LP
metrics:
- type: Accuracy
value: 0.469
name: Accuracy
Model Card for REVE-large
REVE (project page here) is a transformer-based foundation model for EEG signal processing. It was trained on 60k hours of EEG data from various sources and is designed to be adaptable to any electrode configuration and a wide range of EEG-based tasks.
Model Details
Architecture
REVE (Representation for EEG with Versatile Embeddings), a pretrained encoder explicitly designed to generalize across diverse EEG signals. REVE introduces a novel 4D positional encoding scheme that enables it to process signals of arbitrary length and electrode arrangement. Using a masked autoencoding objective, we pretrain REVE on over 60,000 hours of EEG data from 92 datasets spanning 25,000 subjects.
Developed by the BRAIN team and UdeM
Funded by: This research was supported by the French National Research Agency (ANR) through its AI@IMT program and grant ANR-24-CE23-7365, as well as by a grant from the Brittany region. Further support was provided by a Discovery Grant from the Natural Sciences and Engineering Research Council of Canada (NSERC), by funding from the Canada Research Chairs program and the Fonds de recherche du Québec – Nature et technologies (FRQ-NT). This work was granted access to the HPC resources of IDRIS under the allocation 2024-AD011015237R1 made by GENCI, as well as HPC provided by Digital Alliance Canada.
Model Sources
Uses
Example script to extract embeddings with REVE, using our position bank:
from transformers import AutoModel
pos_bank = AutoModel.from_pretrained("brain-bzh/reve-positions", trust_remote_code=True)
model = AutoModel.from_pretrained("brain-bzh/reve-large", trust_remote_code=True)
eeg_data = ... # EEG data as a torch Tensor (batch_size, channels, time_points), must be sampled at 200 Hz
electrode_names = [...] # List of electrode names corresponding to the channels in eeg_data
positions = pos_bank(electrode_names) # Get positions (channels, 3)
# Expand the positions vector to match the batch size
positions = positions.expand(eeg_data.size(0), -1, -1) # (batch_size, channels, 3)
output = model(eeg_data, positions)
License and Responsible Use
REVE is available for research, commercial, educational, and personal use under the REVE Responsible Use License v1.0.
By downloading, using, modifying, redistributing, or deploying REVE or a derivative model, you agree to comply with the terms of the LICENSE.
In particular, the License prohibits privacy intrusion and re-identification, non-consensual surveillance or profiling, discriminatory or harmful uses, and other uses that violate applicable law. Redistribution and publication of fine-tuned or otherwise modified REVE models are permitted, provided that the License, attribution, and provenance requirements are preserved.