1. A method comprising: determining, by a device, that a machine learning model is to be trained by a plurality of devices in a network; identifying a set of training devices from among the plurality of devices in the network to train the machine learning model, wherein each of the training devices has a local set of training data; sending an instruction to each of the training devices, wherein the instruction is configured to cause a training device to receive model parameters from a first training device in the set, use the received model parameters with at least a portion of the local set of training data to generate new model parameters, and forward the new model parameters to a second training device in the set; and receiving model parameters from the training devices that have been trained using a global set of training data comprising the local sets of training data on the training devices.