Repository navigation
[Tensor Parallel] Enable Auto parameter fitting in split-mode tensor - #22950
gaugarg-nv wants to merge 3 commits into
Conversation
JohannesGaessler
left a comment
There was a problem hiding this comment.
I don't think this is going to work correctly; how exactly did you do the testing? The problem with the meta backend is that it is reporting the memory use incorrectly so -fit will not reduce the context size by the right amount.
I tested this on two 5090 GPUs using My understanding is that the meta backend returns aggregated total and free memory across simple devices. Based on this, the approach should work when all simple devices are homogeneous and have identical total and free memory. If this assumption does not hold, the approach will break, and we would need to implement |
|
Hi @JohannesGaessler, Any suggestions on the approach? Am I missing some other limitation that may cause this to fail on homogeneous GPUs? Regarding heterogeneous GPUs, we can try calculating |
|
IIRC the returned memory by the meta device is currently the memory per device rather than the total memory, that's why the calculation of the context size should be somewhat correct but ultimately wrong. More generally, the point of |
Are you referring to this part of the code or something else: https://github.com/ggml-org/llama.cpp/blob/927dada6c9143ba4c940b72004d2698fa5e4e930/ggml/src/ggml-backend-meta.cpp#L98:L109 |
f46c497 to
de63db6
Compare
Prefer a uniform split if possible. Use Non-uniform splits if the model can't fit with a uniform split.
|
Hi @JohannesGaessler, the latest commit handles heterogeneous GPUs and uses non-uniform splits if required. If the model fits with a uniform split, that remains the first preference. Non-uniform split is used only if the model is expected to go OOM without it. Testing for tensor-split mode was simulated on 2x5090 by allocating large memory in a separate process on one of the GPUs. |
|
@gaugarg-nv i'm having trouble fitting an MOE model using so at the moment MOE fitting with tensor split doesn't work on heterogeneous GPUs setups |
…rg#22950 stuck Tiefen-Eval 2026-07-20: PR ggml-org#22950 ist Draft-Status, seit 2 Monaten stuck (letzte Aktivität 2026-05-16). Reviewer (JohannesGaessler) Bedenken: meta backend memory reporting incorrect → -fit reduziert context nicht korrekt. Author hat keine Lösung. TP funktioniert manuell (AtomicBot-ai#79 ✅, +23-32% tg auf Uranus). Auto-fit ist Convenience, nicht worth Portierung eines buggy Draft-PRs. Re-Eval wenn PR merged und stable. Priorisierung aktualisiert: Keine offenen Tier-2-Items mehr, direkt zu Tier-3.
Overview
First, reduce the context length, then reduce
n_gpu_layers.Meta backend expects the full decoder layer to be either on CPU or GPU, so skipping the partial-layer tensor_buft_overrides patterns.
Future work:
This PR assumes homogeneous GPUs. For heterogeneous GPUs, we also need to support
tensor_split, similar to-sm layer.Requirements
-fit oncode.