Skip to content

Inference error #8

@fxnie

Description

@fxnie

Traceback (most recent call last):
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/utils/import_utils.py", line 1569, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/opt/tmp/xxx/anaconda3/envs/opencompass/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/models/zamba2/modeling_zamba2.py", line 65, in
from mamba_ssm.ops.selective_scan_interface import mamba_inner_fn, selective_scan_fn
File "/opt/tmp/xxx/anaconda3/envs/opencompass/lib/python3.10/site-packages/mamba_ssm/ops/selective_scan_interface.py", line 16, in
import selective_scan_cuda
ImportError: /opt/tmp/xxx/anaconda3/envs/opencompass/lib/python3.10/site-packages/selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c1021throwNullDataPtrErrorEv

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/run_trans.py", line 5, in
model = AutoModelForCausalLM.from_pretrained("Zyphra/Zamba2-2.7B", device_map="cuda", torch_dtype=torch.bfloat16)
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/models/auto/auto_factory.py", line 563, in from_pretrained
model_class = _get_model_class(config, cls._model_mapping)
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/models/auto/auto_factory.py", line 384, in _get_model_class
supported_models = model_mapping[type(config)]
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/models/auto/auto_factory.py", line 735, in getitem
return self._load_attr_from_module(model_type, model_name)
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/models/auto/auto_factory.py", line 749, in _load_attr_from_module
return getattribute_from_module(self._modules[module_name], attr)
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/models/auto/auto_factory.py", line 693, in getattribute_from_module
if hasattr(module, attr):
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/utils/import_utils.py", line 1559, in getattr
module = self._get_module(self._class_to_module[name])
File "/opt/tmp/xxx/yyy/transformers_zamba2-main/src/transformers/utils/import_utils.py", line 1571, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.zamba2.modeling_zamba2 because of the following error (look up to see its traceback):
/opt/tmp/xxx/anaconda3/envs/opencompass/lib/python3.10/site-packages/selective_scan_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZN3c1021throwNullDataPtrErrorEv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions