AML Technology & Digital Tools 3 — Questions and Answers
Question 1: In Apache Spark MLlib, which abstraction replaced the original RDD-based API as the primary interface for machine learning?
- GraphX Pipeline
- DataFrame-based ML Pipelines (Correct answer)
- Streaming API
- Mllib.core
Correct answer: DataFrame-based ML Pipelines
Spark MLlib's DataFrame-based Pipeline API (spark.ml) replaced the older RDD-based API (spark.mllib) for better integration with Spark SQL and improved performance.
Question 2: Which tool is specifically designed for hyperparameter optimization and supports population-based training, Bayesian optimization, and early stopping?
- Optuna
- Ray Tune (Correct answer)
- GridSearchCV
- Hyperopt
Correct answer: Ray Tune
Ray Tune is a scalable hyperparameter tuning library that integrates multiple search algorithms (Bayesian, PBT, ASHA) and runs trials in parallel across a cluster.
Question 3: What is 'model quantization' in the context of ML model optimization?
- Reducing the number of training epochs
- Converting model weights from higher-precision to lower-precision data types (Correct answer)
- Pruning neurons with the lowest activation values
- Distilling knowledge from a large model into a smaller one
Correct answer: Converting model weights from higher-precision to lower-precision data types
Quantization reduces model size and inference latency by representing weights and activations in lower-bit formats (e.g., INT8 instead of FP32) with minimal accuracy loss.
Question 4: In a typical CI/CD pipeline for ML (MLOps), what step immediately follows model training and precedes deployment?
- Data ingestion
- Model evaluation and validation (Correct answer)
- Feature engineering
- Infrastructure provisioning
Correct answer: Model evaluation and validation
After training, the model must pass evaluation gates (accuracy thresholds, fairness checks, performance benchmarks) before it is approved for deployment.
Question 5: Which GPU memory optimization technique allows training models larger than a single GPU's VRAM by partitioning model layers across multiple GPUs?
- Data Parallelism
- Pipeline Parallelism (Model Parallelism) (Correct answer)
- Gradient Checkpointing
- Activation Offloading
Correct answer: Pipeline Parallelism (Model Parallelism)
Pipeline/model parallelism splits the model's layers across multiple GPUs so each GPU holds and computes only a portion of the network.
Question 6: What is the role of a 'vector database' (e.g., Pinecone, Weaviate, Chroma) in modern ML systems?
- Storing and versioning trained model weights
- Efficient similarity search over high-dimensional embedding vectors (Correct answer)
- Scheduling distributed training jobs
- Logging experiment metrics and parameters
Correct answer: Efficient similarity search over high-dimensional embedding vectors
Vector databases index high-dimensional embeddings and support approximate nearest-neighbor (ANN) search, enabling fast semantic retrieval for RAG and recommendation systems.
Question 7: In Weights & Biases (W&B), what does 'wandb.watch()' do during model training?
- Monitors GPU temperature and throttles training if overheating
- Logs model gradients and parameter histograms to the W&B dashboard (Correct answer)
- Streams predictions to a live evaluation endpoint
- Triggers alerts when validation loss stops improving
Correct answer: Logs model gradients and parameter histograms to the W&B dashboard
wandb.watch() hooks into the model to automatically log gradients and parameter distributions each step, helping detect issues like vanishing/exploding gradients.
In Apache Spark MLlib, which abstraction replaced the original RDD-based API as the primary interface for machine learning?