Machine learning system optimisation begins with measurement. Before changing an algorithm, adding processors, or moving work to a GPU, we need to understand what is slow, which resource is limiting performance, and how performance changes as the workload grows.
Course coverage:
- Metrics: time complexity, running time, space, throughput, latency, and response time
- Performance scaling and tuning: measuring bottlenecks and predicting how a workload grows
- Training versus deployment: different objectives, workloads, and constraints
- Deployment environments: distributed and cloud systems, embedded devices, and mobile systems
Learning Objectives
#
By the end of this page, you should be able to:
Parallel and Distributed Algorithms
#
Parallelisation divides computational work into parts that can execute concurrently. The purpose is to reduce completion time or increase throughput, but the gain depends on how much work is genuinely independent and how much overhead is introduced.
Course coverage:
- Systems and performance: execution time, throughput, efficiency, and bottlenecks
- Speedup—approaches and issues: Amdahl’s Law, serial work, overhead, and load imbalance
- Data parallelism versus task parallelism versus request parallelism
- Scale-out clusters: communication cost and its impact on speedup
The worked algorithms also show how divide-and-conquer and matrix operations expose parallel work.
ML System Optimization,
MLSysOps,
Multi-Core CPU,
GPGPU,
SIMD,
MIMD,
SIMT,
GPU,
TPU,
AI,
ML Parallel Programming Models
#
Parallel algorithms need hardware that can execute independent work efficiently. Modern systems therefore combine multiple CPU cores, memory hierarchies, threads, instruction pipelines, GPUs, clusters, and specialised matrix processors.
Course coverage:
- Parallel programming models for expressing independent work
- MapReduce, task-parallel, and request-parallel patterns
- Multi-core CPUs and GPGPUs: SIMD, MIMD, SIMT, memory hierarchy, and bandwidth
- Distributed clusters: CPU-only and GPU-accelerated systems, data sharding, parameter servers, and all-reduce
The hardware sections also cover specialised matrix processors and the performance limits introduced by memory and communication.
Parallelisation of ML Algorithms
#
Machine-learning algorithms expose different kinds of parallel work. The correct decomposition depends on whether independent work occurs across records, features, trees, clusters, kernel entries, or optimisation steps.
Course coverage:
- Problem decomposition for parallel machine learning
- Ensemble methods and XGBoost-style tree ensembles
- Parallel k-means assignment and centroid reduction
- Distributed decision trees and random forests
- Support vector machine parallelisation using block and MapReduce-style computation
Learning Objectives
#
By the end of this page, you should be able to:
Communication-Aware Distributed ML
#
Distributed machine learning is effective only when saved computation exceeds the cost of moving data and synchronising workers. Algorithm design must therefore account for message size, message frequency, barriers, and parameter placement.
Course coverage:
- Communication overhead, illustrated through distributed k-means
- Model parallelism when parameters do not fit or compute must be divided
- Distributed k-nearest neighbours: partitioning, indexing, and approximate search
- Gradient descent, SGD, and mini-batch optimisation
- Synchronous versus asynchronous updates
Learning Objectives
#
By the end of this page, you should be able to:
Clusters, Hadoop, and Spark
#
Scale-out frameworks distribute data and computation across networked machines. Their value comes from aggregate compute and storage, while their main costs are communication, scheduling, serialisation, and repeated synchronisation.
Course coverage:
- Cluster computing with Hadoop and Spark
- MapReduce k-means, mini-batch and streaming variants
- Convergence and communication reduction
- Distributed convolutional neural networks: data and model parallelism
- Layer or tensor slicing, mixed precision, pipelining, and distributed execution frameworks
Learning Objectives
#
By the end of this page, you should be able to:
Distributed Training Strategies
#
Distributed training combines devices to increase throughput, fit larger models, or shorten time to solution. The central design question is what to partition: examples, model parameters, layers, tensors, or the training schedule.
Course coverage:
- Data parallelism
- Model parallelism
- Pipeline parallelism and micro-batches
- Gradient checkpointing
- Mixed-precision training and loss scaling
Learning Objectives
#
By the end of this page, you should be able to:
- compare data, model, and pipeline parallelism
- calculate global batch size, speedup, efficiency, and effective throughput
- explain gradient aggregation through all-reduce
- calculate simple pipeline time and utilisation
- quantify the memory–computation trade-off of checkpointing
- explain mixed precision and loss scaling
Big Picture
#
flowchart TD
A["Training Constraint"] --> B["More Data Throughput"]
A --> C["Model Too Large"]
A --> D["Activation Memory Too High"]
B --> E["Data Parallelism"]
C --> F["Model or Pipeline Parallelism"]
D --> G["Checkpointing or Mixed Precision"]
style A fill:#E1F5FE
style B fill:#C8E6C9
style C fill:#FFF9C4
style D fill:#EDE7F6
style E fill:#E1F5FE
style F fill:#C8E6C9
style G fill:#FFF9C4
1. Data Parallelism ☆
#
Each worker holds a complete model replica and processes a different shard of the mini-batch.