Use the parameter server pattern to train a model whose parameters cannot fit on one machine. Dedicated parameter servers store and update designated model partitions, while worker nodes consume dataset partitions, calculate gradients, and send updates to the server holding the relevant partition. section 1.3.2 section 3.2.2
Multiple parameter servers divide parameter storage, and workers asynchronously compute gradients from their assigned data before updating a model partition. section 3.2.2
A typical distributed flow is:
- Partition the model across one or more parameter servers when a single server cannot hold all parameters. section 3.2.2
- Assign each worker a subset of training data and let it perform neural-network calculations independently. section 3.2.2
- Send calculated gradients to the parameter server responsible for the target model partition. section 3.2.2
- Return updated model partitions to workers so later calculations can use current parameters. section 3.3.2
Large video-tagging model
A LeNet-based classifier for tagging new YouTube videos begins with one parameter server and multiple workers. As the model gains layers and parameters beyond one server’s capacity, split its parameters across additional servers; workers calculate gradients from data subsets and update the corresponding partitions. section 3.2.2 section 7.3.1
Asynchronous computation lets workers perform heavy calculations without continuously communicating with one another, but server communication can become the limiting cost. Concurrent gradient pushes and pulls can block; gradients computed from stale partitions may be dropped or retained depending on the cost of recomputation and their possible effect on the trained model. Uneven partition sizes can amplify the impact of stale updates. section 3.2.2 section 3.3.2 section 7.3.2
Choose this pattern for large, complex models that require distributed parameter storage. For small or medium-sized models that fit on a machine, communication with parameter servers may outweigh computation; collective communication instead lets every worker store a complete model copy and can improve training performance. section 3.4 section 3.6 section 7.3.2
