File size: 1,981 Bytes
123822d 1f1ec1c 4628f37 de6781f 1f1ec1c de6781f 1f1ec1c 547f6dd f56fb33 1f1ec1c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | ---
license: cc-by-4.0
library_name: pytorch
pipeline_tag: image-classification
datasets:
- ILSVRC/imagenet-1k
- uoft-cs/cifar10
- uoft-cs/cifar100
metrics:
- accuracy
arxiv: 2601.12137
tags:
- image-classification
- vision-transformer
- mixture-of-experts
- pytorch
- model_hub_mixin
---
# EMoE: Eigenbasis-Guided Routing for Mixture-of-Experts
This repository hosts pretrained checkpoints for **EMoE** and a Hub-compatible loading path.
Paper: https://arxiv.org/abs/2601.12137 or https://huggingface.co/papers/2601.12137
Code: https://github.com/Belis0811/EMoE
## Available checkpoints
- `model.safetensors`: EMoE ViT-Base in standard Hub format (`vit_base_patch16_224`, ImageNet-1k)
- `eigen_moe_vit_base_patch16_224_imagenet1k.pth`
- `eigen_moe_vit_large_patch16_224.augreg_in21k_ft_in1k_imagenet1k.pth`
- `eigen_moe_vit_huge_patch14_224_in21k_imagenet1k.pth`
## Usage
Install dependencies:
```bash
pip install -U torch timm huggingface_hub safetensors
```
Load the Hub-formatted checkpoint:
```python
import torch
from eigen_moe import HFEigenMoE
model = HFEigenMoE.from_pretrained(
"anzheCheng/EMoE",
vit_model_name="vit_base_patch16_224",
num_classes=1000,
strict=False,
)
model.eval()
x = torch.randn(1, 3, 224, 224)
with torch.no_grad():
logits = model(x)
print(logits.shape)
```
Load one of the original `.pth` files explicitly:
```python
model = HFEigenMoE.from_pretrained(
"anzheCheng/EMoE",
vit_model_name="vit_large_patch16_224.augreg_in21k_ft_in1k",
num_classes=1000,
checkpoint_filename="eigen_moe_vit_large_patch16_224.augreg_in21k_ft_in1k_imagenet1k.pth",
strict=False,
)
```
## Citation
```bibtex
@article{cheng2026emoe,
title={EMoE: Eigenbasis-Guided Routing for Mixture-of-Experts},
author={Cheng, Anzhe and Duan, Shukai and Li, Shixuan and Yin, Chenzhong and Cheng, Mingxi and Nazarian, Shahin and Thompson, Paul and Bogdan, Paul},
journal={arXiv preprint arXiv:2601.12137},
year={2026}
}
```
|