Git Product home page Git Product logo

Comments (4)

Sleepychord avatar Sleepychord commented on June 19, 2024

请你详细描述一下报错内容、您下载的文件大小,加载路径,Huggingface相关的环境设置;发布前我下载测试过那个模型文件是没问题的。

from visualglm-6b.

JamePeng avatar JamePeng commented on June 19, 2024

模型没问题,测试了一晚上,十有八九是deepspeed那个报错,那个可以根据readme指引跳过安装

from visualglm-6b.

wayne78ck6 avatar wayne78ck6 commented on June 19, 2024

我也是從昨天早上就一直失敗到現在,
也是從hugging face那裏下載檔案來跑的。
看起來是讀取第一個檔案就壞了。
以下是錯誤的資訊:

Loading checkpoint shards: 0%| | 0/5 [00:00<?, ?it/s]
Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/transformers/modeling_utils.py", line 446, in load_state_dict
return torch.load(checkpoint_file, map_location="cpu")
File "/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", line 905, in _legacy_load
return legacy_load(f)
File "/home/user/.local/lib/python3.8/site-packages/torch/serialization.py", line 802, in legacy_load
tar.extract('storages', path=tmpdir)
File "/usr/local/lib/python3.8/tarfile.py", line 2060, in extract
tarinfo = self.getmember(member)
File "/usr/local/lib/python3.8/tarfile.py", line 1782, in getmember
raise KeyError("filename %r not found" % name)
KeyError: "filename 'storages' not found"

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

Traceback (most recent call last):
File "/home/user/.local/lib/python3.8/site-packages/transformers/modeling_utils.py", line 457, in load_state_dict
raise ValueError(
ValueError: Unable to locate the file visualglm-6b/pytorch_model-00001-of-00005.bin which is necessary to load this pretrained model. Make sure you have saved the model properly.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test_VGLM.py", line 3, in
model = AutoModel.from_pretrained("visualglm-6b", trust_remote_code=True).half().cuda()
File "/home/user/.local/lib/python3.8/site-packages/transformers/models/auto/auto_factory.py", line 462, in from_pretrained
return model_class.from_pretrained(
File "/home/user/.local/lib/python3.8/site-packages/transformers/modeling_utils.py", line 2777, in from_pretrained
) = cls._load_pretrained_model(
File "/home/user/.local/lib/python3.8/site-packages/transformers/modeling_utils.py", line 3104, in _load_pretrained_model
state_dict = load_state_dict(shard_file)
File "/home/user/.local/lib/python3.8/site-packages/transformers/modeling_utils.py", line 462, in load_state_dict
raise OSError(
OSError: Unable to load weights from pytorch checkpoint file for 'visualglm-6b/pytorch_model-00001-of-00005.bin' at 'visualglm-6b/pytorch_model-00001-of-00005.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.

檔案大小看起來應該沒有太大差異:
user@6e2c72ae62f1:~/src/visualglm-6b$ ls -hal
總用量 12G
drwxr-xr-x 2 user user 4.0K 5月 19 09:45 .
drwxrwxr-x 8 user user 4.0K 5月 19 09:45 ..
-rw-r--r-- 1 user user 2.0K 5月 18 11:18 config.json
-rw-r--r-- 1 user user 4.5K 5月 18 11:18 configuration_chatglm.py
-rw-r--r-- 1 user user 1.5K 5月 18 11:18 .gitattributes
-rw-r--r-- 1 user user 2.6M 5月 18 11:19 ice_text.model
-rw-r--r-- 1 user user 12K 5月 18 11:18 LICENSE
-rw-r--r-- 1 user user 61K 5月 18 11:18 modeling_chatglm.py
-rw-r--r-- 1 user user 2.4K 5月 18 11:18 MODEL_LICENSE
-rw-r--r-- 1 user user 3.8G 5月 18 11:37 pytorch_model-00001-of-00005.bin
-rw-r--r-- 1 user user 3.7G 5月 18 11:33 pytorch_model-00002-of-00005.bin
-rw-r--r-- 1 user user 3.7G 5月 18 11:31 pytorch_model-00003-of-00005.bin
-rw-r--r-- 1 user user 3.7G 5月 18 11:35 pytorch_model-00004-of-00005.bin
-rw-r--r-- 1 user user 1.9G 5月 18 11:24 pytorch_model-00005-of-00005.bin
-rw-r--r-- 1 user user 106K 5月 18 11:18 pytorch_model.bin.index.json
-rw-r--r-- 1 user user 15K 5月 18 11:18 quantization.py
-rw-r--r-- 1 user user 3.8K 5月 18 11:18 README.md
-rw-r--r-- 1 user user 17K 5月 18 11:18 tokenization_chatglm.py
-rw-r--r-- 1 user user 461 5月 18 11:18 tokenizer_config.json
-rw-r--r-- 1 user user 3.9K 5月 18 11:18 visual.py

希望能找到是哪邊出錯了

from visualglm-6b.

Sleepychord avatar Sleepychord commented on June 19, 2024

@wayne78ck6 你是不是改代码的时候路径传错了?

from visualglm-6b.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.