Repertory for It Takes Two: Accelerating Accurate Federated Learning through Pipelined Intra-Batch Data Sampling and Training
- CPU: AMD Ryzen 9 7950X 16-Core Processor
- GPU: NVIDIA 4090 * 2
- Memory: 128GB DDR5 5600MHz
- System: Ubuntu 20.04.6 LTS
- NVIDIA Driver Version: 550.135
- CUDA Driver Version: 12.1
- Pytorch: 2.5.1
- Python3: 3.12.7
-
The FL training framework consists of one server, one trainer, and multiple clients. The clients store client-specific attributes, such as data indices and local model parameters. In each global epoch, the trainer sequentially performs the local training for the selected clients. The duration of each global epoch is determined by the slowest client.
-
All simulation startup commands are stored in
start.sh -
Before running all FL experiments, make sure to execute the data generation commands. These commands are also included in the script file.
The dataset is stored in the FedTT/data/cifar100 directory.
For the cinic-10 dataset, we merge its train and valid sets to obtain a larger training set, which is then partitioned across different clients.
- Put the
CINIC-10.tar.gzfile into theFedTT/data/cinic10/rawdirectory. - Execute the following commands:
cd ./data/cinic10/raw
tar -zxvf CINIC-10.tar.gz
cd ../../utils
python3 split_cinic10.py- Download the SNLI 1.0 and glove.840B.300d.zip to the
FedTT/data/snlidirectory. - Execute the following commands:
cd ./data/snli
unzip snli.zip -d . && mv ./snli_1.0/* . && rm -rf snli_1.0
cd ../utils
python3 snli.pyDownload these six sub-datasets to the FedTT/data/domainnet, unzip these, and put the .txts to the FedTT/data/domainnet/splits.
- All testbed experiment startup commands are stored in
start_on_device.sh - You need to change the server IP address and port in the algorithm configuration file under the
FedTT/on_device/configdirectory.
- Hardware: MTT S4000 (48 GB) with a Xeon Gold 6430 CPU and 100 GB DDR4 memory.
- Software: Ubuntu 22.04 with Python 3.10 and PyTorch 2.2.0; the MUSA version is 3.1.0.
code in ./server/fedavg_musa.py and ./server/FedTT_musa.py