liveBook · Manning

Gradient

As explained in Distributed Machine Learning Patterns

A gradient is a vector of partial derivatives that indicates how a function changes with respect to its parameters.

A gradient is a vector of partial derivatives indicating how a function changes with respect to its parameters. In distributed training, each worker calculates gradients from its data partition and uses them to update model parameters. section 7.3.2 section 1.1.2

Workers can send calculated gradients to parameter servers holding model partitions, allowing training when the model cannot fit on one machine. Asynchronous updates improve parallelism but can use stale parameters, block competing workers, and create communication bottlenecks. section 7.3.2

Distributed gradient updates require decisions about coordination and resource layout:

  • Parallel workers shorten training time by processing separate data partitions without waiting for one another. section 1.1.2
  • Concurrent updates create trade-offs involving completion time, data quality, model quality, and computational efficiency. section 1.1.2
  • Parameter-server deployments must balance worker count against parameter-server count to avoid communication bottlenecks. section 7.3.2
Figure 7.9 A machine learning training component with multiple parameter servers
07-09

Shows workers sending calculated gradients to model partitions stored across multiple parameter servers. section 7.3.2

Figure 7.10 Distributed model training component with only worker nodes, where every worker stores a copy of the entire set of model parameters and consumes partitions of data to calculate the gradients
07-10

Shows the alternative worker-only arrangement, where every worker stores the full model and calculates gradients from a data partition. section 7.3.2

How Distributed Machine Learning Patterns covers it

How deep it goes
Explains gradients through worker computation and communication, but stops short of mathematical derivation or optimization internals.
Examples
Uses parameter-server architecture, worker-only replication, and Fashion-MNIST training to illustrate gradient calculation and updating.
What it assumes
Assumes familiarity with model training, workers, data partitions, and model parameters.
What you can do after
Apply it via distributed training by assigning data partitions to workers and coordinating their gradient-based model updates.
How it connects
Connects gradients with data partitions, workers, model parameters, parameter servers, and distributed training.

Also explained in

Compare how 20 books explain gradient →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Distributed Machine Learning Patterns. The section links point to the parts of the book it draws on.