ImportError: cannot import name '_expand_mask' from 'transformers.models.bloom.modeling_bloom'

If I follow the same example provided on the model card: openflamingo/OpenFlamingo-9B-vitl-mpt7b · Hugging Face

I am getting the following error:

ImportError: cannot import name '_expand_mask' from 'transformers.models.bloom.modeling_bloom' (/usr/local/lib/python3.10/dist-packages/transformers/models/bloom/modeling_bloom.py)

For reproducibility: Google Colab

1 Like

have you solved this problem? i have the same question too.