Downloads · 30 days
43
23% of all-time downloads
epfl-neuroai/topo-omni
topo-omni is a image-text-to-text model from epfl-neuroai. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
[](https://arxiv.org/abs/2606.09770) [](https://topo-omni.epfl.ch) [](https://github.com/epflneuroailab/topo-omni)
Downloads · 30 days
43
23% of all-time downloads
All-time downloads
186
Public
Parameters
5B
9.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors9.9 GB · 100%
From the Hugging Face model README

Topo-Omni is Qwen2.5-Omni-3B fine-tuned with a spatial smoothness loss that induces a brain-like topographic organization across its vision, audio, and language layers. Every unit in the network is assigned a fixed 2-D coordinate on a shared cortical sheet, and training encourages units that are close on the sheet to respond similarly — mirroring how functionally similar neurons cluster together in the cortex. The result is emergent, spatially clustered functional regions (face-, scene-, object-, and speech-selective areas) that can be localized, ablated, stimulated, and compared against human fMRI data.
Code, evaluation scripts, and further documentation: github.com/epflneuroailab/topo-omni
Base model: Qwen/Qwen2.5-Omni-3B (Thinker module — vision encoder, audio encoder, and language model)
Architecture: Qwen2_5OmniThinkerForConditionalGeneration with a CorticalAdaptor projection inserted at each layer that maps hidden activations onto a shared cortical sheet and back (via a learned, near-identity linear map and its pseudo-inverse), so the underlying computation is preserved while exposing a spatially organized representation
Cortical sheet: a single 304 × 512 2-D grid spanning the entire model
| Rows | Component |
|---|---|
| 0 – 159, cols 0–255 | Vision encoder layers |
| 0 – 159, cols 256–511 | Audio encoder layers |
| 160 – 303 | Thinker (language model) layers |
Spatial loss: computes pairwise response similarity within local neighborhoods (Chebyshev distance) on the sheet and penalizes dissimilarity between nearby units; weighted by alpha = 20 relative to the task loss
Modalities: text, image, video, and audio in; text out
Standard transformer networks have no notion of spatial layout: any unit can interact with any other regardless of "position." Topo-Omni injects a topographic inductive bias, inspired by TDANN and TopoLM, by:
The learned sheet can then be probed with the same tools used in visual/auditory neuroscience: localizer-based selectivity mapping, ablation/stimulation, cluster overlap (IoU), and alignment to human fMRI recordings (NSD, SpaceTop).
Note: This checkpoint requires the custom
Qwen2_5OmniThinkerForConditionalGenerationimplementation (with theCorticalAdaptormodules) from the topo-omni repository — loading it with the stocktransformersclass will not reconstruct the cortical sheet projections correctly.
git clone https://github.com/epflneuroailab/topo-omni.git
cd topo-omni
pip install -r requirements.txt
from transformers import Qwen2_5OmniThinkerConfig, Qwen2_5OmniProcessor
from src.models.qwen2_5_omni import Qwen2_5OmniThinkerForConditionalGeneration
repo_id = "epfl-neuroai/topo-omni"
config = Qwen2_5OmniThinkerConfig.from_pretrained(repo_id)
config.audio_config.is_training = False
config.vision_config.is_training = False
config.text_config.is_training = False
model = Qwen2_5OmniThinkerForConditionalGeneration.from_pretrained(
repo_id, dtype="auto", device_map="auto", config=config,
).eval()
processor = Qwen2_5OmniProcessor.from_pretrained(repo_id)
conversation = [
{"role": "user", "content": [
{"type": "image", "image": "path/or/url/to/image.jpg"},
]},
]
text = processor.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
inputs = processor(text=text, images=[...], return_tensors="pt").to(model.device)
output_ids = model.generate(**inputs, max_new_tokens=128)
print(processor.batch_decode(output_ids, skip_special_tokens=True)[0])
To inspect or intervene on the cortical sheet representations directly (selectivity mapping, ablation, stimulation), see the evaluation scripts under src/eval/ in the repository.
Fine-tuned from Qwen/Qwen2.5-Omni-3B with TRL's SFTTrainer plus an additional spatial smoothness loss term.
| Hyperparameter | Value |
|---|---|
| Epochs | 5 |
| Per-device batch size | 4 |
| Gradient accumulation | 4 |
| Learning rate | 5e-5 (cosine schedule, 3% warmup) |
| Weight decay | 0.01 |
Spatial loss weight (alpha) | 20 |
| Spatial loss accumulation | mean |
| Cortical projection init | near-identity (scale 1e-3) |
The cortical sheet learned by this model is evaluated for:
See src/eval/ and the project README for scripts and metric definitions.
If you use this model, please cite the Topo-Omni repository and the works it builds on:
TODO
This model is built on Qwen2.5-Omni and the topographic-DNN approaches introduced by TDANN and TopoLM.
Released under the same license as the base model, Qwen2.5-Omni-3B (Apache 2.0). Please review the base model's license terms before use.