This repository implements initial sketches for a Dask parameter server. The reasoning behind this is that Dask should manage the communication required for distributed optimization but leave computation to the favorite library (e.g., PyTorch, Keras).
The implementations in this repository were discussed more in dask/dask-ml#171.
Centralized-PS.ipynb: the main notebook behind this repoRing-all-reduce.ipynb: a very rough draft of an all-reduce strategyinitial-sketches/: initial versions of the centralized and decentralized parameter servers
There are two variants for this:
- a centralized parameter server (PS)
- the PS holds the model
- give workers the model
- tasks workers with calculating gradients
- a decentralized parameter server
- every worker holds the model
- communicate only gradients
| Centralized | Decentralized |
|---|---|
![]() |
![]() |
There are two different variants on the communication scheme:
- Synchronous
- Centralized PS: the PS waits to receive enough gradients before applying them.
- Decentralized PS: all workers communicate their gradients to every other worker (likely via all-reduce)
- Asynchronous
- Centralized PS: the worker applies the gradient as soon as it's received
- Dentralized PS: the workers don't communicate to every other worker
There is a separate issue of blocking writes/reads from the PS.
- Drafts of the implementations in
initial-sketchesare in https://gist.github.com/stsievert/ff8a1df9300a82f15a2704e913469522 - @mrocklin pushed a PS here: https://gist.github.com/mrocklin/e57551e451bd633e13009ccce9c6ff67
- Horovod, a system that works with decentralized with all-reduce.
- Ray parameter server. This simple example implements the simplest centralized PS.
- Distributed Tensorflow: https://www.tensorflow.org/api_docs/python/tf/train/Server
- BigDL, meant for Spark: https://bigdl-project.github.io/0.6.0/#whitepaper/
- MLlib, meant for Spark: https://spark.apache.org/mllib/
- Paleo: https://talwalkarlab.github.io/paleo/. Compares the performance of different models/networks when different all-reduced algorithms are used as the number of workers scale
- Strong scaling is more realistic but is not the default (I come to a ML system with a dataset; my dataset does not grow as I increase my workers).
- DAWNBench: useful benchmarks for deep learning models: https://dawn.cs.stanford.edu/benchmark/ (state of the art; likely not distributed)
I'm more inclined to distributed the computation of gradients. These two algorithms don't do that and are decentralized.
- Hogwild: require async centralized PS, which holds on to a global model and workers go willy-nilly (hence the name)
- Hogwild++: a hogwild variant to HPC systems. Requires a decentralized system that does not have synchronous communication (the workers communicate in a ring structure)
- "Revisiting distributed synchronous SGD" (2017). Examines communication schemes for parameter servers. Promotes using centralized PS and extra workers. Summary in dask/dask-ml#171 (comment)
- Distributed tensorflow implements this architecture: https://www.tensorflow.org/api_docs/python/tf/train/Server: it's centralized synchronous with backup workers; it throws away gradient updates that workers compute if they're too old)
- "Scaling distributed machine learning with the parameter server" (2014).

