open-compass / open-compass/VLMEvalKit

评测InternVL3-8B报错, AttributeError: 'InternVLModel' object has no attribute 'chat'

Open
#1,174 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
4.4k
Forks
768
Avg merge
1d 10h
Merged PRs (30d)
17

Description

报错命令如下

Traceback (most recent call last):
  File "/nas/user/projects/VLMEvalKit/run.py", line 376, in main
    model = infer_data_job(
            ^^^^^^^^^^^^^^^
  File "/nas/user/projects/VLMEvalKit/vlmeval/inference.py", line 203, in infer_data_job
    model = infer_data(
            ^^^^^^^^^^^
  File "/nas/user/projects/VLMEvalKit/vlmeval/inference.py", line 166, in infer_data
    response = model.generate(message=struct, dataset=dataset_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nas/user/projects/VLMEvalKit/vlmeval/vlm/base.py", line 116, in generate
    return self.generate_inner(message, dataset)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nas/user/projects/VLMEvalKit/vlmeval/vlm/internvl/internvl_chat.py", line 467, in generate_inner
    return self.generate_v2(message, dataset)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/nas/user/projects/VLMEvalKit/vlmeval/vlm/internvl/internvl_chat.py", line 422, in generate_v2
    response = self.model.chat(
               ^^^^^^^^^^^^^^^
  File "/home/user/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1931, in __getattr__
    raise AttributeError(
AttributeError: 'InternVLModel' object has no attribute 'chat'

执行的命令为

python run.py --data ChartQA_TEST --model InternVL3-8B --work-dir results/ --judge gpt-4o --mode all  --reuse

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vlmeval/vlm/internvl/internvl_chat.py, especially generate_inner and generate_v2, then inspect how the InternVL3-8B model is loaded before the failing self.model.chat call. Re-run the provided ChartQA_TEST command after tracing the model API. Done means the command no longer raises the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.