Large-Scale AI Engineering — lecture notes

see full notes in the pdf. I will at some point update this with the latest notes.

Clariden is the Swiss AI partition of the Alps supercomputer at CSCS

Lecture 2: #

Super computer: 4-6 years also called HPC (high performance computing)

  • Used for tasks that require large compute or memory
  • Huge energy consumption
  • HPC Parts:
    • Compute nodes, interconnect network, storage system, cooling system, power supply system, software stack
  • Networking: Latency, Bandwidth, Radix (Ports)
  • Storage: Petabytes of data, high throughput and reliability, parallel file systems, Lustre (open source), GPFS (IBM)
  • Providers: Hyperscalers, Neoclouds (AI workload) SLURM Workload Manager
  • Open source cluster management and job scheduling system for linux clusters

Lecture 3 #

Supercomputer lecture by CSCS

Lecture 4 #

Communication overhead

Weak scaling law: increase batch size when increasing nodes

Model Flops utilization: 30-50%, measure how well configured your system is

Different types of collective communication

Torch.distributed commands

Performance Analysis

Lecture 5 #

Batch size: Gradient accumulation

Activation Recomputation: only save parts to reduce memory consumption

Data parallelize:

Model Parallelize:

  • Tensor parallel with column & row

  • Attention

Lecture 6 #

Mixture of Expert Models

Efficient Models

Attention variations: to reduce large attention matrix

Associative RNNs