Comments (2)
I have encountered the same problem, however, it seem more like a problem with FSDP a peft wrapped model. When i run run_fsdp work fine for me, but when i try to add a lora config, which lead to the same error. @pacman100 could you please look at this problem?
from llm-workshop.
found out this is caused by module_wrap_policy
function in the FSDP(trainer.model)
.
Peft wrapped model passed a None
as the module class variable.
After I mannually filter out the None module_class , another error occurs:
File "train.py", line 197, in main
trainer.model = trainer.model_wrapped = FSDP(trainer.model, **kwargs)
File "/home/lzw/miniconda3/envs/Bert/lib/python3.8/site-packages/torch/distributed/fsdp/fully_sharded_data_parallel.py", line 487, in __init__
_init_param_handle_from_module(
File "/home/lzw/miniconda3/envs/Bert/lib/python3.8/site-packages/torch/distributed/fsdp/_init_utils.py", line 519, in _init_param_handle_from_module
_init_param_handle_from_params(state, managed_params, fully_sharded_module)
File "/home/lzw/miniconda3/envs/Bert/lib/python3.8/site-packages/torch/distributed/fsdp/_init_utils.py", line 531, in _init_param_handle_from_params
handle = FlatParamHandle(
File "/home/lzw/miniconda3/envs/Bert/lib/python3.8/site-packages/torch/distributed/fsdp/flat_param.py", line 537, in __init__
self._init_flat_param_and_metadata(
File "/home/lzw/miniconda3/envs/Bert/lib/python3.8/site-packages/torch/distributed/fsdp/flat_param.py", line 585, in _init_flat_param_and_metadata
) = self._validate_tensors_to_flatten(params)
File "/home/lzw/miniconda3/envs/Bert/lib/python3.8/site-packages/torch/distributed/fsdp/flat_param.py", line 731, in _validate_tensors_to_flatten
raise ValueError(
ValueError: Must flatten tensors with uniform `requires_grad` when `use_orig_params=False`
I'm not familar with FSDP, so still dont know how to figure it out.
from llm-workshop.
Related Issues (17)
- Incorrectness in Flash Attention HOT 3
- train Segmentation fault
- chat assistant traning: CUDA out of memory
- Eval is like running forever HOT 1
- Packing = True HOT 2
- how to load model trained by accelerate with fsdp.
- url in the readme is broken HOT 1
- train.py: error: ambiguous option: --split could match --splits, --split_batches HOT 1
- No Version mentioned for any library used in the project.
- Fine Tuning with LoRA failed during train step
- How to draw the loss graph?
- Flash Attention for fine-tuning HOT 4
- Finetune 70B model on one node
- Error on save_steps using FSDP HOT 3
- Enhancements for Efficient Utilization and Optimization in Fine-tuning Llama 2 70B Example
- Using device_map auto when launch acceleator
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-workshop.