Skip to content

Vision Transformer with Mixture of Experts (ViT-MoE) #40145

@LawJarp-A

Description

@LawJarp-A

Model description

Vision Transformer with Mixture of Experts (ViT-MoE) is an efficient scaling approach for vision transformers that replaces dense feedforward layers with sparse mixture of experts.

This architecture enables scaling model capacity while keeping per-token computation roughly constant, achieving better accuracy-efficiency trade offs compared to dense ViTs.

Key Benefits:

  • 90.35% ImageNet accuracy with ~50% compute reduction vs dense models
  • Expert specialization emerges naturally (deeper layers specialize in object classes)
  • Scalable to large model sizes without proportional compute increase

The implementation would follow existing MoE patterns in transformers (Mixtral, Switch Transformers) but adapted for vision tasks, trying to filling the current gap of vision MoE models in the library.

Implementation Plan:

  1. Base Implementation: Use Google V-MoE as foundation
  2. Enhanced with ViMoE Research: Apply latest empirical insights (if required)

Evaluation: Start with ImageNet-1K classification, then expand to other vision tasks

Open source status

  • The model implementation is available
  • The model weights are available

Provide useful links for the implementation

Primary Implementation Reference:

Additional Research Foundation:

Existing MoE Patterns in Transformers:

  • Mixtral: src/transformers/models/mixtral/modeling_mixtral.py
  • Switch Transformers: src/transformers/models/switch_transformers/modeling_switch_transformers.py
  • Qwen2-MoE: src/transformers/models/qwen2_moe/modeling_qwen2_moe.py

Pre-trained Weights:

  • Google V-MoE checkpoints available in their repository for various model sizes
  • ImageNet-21k and ILSVRC2012 trained models

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions