A method performed by a group of target devices, the group of target devices comprising one or more target devices, each target device of the group of target devices being communicatively connected to a parameter server that stores a master copy of an artificial intelligence (AI) model, the group of target devices being configured to run an instance of the AI model, a first target device of the group of target devices comprising an integrated circuit chip having an on-chip memory of a size less than an entirety of the AI model, the first target device comprising a downloader, a data manager, and an executer, the method comprising, by the first target device:
- downloading, by the downloader, a portion of the AI model from the parameter server, a size of the portion being based at least on the on-chip memory size and a size of one or more layers of the AI model;
- storing, by the data manager, a set of microbatches of a dataset;
- executing, by the executer and via the integrated circuit chip, the set of microbatches on a first subportion of the downloaded portion of the AI model stored in the on-chip memory to generate activations;
- and
- downloading, by the downloader, weights for a second subportion of the downloaded portion of the AI from the parameter server.