Skip to content

Commit

Permalink
[OPT] Improve benchmark results (#163)
Browse files Browse the repository at this point in the history
* [REF] Increase batch sizes, update results with more efficient matvecs

* [ADD] Update benchmark figures
  • Loading branch information
f-dangel authored Jan 1, 2025
1 parent 75bc0a8 commit 4bed707
Show file tree
Hide file tree
Showing 69 changed files with 68 additions and 68 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 2.821939468383789}
{"peakmem": 5.408483028411865}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 8.144813060760498}
{"peakmem": 12.137713432312012}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.9029364585876465}
{"peakmem": 6.572415828704834}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 14.977922916412354}
{"peakmem": 18.18963098526001}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 2.821939468383789}
{"peakmem": 5.408483028411865}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 8.144813060760498}
{"peakmem": 12.137713432312012}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.9029364585876465}
{"peakmem": 6.572415828704834}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 14.97962474822998}
{"peakmem": 18.191569328308105}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 2.821939468383789}
{"peakmem": 5.408483028411865}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 14.854530334472656}
{"peakmem": 15.885180950164795}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.9029364585876465}
{"peakmem": 6.572415828704834}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 23.27983283996582}
{"peakmem": 27.734885215759277}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 2.8216772079467773}
{"peakmem": 5.4073052406311035}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.334245204925537}
{"peakmem": 5.881683826446533}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.238542079925537}
{"peakmem": 5.785980701446533}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.6108012199401855}
{"peakmem": 6.280280590057373}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 4.11228084564209}
{"peakmem": 6.78189754486084}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.795565605163574}
{"peakmem": 6.465182304382324}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 2.8216772079467773}
{"peakmem": 5.4073052406311035}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.334245204925537}
{"peakmem": 5.881683826446533}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.238542079925537}
{"peakmem": 5.785980701446533}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.6108012199401855}
{"peakmem": 6.280280590057373}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 4.11228084564209}
{"peakmem": 6.78189754486084}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.795565605163574}
{"peakmem": 6.465182304382324}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 2.821939468383789}
{"peakmem": 5.408483028411865}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 8.144932270050049}
{"peakmem": 12.137951850891113}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 3.9029364585876465}
{"peakmem": 6.572415828704834}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"peakmem": 15.361834049224854}
{"peakmem": 18.95720911026001}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.07914857612922788}
{"time": 0.15138799278065562}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.4040485708974302}
{"time": 0.7856894689612091}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0602641850709915e-05}
{"time": 1.046992838382721e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.12177057890221477}
{"time": 0.23390081012621522}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.40884994994848967}
{"time": 0.7778741386719048}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0384712368249893e-05}
{"time": 1.039775088429451e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.07911323523148894}
{"time": 0.15136110922321677}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.4040556410327554}
{"time": 0.785682977642864}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0679941624403e-05}
{"time": 1.0511837899684906e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.12210974702611566}
{"time": 0.23344802716746926}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.41015551099553704}
{"time": 0.7820523148402572}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0590068995952606e-05}
{"time": 1.0339077562093735e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.07917527668178082}
{"time": 0.15139471692964435}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.43220572592690587}
{"time": 0.8380271531641483}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0847114026546478e-05}
{"time": 1.0468997061252594e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.12290711421519518}
{"time": 0.2342886170372367}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.564610986970365}
{"time": 1.065617433283478}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0426156222820282e-05}
{"time": 1.0298099368810654e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.07193620782345533}
{"time": 0.13708342146128416}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.012802004348486662}
{"time": 0.01288953935727477}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.18157002329826355}
{"time": 0.34895477583631873}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.11208314076066017}
{"time": 0.21410065283998847}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.03331297682598233}
{"time": 0.03307039197534323}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.18883356265723705}
{"time": 0.35276420041918755}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.07191778579726815}
{"time": 0.1371102319099009}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.011812383774667978}
{"time": 0.011814852245151997}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.17920332308858633}
{"time": 0.3489605807699263}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.11182996584102511}
{"time": 0.21611323999240994}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.03477561008185148}
{"time": 0.03479210985824466}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.18182456912472844}
{"time": 0.34671181719750166}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.07917376700788736}
{"time": 0.15134236635640264}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.40426155366003513}
{"time": 0.7858486091718078}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.057703047990799e-05}
{"time": 1.0366085916757584e-05}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.12174207577481866}
{"time": 0.2342790300026536}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 0.4763146941550076}
{"time": 0.9123296132311225}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"time": 1.0615214705467224e-05}
{"time": 1.0463874787092209e-05}
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions docs/examples/basic_usage/benchmark_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ def forward(self, x: Tensor) -> Tensor:


def setup_synthetic_shakespeare_nanogpt(
batch_size: int = 2,
batch_size: int = 4,
) -> Tuple[GPTWrapper, CrossEntropyLoss, List[Tuple[Tensor, Tensor]]]:
"""Set up the nanoGPT model and synthetic Shakespeare dataset for the benchmark.

Args:
batch_size: The batch size to use. Default is ``2``.
batch_size: The batch size to use. Default is ``4``.

Returns:
A tuple containing the nanoGPT model, the loss function, and the data.
Expand Down Expand Up @@ -98,12 +98,12 @@ def setup_synthetic_shakespeare_nanogpt(


def setup_synthetic_imagenet_resnet50(
batch_size: int = 32,
batch_size: int = 64,
) -> Tuple[Module, CrossEntropyLoss, List[Tuple[Tensor, Tensor]]]:
"""Set up ResNet50 on synthetic ImageNet for the benchmark.

Args:
batch_size: The batch size to use. Default is ``32``.
batch_size: The batch size to use. Default is ``64``.

Returns:
A tuple containing the ResNet50 model, the loss function
Expand Down

0 comments on commit 4bed707

Please sign in to comment.