Using modern deep learning frameworks: Practice Questions — Software Development (NVIDIA-Certified Associate: Generative AI LLM)
Practice Questions: Using Modern Deep Learning Frameworks These multiple-choice questions are designed to test your understanding of using modern...
Practice Questions: Using Modern Deep Learning Frameworks
These multiple-choice questions are designed to test your understanding of using modern deep learning frameworks in the context of developing and deploying large language models (LLMs), as covered in the NVIDIA-Certified Associate: Generative AI LLM exam.
Which Python library is most commonly used for building and training deep learning models, including LLMs?
- A. NumPy
- B. TensorFlow
- C. Matplotlib
- D. Pandas
Correct answer: B
Explanation: TensorFlow is a widely used deep learning framework that supports building, training, and deploying neural networks, including large language models. NumPy and Pandas are primarily for numerical and data manipulation, while Matplotlib is for visualization.
In PyTorch, what is the purpose of the torch.no_grad() context manager during model inference?
- A. To enable gradient calculation for training
- B. To disable gradient calculation and reduce memory usage
- C. To save the model parameters
- D. To initialize model weights
Correct answer: B
Explanation: torch.no_grad() disables gradient tracking, which reduces memory consumption and speeds up inference since gradients are not needed when the model is only making predictions.
Which of the following frameworks is specifically designed to simplify the deployment of deep learning models on inference servers?
- A. Flask
- B. NVIDIA Triton Inference Server
- C. Jupyter Notebook
- D. Scikit-learn
Correct answer: B
Explanation: NVIDIA Triton Inference Server is a specialized platform for deploying AI models at scale, supporting multiple frameworks and optimized for inference workloads. Flask is a web framework, Jupyter Notebook is for interactive development, and Scikit-learn is for traditional machine learning.
Which data type is commonly used to represent input text sequences for LLMs in deep learning frameworks?
- A. Integer tensors representing token IDs
- B. Floating-point images
- C. Boolean masks only
- D. Raw string arrays
Correct answer: A
Explanation: Text input is typically tokenized and converted into integer tensors representing token IDs before being fed into LLMs. Floating-point images and raw strings are not directly used as input tensors, and boolean masks are used alongside token IDs but not as the primary input.
When fine-tuning a pre-trained LLM using PyTorch, which method is recommended to update only specific layers?
- A. Freeze all layers and update the entire model
- B. Set requires_grad=False for layers not to be updated
- C. Delete layers that should not be updated
- D. Use a different optimizer for each layer
Correct answer: B
Explanation: Setting requires_grad=False for certain layers freezes their weights during backpropagation, allowing selective fine-tuning of only specific parts of the model.
Which of the following best describes the role of the DataLoader class in PyTorch?
- A. It builds the neural network architecture
- B. It loads and batches datasets for training and evaluation
- C. It performs model evaluation metrics
- D. It optimizes the model parameters
Correct answer: B
Explanation: DataLoader handles efficient loading, batching, shuffling, and parallel processing of datasets to feed into the model during training and evaluation.
What is the primary advantage of using frameworks like Hugging Face Transformers in LLM development?
- A. They provide pre-built LLM architectures and pretrained weights for easy integration
- B. They replace the need for GPUs
- C. They automatically generate training data
- D. They are only used for image recognition tasks
Correct answer: A
Explanation: Hugging Face Transformers offers a rich library of pre-trained LLMs and tools for easy fine-tuning and deployment, accelerating development workflows. They do not replace hardware or generate data automatically.
More in this topic
Ready to test your knowledge?
Put what you've learned into practice with a quick quiz and track your progress.
Test your knowledge →