Instructions to use MannasAI/manas-1-medium-400M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MannasAI/manas-1-medium-400M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="MannasAI/manas-1-medium-400M", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MannasAI/manas-1-medium-400M", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
MANAS-1 medium
MANAS-1 is the first EEG Foundation Model released by MannasAI. This repository contains the medium encoder (~400M parameters), its architecture, configuration, and weights for feature extraction and fine-tuning.
Model details
The encoder has 32 transformer layers, 16 attention heads, and 1024-dimensional embeddings. It processes EEG at 200 Hz in 200-sample (one-second) patches with a 180-sample stride (0.1-second overlap). It accepts varying channel counts and signal lengths of at least 200 samples. Incomplete trailing samples are dropped.
The input is a float32 tensor shaped [batch, channels, samples]. Electrode positions are shaped [batch, channels, 3], in centimeters and in the same channel order as the EEG. The model returns features shaped [batch, patches, channels, 1024].
Use
pip install "torch>=2.2" "transformers>=4.57,<5" "safetensors>=0.4"
import torch
from transformers import AutoModel
model = AutoModel.from_pretrained(
"MannasAI/manas-1-medium-400M", trust_remote_code=True,
).eval()
# Example: 10 seconds of already preprocessed EEG at 200 Hz.
electrode_names = ["Fz", "Cz", "Pz"]
eeg = torch.randn(1, 3, 2000) # [batch, channels, samples]
eeg = (eeg - eeg.mean(-1, keepdim=True)) / (
eeg.std(-1, keepdim=True, correction=1) + 1e-6
)
positions = model.get_channel_positions(electrode_names)
positions = positions.unsqueeze(0).expand(eeg.size(0), -1, -1)
with torch.inference_mode():
features = model(eeg, positions)
embedding = features.mean(dim=(1, 2))
print(features.shape) # [1, 11, 3, 1024]
print(embedding.shape) # [1, 1024]
For real EEG, select EEG channels, filter and resample to 200 Hz, then normalize each channel within each window as shown. The included electrode lookup uses the same position table and returns centimeters. Names must match the EEG channel order; if a name is absent, supply coordinates explicitly in the same frame and units. The model does not filter, resample, normalize, or pool internally.
Benchmarking results
The following results were reported for MANAS-1 using the EEG-FM-Bench codebase (Xiong, 2026) with linear probing. Values are percentages.
| Model | bcic_2a | adftd | workload | motor_mv_img | siena_scalp | tuar | tusl |
|---|---|---|---|---|---|---|---|
| CSBrain | 28.5 +/- 1.81 | 47.2 +/- 2.36 | 53.0 +/- 2.09 | 26.4 +/- 0.78 | 50.0 +/- 0.00 | 27.2 +/- 2.12 | 54.6 +/- 6.86 |
| CBraMod | 36.4 +/- 0.43 | 37.5 +/- 2.40 | 48.5 +/- 0.41 | 52.4 +/- 0.29 | 67.8 +/- 1.63 | 27.4 +/- 0.32 | 44.5 +/- 1.77 |
| BIOT | 24.8 +/- 1.69 | 42.7 +/- 4.11 | 51.9 +/- 2.56 | 27.0 +/- 0.62 | 64.0 +/- 1.66 | 27.1 +/- 0.51 | 55.9 +/- 6.78 |
| REVE | 32.5 +/- 0.24 | 34.2 +/- 5.15 | 65.5 +/- 1.75 | 45.9 +/- 1.07 | 61.4 +/- 3.33 | 25.3 +/- 1.89 | 55.6 +/- 3.95 |
| MANAS-1-medium | 49.4 +/- 1.29 | 53.1 +/- 2.90 | 59.7 +/- 3.61 | 59.8 +/- 0.63 | 87.1 +/- 1.18 | 37.2 +/- 3.27 | 59.3 +/- 2.69 |
- Downloads last month
- 42