Courseiva
AI Infrastructure and TechnologiesmediumMultiple ChoiceObjective-mapped

AI0-001 AI Infrastructure and Technologies Practice Question

A data scientist is using PyTorch to train a custom NLP model. The training is slow on a single GPU. They want to speed up training by using multiple GPUs on a single machine. Which PyTorch feature should they use?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

torch.nn.DataParallel

DataParallel (or DistributedDataParallel) is PyTorch's built-in feature to split batches across multiple GPUs. It is straightforward for single-machine multi-GPU training.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • TorchScript tracing

    Why it's wrong here

    TorchScript is for model serialization and optimization, not parallelism.

  • torch.nn.DataParallel

    Why this is correct

    DataParallel automatically splits input across GPUs and aggregates gradients; it's the simplest multi-GPU approach.

  • torch.optim.SGD

    Why it's wrong here

    SGD is an optimizer, not a parallelism tool.

  • PyTorch Lightning's zero_grad function

    Why it's wrong here

    zero_grad is for gradients, not multi-GPU parallelism.

About these practice questions

This AI0-001 question is part of Courseiva's 754-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AI0-001 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI0-001 exam.