ladderlore
  • S3 သို့မဟုတ် IAM လို service အမည်ကို ရိုက်ထည့်ပါ။

သဘောတရား

Distributed training and HyperPod

Split the work across many GPUs by data or by model, and keep long jobs alive with HyperPod.

ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။

  • Data parallel

    What is split
    The batch
    Use when
    The model fits one GPU
  • Pipeline parallel

    What is split
    Layers across GPUs
    Use when
    The model is too big
  • Tensor parallel

    What is split
    Math inside a layer
    Use when
    Very large layers
  • Sharded data parallel

    What is split
    Optimizer, gradients, parameters
    Use when
    Big model, many GPUs
Ways to split the work.

1 / 2

  • Data parallel

    What is split
    The batch
    Use when
    The model fits one GPU
  • Pipeline parallel

    What is split
    Layers across GPUs
    Use when
    The model is too big
  • Tensor parallel

    What is split
    Math inside a layer
    Use when
    Very large layers

2 / 2

  • Sharded data parallel

    What is split
    Optimizer, gradients, parameters
    Use when
    Big model, many GPUs
Ways to split the work.
Training run
Node fails
Node replaced
S3 as the ML data lake
Training resumes
Last checkpoint
  1. 1A hardware fault hits the run.
  2. 2HyperPod health checks find the bad node and swap in a healthy one.
  3. 3Training resumes from the last checkpoint.
A node fails and the job resumes.

ဘာလဲ

Distributed training uses many GPUs on one or more instances. Data parallelism copies the whole model to every GPU and splits each batch among them. The GPUs share gradients after each step. Use it when the model fits on one GPU but the data is large. Model parallelism splits the model itself when it does not fit in one GPU: pipeline parallelism puts groups of layers on different GPUs, and tensor parallelism splits the math inside a layer across GPUs. Sharded data parallelism is a mix: it spreads the optimizer state, gradients and parameters across the data-parallel GPUs, so each GPU holds only a slice.

ဘာလဲ

SageMaker AI supplies libraries. The distributed data parallelism library speeds up the gradient exchange on AWS networking. The model parallelism library handles pipeline, tensor and sharded data parallelism for PyTorch. You switch them on with the distribution setting of the training job.

Large jobs also need fast links. Elastic Fabric Adapter (EFA) is a network interface on supported instances that gives low-latency, high-throughput communication between nodes, so GPUs do not wait on each other.

ဘာလဲ

SageMaker HyperPod is a persistent cluster built for foundation model training. It checks the health of instances, replaces a failed node, and resumes the job from the latest checkpoint, so a hardware fault does not waste days of work. You orchestrate it with Slurm or Amazon EKS. Save checkpoints to Amazon S3 or a shared file system.

မှတ်ထားရန်

  • Data parallel: copy the model to every GPU and split the batch.
  • Model parallel: split the model, by layers (pipeline) or inside layers (tensor).
  • Sharded data parallelism: shard optimizer state, gradients and parameters.
  • EFA: low-latency networking between nodes.

မှတ်ထားရန်

  • HyperPod: health checks, node replacement and automatic resume from checkpoints.
  • Try data parallel first. Use model parallel only when the model does not fit on one GPU.

စာမေးပွဲမှာ

  • “The model is too large for one GPU’s memory” points to model parallelism or sharded data parallelism.
  • “A large data set, and the model fits on one GPU” points to data parallelism.
  • “Weeks-long foundation model training that must survive hardware failures” points to SageMaker HyperPod.