tezvyn:

Difference between data and model parallelism, and when to prefer each

Source: docs.pytorch.orgbeginner

Tests split axis: data parallelism replicates model and shards data; model parallelism shards model across devices. Use data parallelism for throughput; model parallelism when layers exceed GPU memory.

Tests if you understand the split axis: data parallelism replicates full model on every worker and shards batches, while model parallelism divides model across workers. A strong answer contrasts PyTorch DDP with Tensor Parallel or Pipeline Parallel. Prefer data parallelism when the model fits in one GPU and you want to scale throughput. Prefer model parallelism when a layer exceeds GPU memory or the model cannot fit on one device. Red flag: claiming one is universally superior, confusing FSDP with model parallelism, or ignoring comms overhead.

Read the original → docs.pytorch.org

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Difference between data and model parallelism, and when to prefer each · Tezvyn