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

tensor parallelism across multiple GPU's #1092

Closed
samanthvishwas opened this issue Sep 18, 2023 · 2 comments
Closed

tensor parallelism across multiple GPU's #1092

samanthvishwas opened this issue Sep 18, 2023 · 2 comments

Comments

@samanthvishwas
Copy link

samanthvishwas commented Sep 18, 2023

I am following the code as mentioned in the AWS documentation to host GPT-J-6B using DJL serving

[ https://github.com/aws/amazon-sagemaker-examples/blob/main/advanced_functionality/pytorch_deploy_large_GPT_model/GPT-J-6B-model-parallel-inference-DJL.ipynb]
Providing a tensor parallelism value as 2 in serving.properties creates 2 copies of the model rather than partitioning model layers across two GPU's . This happens irrespective of using a smaller/larger model.

Instance used :
ml.g4dn.12xlarge

@frankfliu
Copy link
Contributor

frankfliu commented Sep 21, 2023

@samanthvishwas
g4dn.12x has 4 gpus, DJLServing will automatically expend to all GPUs. So you see 2 workers (each worker use 2GPUs)

If you only want to load one copy of the model, you can set the following in serving.properties:

load_on_devices=0

@sindhuvahinis
Copy link
Contributor

@samanthvishwas Closing the issue. Please open a new one, if you have any more questions.

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

No branches or pull requests

3 participants