<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Distributed Training on Arshad Siddiqui</title><link>https://arshadhs.github.io/tags/distributed-training/</link><description>Recent content in Distributed Training on Arshad Siddiqui</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://arshadhs.github.io/tags/distributed-training/index.xml" rel="self" type="application/rss+xml"/><item><title>M2: Distributed ML Algorithms</title><link>https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/</guid><description>&lt;h1 id="m2-distributed-ml-algorithms">
 M2: Distributed ML Algorithms
 
 &lt;a class="anchor" href="#m2-distributed-ml-algorithms">#&lt;/a>
 
&lt;/h1>
&lt;p>This module applies parallel and distributed computing to ML algorithms. It examines how to divide computation, combine results, and balance communication against useful work during training.&lt;/p>
&lt;p>Module coverage:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Parallel ML Algorithms:&lt;/strong> CNNs, gradient descent and SGD, SVM, k-means, k-nearest neighbours, decision trees, and random forests.&lt;/li>
&lt;li>&lt;strong>Distributed Training Strategies:&lt;/strong> data parallelism, model parallelism, pipeline parallelism, gradient checkpointing, and mixed-precision training.&lt;/li>
&lt;/ul>
&lt;!-- Coverage follows _COURSE_MLSysOps_ZG516.pdf, Content Structure on pages 2–3; topic boundaries follow the Learning Plan on pages 4–5. -->
&lt;h2 id="learning-objectives">
 Learning Objectives
 
 &lt;a class="anchor" href="#learning-objectives">#&lt;/a>
 
&lt;/h2>
&lt;ul>
&lt;li>Decompose ML algorithms into independent and dependent work.&lt;/li>
&lt;li>Explain how local results are aggregated and where communication is required.&lt;/li>
&lt;li>Compare distributed execution through Hadoop and Spark.&lt;/li>
&lt;li>Choose training strategies that address compute and memory constraints.&lt;/li>
&lt;/ul>
&lt;h2 id="pages">
 Pages
 
 &lt;a class="anchor" href="#pages">#&lt;/a>
 
&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th style="text-align: right">Chapter&lt;/th>
 &lt;th>Page&lt;/th>
 &lt;th>Main focus&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td style="text-align: right">4&lt;/td>
 &lt;td>&lt;a href="https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/040-parallelisation-of-ml-algorithms/">Parallelisation of ML Algorithms&lt;/a>&lt;/td>
 &lt;td>Problem decomposition, ensembles, XGBoost, k-means, trees, forests, and SVM&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: right">5&lt;/td>
 &lt;td>&lt;a href="https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/050-communication-aware-distributed-ml/">Communication-Aware Distributed ML&lt;/a>&lt;/td>
 &lt;td>Communication overhead, distributed k-means and k-NN, model parallelism, and SGD&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: right">6&lt;/td>
 &lt;td>&lt;a href="https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/060-clusters-hadoop-and-spark/">Clusters, Hadoop, and Spark&lt;/a>&lt;/td>
 &lt;td>Cluster frameworks, MapReduce k-means, distributed CNNs, and communication reduction&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td style="text-align: right">7&lt;/td>
 &lt;td>&lt;a href="https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/070-distributed-training-strategies/">Distributed Training Strategies&lt;/a>&lt;/td>
 &lt;td>Data, model, and pipeline parallelism, checkpointing, and mixed precision&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="topic-outline">
 Topic Outline
 
 &lt;a class="anchor" href="#topic-outline">#&lt;/a>
 
&lt;/h2>
&lt;h3 id="4-parallelisation-of-ml-algorithms">
 4. Parallelisation of ML Algorithms
 
 &lt;a class="anchor" href="#4-parallelisation-of-ml-algorithms">#&lt;/a>
 
&lt;/h3>
&lt;ul>
&lt;li>Problem decomposition and parallelisation&lt;/li>
&lt;li>Ensemble methods and XGBoost on CPUs&lt;/li>
&lt;li>k-means&lt;/li>
&lt;li>Distributed decision trees and random forests&lt;/li>
&lt;li>Distributed implementations using Spark ML and XGBoost&lt;/li>
&lt;li>Parallel SVM kernel computation using block-wise and MapReduce-style methods&lt;/li>
&lt;/ul>
&lt;h3 id="5-communication-aware-distributed-ml">
 5. Communication-Aware Distributed ML
 
 &lt;a class="anchor" href="#5-communication-aware-distributed-ml">#&lt;/a>
 
