Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign the parameters of each layer to multiple CUDA devices automatically. #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lipan6461188
Copy link

I implemented a model.Transformer.cuda function to automatically assign the parameters of each layer to detected CUDA devices. This can help to load the 65B model to ≥ 2 40G A100 GPUs with the following command:

CUDA_VISIBLE_DEVICES=0,1 python example.py --ckpt_dir /path/to/model/65B --tokenizer_path /path/to/model/tokenizer.model --max_batch_size=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant