Katkat

Compare Tensor Parallelism and Pipeline Parallelism

Mistral AISoftware Engineer · Technical Screen

Last updated

Compare transformer tensor and pipeline parallelism through parameter partitioning, collectives, activation transfers, microbatch bubbles, memory, and inference latency.

Compare tensor parallelism and pipeline parallelism for training or serving a transformer too large for one device. Explain what is partitioned, what communication each approach requires, and when you would consider combining them.

Constraints & Assumptions

No model size, device topology, or throughput target is specified. Use a transformer as the example and distinguish training from autoregressive inference. Avoid assuming one method is universally faster.

Clarifying Questions

Does the model fail to fit because of weights, optimizer state, or activations? What are the interconnect bandwidth, batch size, sequence length, and latency requirements?

Follow-up questions

  • What creates pipeline bubbles? How do microbatches help? Why might tensor parallelism be better confined to a fast local interconnect? How does a small inference batch affect the choice?