&lt;/h3>
&lt;ul>
&lt;li>Communication overhead in distributed algorithms&lt;/li>
&lt;li>Distributed k-means and model parallelism&lt;/li>
&lt;li>k-NN: data partitioning, locality-sensitive hashing, and distributed indexing&lt;/li>
&lt;li>KD-tree and Ball-tree indexing versus brute-force MapReduce&lt;/li>
&lt;li>Accuracy–latency trade-offs in approximate k-NN&lt;/li>
&lt;li>Gradient descent and SGD: mini-batch, synchronous, and asynchronous variants&lt;/li>
&lt;/ul>
&lt;h3 id="6-clusters-hadoop-and-spark">
 6. Clusters, Hadoop, and Spark
 
 &lt;a class="anchor" href="#6-clusters-hadoop-and-spark">#&lt;/a>
 
&lt;/h3>
&lt;ul>
&lt;li>Cluster computing with Hadoop and Spark&lt;/li>
&lt;li>Lloyd&amp;rsquo;s k-means algorithm in MapReduce&lt;/li>
&lt;li>Mini-batch k-means and streaming variants&lt;/li>
&lt;li>Convergence criteria and communication reduction through compressed updates&lt;/li>
&lt;li>CNN data and model parallelism, including layer splitting and tensor slicing&lt;/li>
&lt;li>Mixed precision, pipeline parallelism, and distributed training frameworks&lt;/li>
&lt;/ul>
&lt;h3 id="7-distributed-training-strategies-">
 7. Distributed Training Strategies ☆
 
 &lt;a class="anchor" href="#7-distributed-training-strategies-">#&lt;/a>
 
&lt;/h3>
&lt;ul>
&lt;li>Data parallelism&lt;/li>
&lt;li>Model parallelism&lt;/li>
&lt;li>Pipeline parallelism&lt;/li>
&lt;li>Gradient checkpointing&lt;/li>
&lt;li>Mixed-precision training&lt;/li>
&lt;/ul>
&lt;h2 id="how-this-module-connects">
 How This Module Connects
 
 &lt;a class="anchor" href="#how-this-module-connects">#&lt;/a>
 
&lt;/h2>
&lt;p>Use &lt;a href="https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m1-foundations/">M1: Foundations&lt;/a> to interpret complexity and speedup. Continue to &lt;a href="https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m3-scale-out-systems/">M3: Scale-Out Systems&lt;/a> for the platforms and communication mechanisms that support larger training runs.&lt;/p></description></item><item><title>Distributed Training Strategies</title><link>https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/070-distributed-training-strategies/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arshadhs.github.io/docs/ai/038-ml-system-optimisation/m2-distributed-ml-algorithms/070-distributed-training-strategies/</guid><description>&lt;h1 id="distributed-training-strategies">
 Distributed Training Strategies
 
 &lt;a class="anchor" href="#distributed-training-strategies">#&lt;/a>
 
&lt;/h1>
&lt;p>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.&lt;/p>
&lt;p>Course coverage:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Data parallelism&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Model parallelism&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Pipeline parallelism and micro-batches&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Gradient checkpointing&lt;/strong>&lt;/li>
&lt;li>&lt;strong>Mixed-precision training and loss scaling&lt;/strong>&lt;/li>
&lt;/ol>
&lt;h2 id="learning-objectives">
 Learning Objectives
 
 &lt;a class="anchor" href="#learning-objectives">#&lt;/a>
 
&lt;/h2>
&lt;p>By the end of this page, you should be able to:&lt;/p>
&lt;ul>
&lt;li>compare data, model, and pipeline parallelism&lt;/li>
&lt;li>calculate global batch size, speedup, efficiency, and effective throughput&lt;/li>
&lt;li>explain gradient aggregation through all-reduce&lt;/li>
&lt;li>calculate simple pipeline time and utilisation&lt;/li>
&lt;li>quantify the memory–computation trade-off of checkpointing&lt;/li>
&lt;li>explain mixed precision and loss scaling&lt;/li>
&lt;/ul>
&lt;h2 id="big-picture">
 Big Picture
 
 &lt;a class="anchor" href="#big-picture">#&lt;/a>
 
&lt;/h2>


&lt;pre class="mermaid">
flowchart TD
 A[&amp;#34;Training Constraint&amp;#34;] --&amp;gt; B[&amp;#34;More Data Throughput&amp;#34;]
 A --&amp;gt; C[&amp;#34;Model Too Large&amp;#34;]
 A --&amp;gt; D[&amp;#34;Activation Memory Too High&amp;#34;]
 B --&amp;gt; E[&amp;#34;Data Parallelism&amp;#34;]
 C --&amp;gt; F[&amp;#34;Model or Pipeline Parallelism&amp;#34;]
 D --&amp;gt; G[&amp;#34;Checkpointing or Mixed Precision&amp;#34;]

 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
&lt;/pre>

&lt;h2 id="1-data-parallelism-">
 1. Data Parallelism ☆
 
 &lt;a class="anchor" href="#1-data-parallelism-">#&lt;/a>
 
&lt;/h2>
&lt;p>Each worker holds a complete model replica and processes a different shard of the mini-batch.&lt;/p></description></item></channel></rss>