Преглед на файлове

restore benchmark defaults

Denis Mazur преди 4 години
родител
ревизия
e3161f37cd
променени са 2 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 1 1
      benchmarks/benchmark_throughput.py
  2. 4 2
      benchmarks/benchmark_throughput_p2p.py

+ 1 - 1
benchmarks/benchmark_throughput.py

@@ -233,4 +233,4 @@ if __name__ == "__main__":
     elif args.preset == "nop":
         benchmark_throughput(expert_cls="nop", backprop=False, num_batches_per_client=args.num_batches_per_client)
     else:
-        raise ValueError(f"No such benchmark preset: {args.preset}")
+        raise ValueError(f"No such benchmark preset: {args.preset}")

+ 4 - 2
benchmarks/benchmark_throughput_p2p.py

@@ -40,7 +40,9 @@ def client_process(
 ) -> None:
     torch.set_num_threads(1)
     can_start.wait()
-    experts = [hivemind.RemoteExpert(f"expert.{i}", server_peer_info=server_peer_info) for i in range(num_experts)]
+    experts = [
+        hivemind.RemoteExpert(f"expert.{i}", server_peer_info=server_peer_info) for i in range(num_experts)
+    ]
 
     try:
         dummy_batch = torch.randn(batch_size, hid_dim)
@@ -61,7 +63,7 @@ def benchmark_throughput(
     num_batches_per_client=16,
     expert_cls="ffn",
     hid_dim=1024,
-    batch_size=16,
+    batch_size=2048,
     max_batch_size=None,
     backprop=True,
     device=None,