Skip to content

multi GPU setting #1610

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

Open
chesterout opened this issue May 12, 2025 · 3 comments
Open

multi GPU setting #1610

chesterout opened this issue May 12, 2025 · 3 comments

Comments

@chesterout
Copy link

@Qubitium
I am trying to quantize deepseek bf 16 from modelcloud.
How do we use 2 gpus. I tried three ways,

  1. in the code: os.environ["CUDA_VISIBLE_DEVICES"] = "0,1".
  2. in the linux command, export CUDA_VISIBLE_DEVICES=0,1.
  3. CUDA_VISIBLE_DEVICES=0,1 python code.py

However, none of these works. Can you clarify?

@Qubitium
Copy link
Collaborator

Qubitium commented May 12, 2025

Please clarify none of these works? Show me the code and errors.

  1. Are you using main branch?
  2. You need to install Python 3.13t (free-threading) branch. not the regular Python 3.13 for true multi-gpu support.
  3. Your gpus must be on PCIE 4.0 or SXM4+ (best).

@chesterout
Copy link
Author

chesterout commented May 12, 2025

@Qubitium
By none of these works, it means that only one GPU is used and the second one does not load any weight.
In the nvidia-smi, only the first one is working. And finally the command line shows not enough memory.

I am now researching for the python 3.13t.

@Qubitium
Copy link
Collaborator

Qubitium commented May 12, 2025

@chesterout All the weights are loaded to GPU0. During quantization, some (not all) weights will be dynamically moved to gpu 1...N and only if you use python 3.13t.

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

2 participants