Comments (6)
Thanks for reporting! How was inputs.bin generated?
from alpaca_farm.
Thanks for reporting! How was inputs.bin generated?
@lxuechen It is a batch of input when doing PPO. PPO feeds this batch of queries to the model to get the responses.
from alpaca_farm.
Hi @Zhiyuan-Zeng ,
I don't think we ever use the huggingface "model parallelism" directly. So, Just chiming in for some thoughts.
According to https://huggingface.co/docs/accelerate/usage_guides/big_modeling,
By passing device_map="auto", we tell 🤗 Accelerate to determine automatically where to put each layer of the model depending on the available resources:
- first we use the maximum space available on the GPU(s)
- if we still need space, we store the remaining weights on the CPU
- if there is not enough RAM, we store the remaining weights on the hard drive as memory-mapped tensors
So in your case (using 80GB A100), your code should be loading the model onto the first GPU? Can you confirm if this is the case?
from alpaca_farm.
Hi @Tiiiger,
- Yes I want to use model parallelism for my own use.
- I print the
model.hf_device_map
, and the result is{'model.embed_tokens': 0, 'model.layers.0': 0, 'model.layers.1': 0, 'model.layers.2': 0, 'model.layers.3': 0, 'model.layers.4': 0, 'model.layers.5': 0, 'model.layers.6': 0, 'model.layers.7': 0, 'model.layers.8': 0, 'model.layers.9': 0, 'model.layers.10': 0, 'model.layers.11': 0, 'model.layers.12': 0, 'model.layers.13': 0, 'model.layers.14': 0, 'model.layers.15': 0, 'model.layers.16': 1, 'model.layers.17': 1, 'model.layers.18': 1, 'model.layers.19': 1, 'model.layers.20': 1, 'model.layers.21': 1, 'model.layers.22': 1, 'model.layers.23': 1, 'model.layers.24': 1, 'model.layers.25': 1, 'model.layers.26': 1, 'model.layers.27': 1, 'model.layers.28': 1, 'model.layers.29': 1, 'model.layers.30': 1, 'model.layers.31': 1, 'model.norm': 1, 'lm_head': 1}
. So I think the model is loaded onto the first two GPUs.
from alpaca_farm.
Unfortunately we have no experience with this vanilla model parallelism and unsure why it is causing trouble.
For all of this project, we used FSDP, which we find the most useful. I would suggest you look into how we used that and see if it can help.
from alpaca_farm.
@Tiiiger Thanks for your help! Let me close this issue.
from alpaca_farm.
Related Issues (20)
- [Bug] Error importing is_deepspeed_zero3_enabled HOT 1
- Question about KL term HOT 1
- Reproducibility of pretuned reward model
- Use with Llama-2-70b-hf? HOT 4
- KeyError: 'llama' in /recover_model_weights.py HOT 2
- Confusing detail preference mapping HOT 1
- recover_model_weights.py gives WARNING:root:Your base LLaMA checkpoint is converted with transformers==4.27.0.dev0
- Huge memory demand of recover_model_weights.py?
- RewardModel.from_pretrained() loads redundant weights (incurs extra ~30GB of RAM)
- Why use FSDP instead of Deepspeed? HOT 2
- lower cuda version? HOT 1
- integrity_check error with sft10k
- score with reward model HOT 2
- RecursionError: maximum recursion depth exceeded
- BaseAnnotator.__init__() got an unexpected keyword argument 'other_keys_to_keep' HOT 4
- PairwiseAutoAnnotator always "Annotating 0 examples with gpt4_3" HOT 1
- Repeated Deprecation Error HOT 3
- Error downloading pre-trained weights
- Using pretrained models HOT 3
- Inquiry Regarding Supervised Fine-Tuning with AlpacaFarm Framework for Pythia Models HOT 1
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 alpaca_farm.