Cant load models

#1
by ZJdog - opened

File ~/.cache/huggingface/modules/transformers_modules/kuleshov-group/caduceus-ph_seqlen-131k_d_model-256_n_layer-16/5bc94d4044bedb43482e0fb8f26b89d38c5d7c82/modeling_caduceus.py:10
7 from typing import Optional, Tuple, Union
9 import torch
---> 10 from mamba_ssm.modules.mamba_simple import Mamba, Block
11 from torch import nn
12 from torch.nn import functional as F

ImportError: cannot import name 'Block' from 'mamba_ssm.modules.mamba_simple'

Kuleshov Group org

Do you have mamba-ssm installed in the environment where you are running this?

This error caused by different version of mamba_ssm,.
Fixed it by updating the import code:

from mamba_ssm.modules.mamba_simple import Mamba
from mamba_ssm.modules.block import Block
Kuleshov Group org

Good catch. Glad the issue is resolved.

yairschiff changed discussion status to closed

Sign up or log in to comment