Skip to content

RuntimeError: GET was unable to find an engine to execute this computation #9

@a1ei

Description

@a1ei

遇到了题目上的问题,是我cuda版本的问题吗。下面是完整的报错信息
Did not detect the .env file at /home/liuzhilei/python_project/my_frame/MQuant/third/VLMEvalKit/.env, failed to load. InternLM2ForCausalLM has generative capabilities, as prepare_inputs_for_generationis explicitly overwritten. However, it doesn't directly inherit fromGenerationMixin. From 👉v4.50👈 onwards, PreTrainedModelwill NOT inherit fromGenerationMixin, and this model will lose the ability to call generate` and other related functions.

  • If you're using trust_remote_code=True, you can get rid of this warning by loading the model with an auto class. See https://huggingface.co/docs/transformers/en/model_doc/auto#auto-classes
  • If you are the owner of the model architecture code, please modify your model class such that it inherits from GenerationMixin (after PreTrainedModel, otherwise you'll get an exception).
  • If you are not the owner of the model architecture class, please contact the model code owner to update it.
    Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████| 4/4 [00:00<00:00, 6.60it/s]
    fuse internvl vision model...
    fuse internvl layer norms
    0%| | 0/5000 [00:01<?, ?it/s]
    Traceback (most recent call last):
    File "/home/liuzhilei/python_project/my_frame/MQuant/quant_internvl.py", line 530, in
    main(args)
    File "/home/liuzhilei/python_project/my_frame/MQuant/quant_internvl.py", line 196, in main
    eval_dataset(
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/python_project/my_frame/MQuant/evaluation/eval.py", line 29, in eval_dataset
    response = model.generate(message=struct, dataset=dataset_name)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/python_project/my_frame/MQuant/vlmeval/vlm/base.py", line 121, in generate
    return self.generate_inner(message, dataset)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/python_project/my_frame/MQuant/vlmeval/vlm/internvl_chat.py", line 451, in generate_inner
    return self.generate_v2(message, dataset)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/python_project/my_frame/MQuant/vlmeval/vlm/internvl_chat.py", line 433, in generate_v2
    response = self.model.chat(
    ^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/.cache/huggingface/modules/transformers_modules/InternVL2_5-8B/modeling_internvl_chat.py", line 292, in chat
    generation_output = self.generate(
    ^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/.cache/huggingface/modules/transformers_modules/InternVL2_5-8B/modeling_internvl_chat.py", line 327, in generate
    vit_embeds = self.extract_feature(pixel_values)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/.cache/huggingface/modules/transformers_modules/InternVL2_5-8B/modeling_internvl_chat.py", line 187, in extract_feature
    vit_embeds = self.vision_model(
    ^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/.cache/huggingface/modules/transformers_modules/InternVL2_5-8B/modeling_intern_vit.py", line 412, in forward
    hidden_states = self.embeddings(pixel_values)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/.cache/huggingface/modules/transformers_modules/InternVL2_5-8B/modeling_intern_vit.py", line 164, in forward
    patch_embeds = self.patch_embedding(pixel_values) # shape = [
    , channel, width, height]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 460, in forward
    return self._conv_forward(input, self.weight, self.bias)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/liuzhilei/anaconda3/envs/my_frame/lib/python3.11/site-packages/torch/nn/modules/conv.py", line 456, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    RuntimeError: GET was unable to find an engine to execute this computation
    `

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions