Skip to content

multi GPU setting #1610

Closed
Closed

Description

@chesterout

@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?

Activity

  1. Qubitium commented on May 12, 2025

    @Qubitium
    Collaborator

    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).
  2. chesterout commented on May 12, 2025

    @chesterout
    Author

    @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.

  3. Qubitium commented on May 12, 2025

    @Qubitium
    Collaborator

    @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.

  4. rjq123 commented on Jun 18, 2025

    @rjq123

    command:CUDA_VISIBLE_DEVICES=0,1,2,3 python code.py
    Why is it that even though I have set up four GPUs for launching quantization, only the first two GPUs (0 and 1) are being used, and the last two GPUs are not being utilized?

  5. sirish-gambhira commented on Jun 26, 2025

    @sirish-gambhira

    Is the multi-GPU setting supported / tested on rocm-server?

    Furthermore, do we need to follow all these steps to test multi-gpu setting or just python3.13t is sufficient?

    Tagging @Qubitium for reach. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions