Skip to content

Commit 6ffb475

Browse files
committed
Aligned DiLoCo comparison budgets.
1 parent bcc8073 commit 6ffb475

4 files changed

Lines changed: 16 additions & 12 deletions

File tree

configs/CIFAR10/diloco_resnet18.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ rounds = 20
4949
max_concurrency = 7
5050

5151
# The target accuracy
52-
target_accuracy = 0.8
52+
target_accuracy = 0.9
5353

5454
# Number of local optimizer steps per DiLoCo synchronization.
5555
local_steps_per_round = 500
5656
preserve_optimizer_state = true
5757

5858
# DiLoCo paper inner-optimizer settings.
59-
epochs = 250
60-
batch_size = 512
59+
epochs = 5
60+
batch_size = 10
6161
optimizer = "AdamW"
6262
lr_scheduler = "LambdaLR"
6363

configs/CIFAR10/fedavg_resnet18_diloco_comparison.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ rounds = 20
4141
max_concurrency = 7
4242

4343
# The target accuracy
44-
target_accuracy = 0.8
44+
target_accuracy = 0.9
4545

46-
# Match the DiLoCo paper-style inner optimizer settings used by the DiLoCo run.
46+
# Match the original FedAvg local training shape while keeping 500 optimizer
47+
# steps per round, equal to DiLoCo's H.
4748
epochs = 5
48-
batch_size = 512
49+
batch_size = 10
4950
optimizer = "AdamW"
5051
lr_scheduler = "LambdaLR"
5152

configs/MNIST/diloco_lenet5.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ rounds = 20
4242
max_concurrency = 7
4343

4444
# The target accuracy
45-
target_accuracy = 0.97
45+
target_accuracy = 0.99
4646

4747
# The machine learning model
4848
model_name = "lenet5"
@@ -52,8 +52,8 @@ local_steps_per_round = 500
5252
preserve_optimizer_state = true
5353

5454
# DiLoCo paper inner-optimizer settings.
55-
epochs = 250
56-
batch_size = 512
55+
epochs = 5
56+
batch_size = 32
5757
optimizer = "AdamW"
5858
lr_scheduler = "LambdaLR"
5959

configs/MNIST/fedavg_lenet5_diloco_comparison.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,23 @@ partition_size = 1000
2828
type = "basic"
2929

3030
# The maximum number of training rounds
31-
rounds = 20
31+
rounds = 63
3232

3333
# The maximum number of clients running concurrently
3434
max_concurrency = 7
3535

3636
# The target accuracy
37-
target_accuracy = 0.97
37+
target_accuracy = 0.99
3838

3939
# The machine learning model
4040
model_name = "lenet5"
4141

4242
# Match the DiLoCo paper-style inner optimizer settings used by the DiLoCo run.
43+
# 5 epochs over 1000 samples at batch size 32 gives 160 optimizer steps per
44+
# round. With 63 rounds, FedAvg gets 10,080 local steps, closely matching
45+
# DiLoCo's 20 * H=500 = 10,000-step total budget.
4346
epochs = 5
44-
batch_size = 512
47+
batch_size = 32
4548
optimizer = "AdamW"
4649
lr_scheduler = "LambdaLR"
4750

0 commit comments

Comments
 (0)