X-PLUG / mPLUG-Owl

mPLUG-Owl: The Powerful Multi-modal Large Language Model Family
https://www.modelscope.cn/studios/damo/mPLUG-Owl
MIT License
2.25k stars 171 forks source link

Bug when trying your example #27

Closed SYSU-lulc closed 1 year ago

SYSU-lulc commented 1 year ago

After preparing all environments follwing the instructions, trying: from interface import get_model model, tokenizer, img_processor = get_model( checkpoint_path='checkpoint path', tokenizer_path='tokenizer path') facing: Traceback (most recent call last): File "/mPLUG-Owl/try.py", line 3, in <module> model, tokenizer, img_processor = get_model( File "/mPLUG-Owl/interface.py", line 15, in get_model model = mPLUG_OwlForConditionalGeneration(config=config) File "/mPLUG-Owl/mplug_owl/modeling_mplug_owl.py", line 973, in __init__ self.vision_model = CLIPVisionTransformer(config.vision_config) File "/mPLUG-Owl/clip/modeling_clip.py", line 972, in __init__ self.pre_layernorm = MixedFusedLayerNorm(embed_dim, eps=config.layer_norm_eps) File "/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/apex/normalization/fused_layer_norm.py", line 212, in __init__ super().__init__(normalized_shape=normalized_shape, eps=eps, elementwise_affine=True) File "/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/apex/normalization/fused_layer_norm.py", line 166, in __init__ fused_layer_norm_cuda = importlib.import_module("fused_layer_norm_cuda") File "/anaconda3/envs/mplug_owl/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1050, in _gcd_import File "<frozen importlib._bootstrap>", line 1027, in _find_and_load File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 674, in _load_unlocked File "<frozen importlib._bootstrap>", line 571, in module_from_spec File "<frozen importlib._bootstrap_external>", line 1176, in create_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed ImportError: /anaconda3/envs/mplug_owl/lib/python3.10/site-packages/fused_layer_norm_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl How to fix it? Thanks for your help.

SYSU-lulc commented 1 year ago

` Traceback (most recent call last):

File "/mPLUG-Owl/try.py", line 3, in model, tokenizer, img_processor = get_model( File "/mPLUG-Owl/interface.py", line 15, in get_model model = mPLUG_OwlForConditionalGeneration(config=config) File "/mPLUG-Owl/mplug_owl/modeling_mplug_owl.py", line 973, in init self.vision_model = CLIPVisionTransformer(config.vision_config) File "/mPLUG-Owl/clip/modeling_clip.py", line 972, in init self.pre_layernorm = MixedFusedLayerNorm(embed_dim, eps=config.layer_norm_eps) File "/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/apex/normalization/fused_layer_norm.py", line 212, in init super().init(normalized_shape=normalized_shape, eps=eps, elementwise_affine=True) File "/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/apex/normalization/fused_layer_norm.py", line 166, in init fused_layer_norm_cuda = importlib.import_module("fused_layer_norm_cuda") File "/anaconda3/envs/mplug_owl/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 674, in _load_unlocked File "", line 571, in module_from_spec File "", line 1176, in create_module File "", line 241, in _call_with_frames_removed

ImportError: /anaconda3/envs/mplug_owl/lib/python3.10/site-packages/fused_layer_norm_cuda.cpython-310-x86_64-linux-gnu.so: undefined symbol: _ZNK3c107SymBool10guard_boolEPKcl `

SYSU-lulc commented 1 year ago

Perhaps it is because of the mismatched CUDA version. Sorry for it.

MAGAer13 commented 1 year ago

Hi, just quick notice about our latest version of mPLUG-Owl which remove the dependency of apex! And it is more easy to use.