OpenMOSS / OpenMOSS/MOSS

模型过大,尝试卸载一部分模型但是失败了

Open
#140 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
12.3k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Traceback (most recent call last):
File "/mnt/e/code/code_xuexi/github/MOSS-main/moss_cli_demo.py", line 33, in
model = load_checkpoint_and_dispatch(
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/accelerate/big_modeling.py", line 479, in load_checkpoint_and_dispatch
load_checkpoint_in_model(
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/accelerate/utils/modeling.py", line 924, in load_checkpoint_in_model
checkpoint = load_state_dict(checkpoint_file, device_map=device_map)
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/accelerate/utils/modeling.py", line 826, in load_state_dict
return torch.load(checkpoint_file)
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/torch/serialization.py", line 607, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/torch/serialization.py", line 882, in _load
result = unpickler.load()
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/torch/serialization.py", line 857, in persistent_load
load_tensor(data_type, size, key, _maybe_decode_ascii(location))
File "/root/anaconda3/envs/moss/lib/python3.8/site-packages/torch/serialization.py", line 845, in load_tensor
storage = zip_file.get_storage_from_record(name, size, dtype).storage()
OSError: [Errno 14] Bad address
ERROR conda.cli.main_run:execute(49): conda run python /mnt/e/code/code_xuexi/github/MOSS-main/moss_cli_demo.py failed. (See above for error)

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 moss_cli_demo.py at line 33 and the load_checkpoint_and_dispatch call shown in the traceback. Reproduce it with the displayed conda-run command and inspect checkpoint loading through accelerate and torch; done means the model-loading failure is explained and a verified resolution is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.