baaivision / EVE

[NeurIPS'24 Spotlight] EVE: Encoder-Free Vision-Language Models
MIT License
238 stars 3 forks source link

OSError: Unable to load weights from pytorch checkpoint file for '../models--BAAI--EVE-7B-v1.0/snapshots/7ee69e818a52f2db723f0abd20e23bae6e2bfd63/pytorch_model-00002-of-00002.bin' at '.../models--BAAI--EVE-7B-v1.0/snapshots/7ee69e818a52f2db723f0abd20e23bae6e2bfd63/pytorch_model-00002-of-00002.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True. #4

Closed Yingyue-L closed 5 months ago

Yingyue-L commented 5 months ago

I can't load the weight of BAAI/EVE-7B-v1.0, can you help me?

Paranioar commented 5 months ago

I can't load the weight of BAAI/EVE-7B-v1.0, can you help me?

Could you please offer more details? Where and how do you get such an error?

Yingyue-L commented 5 months ago
from eve.model.builder import load_pretrained_model
from eve.mm_utils import get_model_name_from_path
from eve.eval.run_eve import eval_model

model_path = "BAAI/EVE-7B-v1.0"

prompt = "Please describle image contents in detail."
image_file = "examples/ocr_beijing.jpg"

args = type('Args', (), {
    "model_path": model_path,
    "model_base": None,
    "model_name": get_model_name_from_path(model_path),
    "query": prompt,
    "conv_mode": None,
    "image_file": image_file,
    "sep": ",",
    "temperature": 0,
    "top_p": None,
    "num_beams": 1,
    "max_new_tokens": 512
})()

eval_model(args)

I just run the eval scripts as shown above.

Paranioar commented 5 months ago

Use the absolute path of the checkpoint.

Yingyue-L commented 5 months ago

Use the absolute path of the checkpoint.

Use the absolute path also has the same error

Paranioar commented 5 months ago

Use the absolute path of the checkpoint.

Use the absolute path also has the same error

What does 'models--BAAI--EVE-7B-v1.0' mean? Please show the exact path of our checkpoint file on your computer.

Yingyue-L commented 5 months ago

Use the absolute path of the checkpoint.

Use the absolute path also has the same error

What does 'models--BAAI--EVE-7B-v1.0' mean? Please show the exact path of our checkpoint file on your computer.

I use the huggingface-cli to download the model, the absolute path is /home/yingyueli/.cache/huggingface/hub/models--BAAI--EVE-7B-v1.0/snapshots/7ee69e818a52f2db723f0abd20e23bae6e2bfd63

Paranioar commented 5 months ago

Use the absolute path of the checkpoint.

Use the absolute path also has the same error

What does 'models--BAAI--EVE-7B-v1.0' mean? Please show the exact path of our checkpoint file on your computer.

I use the huggingface-cli to download the model, the absolute path is /home/yingyueli/.cache/huggingface/hub/models--BAAI--EVE-7B-v1.0/snapshots/7ee69e818a52f2db723f0abd20e23bae6e2bfd63

We don't support this way. You should download all the files of BAAI/EVE-7B-v1.0 and manage them as follows:

EVE ----| BAAI ---------| EVE-7B-v1.0 ------------------| config.json ------------------| generation_config.json ------------------| pytorch_model-00001-of-00002.bin ------------------| ...

Yingyue-L commented 5 months ago

v1.0

I follow your advice and set the path as /data/yingyueli/hub/EVE/BAAI/EVE-7B-v1.0, but also have the error. By the way, I can load the BAAI/EVE-7B-HD-v1.0 normally.

Paranioar commented 5 months ago

v1.0

I follow your advice and set the path as /data/yingyueli/hub/EVE/BAAI/EVE-7B-v1.0, but also have the error. By the way, I can load the BAAI/EVE-7B-HD-v1.0 normally.

If it is convenient, please add my wechat: R1228240468 and discuss it in detail.

Paranioar commented 5 months ago

There is a problem with the original file, we have just updated it. Welcome to use it 🤝.

Yangr116 commented 2 weeks ago

where is "openai/eve-patch14-anypixel-672"?