AML Technology & Digital Tools 2 — Questions and Answers
Question 1: Which distributed computing framework is most commonly used for training large-scale ML models across multiple GPUs on a single node?
- Apache Spark MLlib
- PyTorch Distributed Data Parallel (DDP) (Correct answer)
- Hadoop MapReduce
- Dask
Correct answer: PyTorch Distributed Data Parallel (DDP)
PyTorch DDP synchronizes gradients across GPUs within a single node using an all-reduce operation, making it the standard for single-node multi-GPU training.
Question 2: In MLflow, what is the purpose of the 'Model Registry' component?
- To store raw training datasets
- To manage model versioning, staging, and production transitions (Correct answer)
- To visualize training metrics in real time
- To schedule automated retraining pipelines
Correct answer: To manage model versioning, staging, and production transitions
MLflow Model Registry provides a centralized hub for managing the full lifecycle of ML models including versioning and stage transitions (Staging, Production, Archived).
Question 3: What is the primary advantage of using ONNX (Open Neural Network Exchange) format for ML models?
- It compresses models to reduce file size by 90%
- It enables interoperability between different ML frameworks (Correct answer)
- It automatically optimizes hyperparameters
- It provides built-in model explainability
Correct answer: It enables interoperability between different ML frameworks
ONNX defines a common format so models trained in one framework (e.g., PyTorch) can be deployed using a different runtime or framework (e.g., TensorFlow, ONNX Runtime).
Question 4: When using Kubernetes for ML workload orchestration, what resource type is typically used to run a one-time batch training job?
- Deployment
- StatefulSet
- Job (Correct answer)
- DaemonSet
Correct answer: Job
A Kubernetes Job creates one or more pods to run a task to completion and terminates them afterward, making it ideal for finite ML training runs.
Question 5: Which technique does TensorFlow's tf.data API primarily optimize?
- Gradient computation
- Data ingestion and preprocessing pipeline throughput (Correct answer)
- Hyperparameter search
- Model compression
Correct answer: Data ingestion and preprocessing pipeline throughput
tf.data optimizes the ETL pipeline feeding data into training by enabling parallelism, prefetching, and caching to prevent GPU starvation.
Question 6: In the context of feature stores (e.g., Feast, Tecton), what problem does the 'training-serving skew' refer to?
- Differences in model accuracy between training and test sets
- Discrepancies between features computed offline for training and online for inference (Correct answer)
- Latency differences between batch and real-time predictions
- Mismatch between model versions in staging and production
Correct answer: Discrepancies between features computed offline for training and online for inference
Training-serving skew occurs when the feature transformations applied at training time differ from those applied at inference time, causing degraded production performance.
Question 7: What does the '--mixed-precision' training flag (e.g., in Hugging Face Trainer) primarily achieve?
- It trains separate models for different data subsets
- It uses FP16 or BF16 for forward/backward passes to reduce memory usage and increase throughput (Correct answer)
- It mixes supervised and unsupervised learning objectives
- It alternates between different optimizers during training
Correct answer: It uses FP16 or BF16 for forward/backward passes to reduce memory usage and increase throughput
Mixed precision training stores activations and gradients in lower-precision formats (FP16/BF16) while keeping master weights in FP32, cutting memory usage and speeding up computation on modern GPUs.
Which distributed computing framework is most commonly used for training large-scale ML models across multiple GPUs on a single node?