Comments (3)
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.
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.
@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)
- How does packing work for non-MPT models? HOT 10
- sharded model format HOT 2
- Any plan for supporting DPO? HOT 1
- How to support new ICL task types in own codebase HOT 9
- Error loading JSON fine-tuning datasets HOT 1
- How to record loss curve?
- Triton attention patch from Mistral HOT 1
- Can't create environment on A100 server HOT 2
- How to support multi-threaded parallel data preprocessing? HOT 11
- Freeze when using cpu offload HOT 2
- Issues in using FP8 for MPT baselines on H100 HOT 2
- FP8 not working HOT 2
- convert_dataset_hf.py example stuck HOT 2
- Is flops calculation correct? HOT 2
- Loss curve differences for pretraining HOT 1
- How to run inference/convert_composer_to_hf.py with MPT-1B model on Habana Gaudi 2, file formats do not match HOT 4
- `ValueError` when following finetuning `mpt-7b-arc-easy--gpu.yaml` example with different default batch size HOT 2
- Issue when installing "pip install -e ".[gpu-flash2]"" HOT 3
- Wrong number of samples for C4? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llm-foundry.