Apply for community grant: Personal project (gpu)

#1
by whyu - opened
Owner

This demo runs a model MambaOut proposed by our interesting paper "MambaOut: Do We Really Need Mamba for Vision?" Based on our concept discussion, we hypothesize Mamba is unnecessary for ImageNet while exploring for detection and segmentation remains worthwhile. To verify these, we build MambaOut with Mamba blocks but remove their core token mixer, SSM. MambaOut outperforms all visual Mamba on ImageNet but cannot match SOTA Mamba for detection and segmentation.

Paper: https://arxiv.org/abs/2405.07992
Code: https://github.com/yuweihao/MambaOut
Demo: https://huggingface.co/spaces/whyu/MambaOut

mambaout_first_page.jpeg

Hi @whyu , we've assigned ZeroGPU to this Space. Please check the compatibility and usage sections of this page so your Space can run on ZeroGPU.

Owner

Hi @hysts , thank you so much. I will adopt the code right now.

@whyu
I'm seeing an error related to JIT in your Space. You can avoid the error by replacing torch.jit.script with a function that does nothing before importing timm.

import torch

torch.jit.script = lambda f: f
Owner

Thank you for your great help. I am struggling to debug it.

Owner

Hi @hysts , the hf spaces gradio demo works now, although it seems to need several seconds to load the demo.

Owner

Hi @hysts and @akhaliq , I find loading the demo is fast now. The MambaOut demo is totally working on zero-gpu. Thank you so much.

You mean this overhead?

As you can see in the org card of the ZeroGPU explorers org, multiple ZeroGPU Spaces share the hardwares, so it's expected. But the model is not offloaded to CPU and stays on GPU for a while after finishing inference so that the overhead can be minimized when many people are visiting the Space.

Owner

Got it. Thank you for the explanation. @hysts

Sign up or log in to comment