Code Monkey home page Code Monkey logo

Comments (3)

hanlint avatar hanlint commented on June 10, 2024 1

Hello @growlix , are you running this in fp8?

If so, this issue was fixed in mosaicml/composer#2907 and released in v0.19.0, so you should upgrade your composer version.

from llm-foundry.

growlix avatar growlix commented on June 10, 2024 1

Thank you so much, @hanlint! We are running in fp8. We'll update to v0.19.0 and give it a whirl!

from llm-foundry.

prigoyal avatar prigoyal commented on June 10, 2024

@hanlint , we tried composer 0.19.0 but we are still hitting the issue . Is there any change to the config we need to make?
we are specifying the load path as the shard prefix following this

30     trainer = Trainer(
31   File "/usr/lib/python3/dist-packages/composer/trainer/trainer.py", line 1493, in __init__
32     self._rng_state = checkpoint.load_checkpoint(
33   File "/usr/lib/python3/dist-packages/composer/utils/checkpoint.py", line 366, in load_checkpoint
34     rng_state_dicts = load_sharded_checkpoint(
35   File "/usr/lib/python3/dist-packages/composer/utils/checkpoint.py", line 558, in load_sharded_checkpoint
36     optim_state = load_sharded_optimizer_state_dict(model_state_dict=state.state_dict()['model'],
37   File "/usr/lib/python3/dist-packages/torch/distributed/checkpoint/optimizer.py", line 264, in load_sharded_optimizer_state_dict
38     layout_specs, dp_pg = _get_state_dict_2d_layout(model_state_dict)
39   File "/usr/lib/python3/dist-packages/torch/distributed/checkpoint/optimizer.py", line 128, in _get_state_dict_2d_layout
40     specs[key] = (None, value.size())
41 AttributeError: '_io.BytesIO' object has no attribute 'size'
42 Traceback (most recent call last):
43   File "/fsx/users/prigoyal/experiments/prigoyal/science/20240227-16-10-13_bump-composer/bench-MPT1b-RPJ-fp8-noactckpt-noaccum-bs160-v5docker-flash-noqknorm-sharded-resume15ba/science/tools/train_llms.py", line 632, in <module>
44     main(cfg)
45   File "/fsx/users/prigoyal/experiments/prigoyal/science/20240227-16-10-13_bump-composer/bench-MPT1b-RPJ-fp8-noactckpt-noaccum-bs160-v5docker-flash-noqknorm-sharded-resume15ba/science/tools/train_llms.py", line 564, in main
46     trainer = Trainer(
47   File "/usr/lib/python3/dist-packages/composer/trainer/trainer.py", line 1493, in __init__
48     self._rng_state = checkpoint.load_checkpoint(
49   File "/usr/lib/python3/dist-packages/composer/utils/checkpoint.py", line 366, in load_checkpoint
50     rng_state_dicts = load_sharded_checkpoint(
51   File "/usr/lib/python3/dist-packages/composer/utils/checkpoint.py", line 558, in load_sharded_checkpoint
52     optim_state = load_sharded_optimizer_state_dict(model_state_dict=state.state_dict()['model'],
53   File "/usr/lib/python3/dist-packages/torch/distributed/checkpoint/optimizer.py", line 264, in load_sharded_optimizer_state_dict
54     layout_specs, dp_pg = _get_state_dict_2d_layout(model_state_dict)
55   File "/usr/lib/python3/dist-packages/torch/distributed/checkpoint/optimizer.py", line 128, in _get_state_dict_2d_layout
56     specs[key] = (None, value.size())
57 AttributeError: '_io.BytesIO' object has no attribute 'size'

from llm-foundry.

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.