1
0
Fork 0
mirror of https://github.com/p-e-w/heretic.git synced 2026-12-03 18:42:57 +07:00

[GH-ISSUE #295] Multi-GPU has some problem #166

Closed
opened 2026-11-01 04:18:13 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @Vinay-Umrethe on GitHub (Apr 13, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/295

One GPU is not being utilized

heretic auto-detects all accelerator devices and use all by default for compute, but for google/gemma-4-E2B-it model it looks like DDP is not working well, one is idle.

Image

Stats

Image

Details:

  • Latest heretic branch cd422bbb9906b06f36284a04b386cb877eb016c1
  • Latest Transformers version, accelerate, done by heretic-llm dependencies
Originally created by @Vinay-Umrethe on GitHub (Apr 13, 2026). Original GitHub issue: https://github.com/p-e-w/heretic/issues/295 ## One GPU is not being utilized `heretic` auto-detects all accelerator devices and use *all* by default for compute, but for `google/gemma-4-E2B-it` model it looks like DDP is not working well, one is idle. <p align="center"> <img width="690" height="422" alt="Image" src="https://github.com/user-attachments/assets/562ff4af-e343-4efd-bd7a-d261152a3167" /> </p> ## Stats <p align="center"> <img width="268" height="567" alt="Image" src="https://github.com/user-attachments/assets/b151645d-4fb7-4968-8d63-50a2750d0d1c" /> </p> ## Details: - Latest heretic branch `cd422bbb9906b06f36284a04b386cb877eb016c1` - Latest Transformers version, accelerate, done by `heretic-llm` dependencies
Author
Owner

@p-e-w commented on GitHub (Apr 14, 2026):

We use Accelerate with auto, which is the officially blessed solution that should do the right thing in all cases. If that doesn't happen, it's an upstream bug. I don't think there is anything to do here. Of course, you can always pass in a manual device map.

<!-- gh-comment-id:4244497374 --> @p-e-w commented on GitHub (Apr 14, 2026): We use Accelerate with `auto`, which is the officially blessed solution that should do the right thing in all cases. If that doesn't happen, it's an upstream bug. I don't think there is anything to do here. Of course, you can always pass in a manual device map.
Author
Owner

@Vinay-Umrethe commented on GitHub (Apr 14, 2026):

Of course, you can always pass in a manual device map.

Sure, but what does heretic do actually? DDP OR FSDP? Ig acclerate's default behavior with "auto" is DDP

<!-- gh-comment-id:4244609108 --> @Vinay-Umrethe commented on GitHub (Apr 14, 2026): > Of course, you can always pass in a manual device map. Sure, but what does `heretic` do actually? DDP OR FSDP? Ig `acclerate`'s default behavior with "auto" is DDP
Author
Owner

@p-e-w commented on GitHub (Apr 14, 2026):

Heretic doesn't do anything in that regard. It fully outsources multi-GPU management to Accelerate. There is no multi-GPU-aware code in Heretic at all, beyond making sure that tensors are on the same device for computations.

<!-- gh-comment-id:4244983128 --> @p-e-w commented on GitHub (Apr 14, 2026): Heretic doesn't do anything in that regard. It fully outsources multi-GPU management to Accelerate. There is no multi-GPU-aware code in Heretic at all, beyond making sure that tensors are on the same device for computations.
Author
Owner

@Vinay-Umrethe commented on GitHub (Jul 2, 2026):

Closing this as completed.

False Positive

What Heretic do is inference only, using transformers. So DDP and FSDP are conceptually irrelevant as no training is happening at all.

accelerate / transformers utilize based on which works best: If the model fits in a Single-GPU, use it. If not, only then use rest of the available GPUs.

<!-- gh-comment-id:4867807120 --> @Vinay-Umrethe commented on GitHub (Jul 2, 2026): Closing this as completed. ## False Positive What Heretic do is ***inference*** only, using `transformers`. So DDP and FSDP are *conceptually irrelevant* as no ***training*** is happening at all. `accelerate` / `transformers` utilize based on which works best: If the model fits in a Single-GPU, use it. If not, only then use rest of the available GPUs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
p-e-w/heretic#166
No description provided.