Questionário vinculado ao guia · Difícil Nível

Hugging Face Teste de aceleração para treinamento multi-GPU

Mova um script PyTorch entre dispositivos com Accelerate enquanto verifica a fragmentação de dados, redução de métricas, precisão mista e segurança de pontos de verificação.

Caminhos de guia relacionadosHugging Face Acelerar Multi GPU
Pergunta 1 de 8

O que o Accelerate ajuda principalmente a fazer em um script de treinamento PyTorch?

Visualize cada pergunta8 perguntas

As respostas e explicações aparecem conforme você responde ao teste.

  1. O que o Accelerate ajuda principalmente a fazer em um script de treinamento PyTorch?
    • Defines the model architecture for the task
    • Selects an objective function from the labels
    • Run across supported hardware and distributed configurations with shared code
    • Generates evaluation data from training examples
  2. Por que passar objetos de treinamento comuns pela preparação do Accelerator?
    • Automatically tunes the optimizer learning rate
    • To prepare them for the configured device and strategy
    • Selects a checkpoint from validation metrics
    • Rewrites the model training objective
  3. O que pode acontecer se os workers não participarem consistentemente dos coletivos distribuídos?
    • The loss becomes a calibrated probability
    • The process always exits cleanly after one rank stops
    • Distributed communication no longer occurs
    • The run can hang while processes wait for one another
  4. Por que métricas de avaliação locais podem precisar de redução entre processos?
    • Each process may see only part of the evaluation data
    • Every process automatically has a globally reduced metric
    • Metric values are stored directly in model weights
    • Reduction converts labels to distributed indices
  5. O que deve ser verificado sobre o tamanho do lote ao passar de uma GPU para várias?
    • Assume it stays equal to the single-GPU batch in every setup
    • Determine whether the configured size is per process or global
    • Assume prepare always makes batch size equal to label count
    • Treat batch size as the number of GPUs
  6. Why guard shared checkpoint writes in a multi-process job?
    • Prevent workers from training at the same time
    • Avoid concurrent workers racing to write the same shared path
    • Ensure every rank reads different labels
    • Synchronize gradients before a checkpoint is written
  7. Does using multiple GPUs guarantee proportional speedup?
    • Speedup must equal the number of GPUs if the script is unchanged
    • The model size is the only factor that determines scaling
    • Data movement and synchronization can limit measured speedup
    • Parallel training cannot run on multiple devices
  8. Which verification checks a saved multi-device artifact for practical reuse?
    • Load it in the intended inference environment
    • Keep it accessible only inside the worker process
    • Assume it includes the full dataset
    • Skip validation because the job completed