Mayank022 commited on
Commit
5f280b0
·
verified ·
1 Parent(s): 1e98ee2

Add files using upload-large-folder tool

Browse files
Files changed (32) hide show
  1. .gitattributes +1 -0
  2. README.md +90 -0
  3. chapter-04-efficient-and-scalable-vision-transformers/EXPERIMENT_REPORT.md +661 -0
  4. chapter-04-efficient-and-scalable-vision-transformers/README.md +184 -0
  5. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/SHA256SUMS +13 -0
  6. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/convnext-t/standard/seed-42/model.safetensors +3 -0
  7. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-42/model.safetensors +3 -0
  8. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-43/model.safetensors +3 -0
  9. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-44/model.safetensors +3 -0
  10. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-42/model.safetensors +3 -0
  11. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-43/model.safetensors +3 -0
  12. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-44/model.safetensors +3 -0
  13. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-42/model.safetensors +3 -0
  14. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-43/model.safetensors +3 -0
  15. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-44/model.safetensors +3 -0
  16. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/efficientformer-l1/standard/seed-42/model.safetensors +3 -0
  17. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/swin-t/standard/seed-42/model.safetensors +3 -0
  18. chapter-04-efficient-and-scalable-vision-transformers/checkpoints/vit-s16/standard/seed-42/model.safetensors +3 -0
  19. chapter-04-efficient-and-scalable-vision-transformers/configs/full.yaml +53 -0
  20. chapter-04-efficient-and-scalable-vision-transformers/manifest.json +330 -0
  21. chapter-04-efficient-and-scalable-vision-transformers/results/aggregate_results.csv +8 -0
  22. chapter-04-efficient-and-scalable-vision-transformers/results/benchmark.json +529 -0
  23. chapter-04-efficient-and-scalable-vision-transformers/results/distillation_gains.csv +4 -0
  24. chapter-04-efficient-and-scalable-vision-transformers/results/epoch_metrics.csv +261 -0
  25. chapter-04-efficient-and-scalable-vision-transformers/results/figures/accuracy_throughput.png +0 -0
  26. chapter-04-efficient-and-scalable-vision-transformers/results/figures/distillation_gain.png +0 -0
  27. chapter-04-efficient-and-scalable-vision-transformers/results/figures/validation_accuracy.png +3 -0
  28. chapter-04-efficient-and-scalable-vision-transformers/results/inference_benchmark.csv +25 -0
  29. chapter-04-efficient-and-scalable-vision-transformers/results/model_profiles.csv +7 -0
  30. chapter-04-efficient-and-scalable-vision-transformers/results/report.md +57 -0
  31. chapter-04-efficient-and-scalable-vision-transformers/results/report_summary.json +126 -0
  32. chapter-04-efficient-and-scalable-vision-transformers/results/run_results.csv +14 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ chapter-04-efficient-and-scalable-vision-transformers/results/figures/validation_accuracy.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - book
6
+ - computer-vision
7
+ - transformers
8
+ - pytorch
9
+ - reproducibility
10
+ ---
11
+
12
+ # Transformer Vision: From Image, Video to World Models & Robotics — Book
13
+
14
+ This repository is the model-artifact companion to the technical book **Transformer Vision: From
15
+ Image, Video to World Models & Robotics**. It keeps the book's trained weights, experiment
16
+ configuration, evaluation tables, and usage notes together without pretending that every chapter
17
+ uses one interchangeable model architecture.
18
+
19
+ ## Why the repository is organized by chapter
20
+
21
+ Each chapter asks a different technical question and may use a different architecture, dataset,
22
+ checkpoint format, preprocessing pipeline, or output type. Chapter-level folders create a stable
23
+ boundary around those differences:
24
+
25
+ ```text
26
+ chapter-NN-short-title/
27
+ ├── README.md # chapter-specific model card and usage
28
+ ├── configs/ # resolved experiment configuration
29
+ ├── checkpoints/ # model, treatment, and seed subfolders
30
+ ├── results/ # metrics, profiles, and figures
31
+ ├── EXPERIMENT_REPORT.md # interpreted experiment narrative
32
+ └── manifest.json # machine-readable provenance
33
+ ```
34
+
35
+ Inside a chapter, checkpoint folders are further separated by model, training treatment, and seed.
36
+ This prevents a ViT checkpoint from being confused with a Swin, language, video, world-model, or
37
+ robotics checkpoint from another part of the book.
38
+
39
+ ## Available chapters
40
+
41
+ | Chapter | Artifact folder | Status |
42
+ | --- | --- | --- |
43
+ | 4 — Efficient and scalable vision transformers | [`chapter-04-efficient-and-scalable-vision-transformers`](chapter-04-efficient-and-scalable-vision-transformers) | Complete |
44
+
45
+ Folders for other chapters will be added only after their experiments and validation are complete.
46
+ Empty placeholder folders are intentionally avoided.
47
+
48
+ ## Download one chapter
49
+
50
+ Using the Hugging Face CLI:
51
+
52
+ ```bash
53
+ hf download \
54
+ Mayank022/Transformer-Vision-From-Image-Video-to-World-Models-and-Robotics-Book \
55
+ --include "chapter-04-efficient-and-scalable-vision-transformers/*" \
56
+ --local-dir transformer-vision-book
57
+ ```
58
+
59
+ Readers who need only one seed can download a single file with `hf_hub_download`; each chapter card
60
+ contains exact examples.
61
+
62
+ ## File-format policy
63
+
64
+ Published inference weights use **Safetensors**. They contain the model state only and exclude
65
+ optimizer, scheduler, gradient-scaler, and random-number-generator state. This makes the public
66
+ artifact smaller and avoids pickle execution during weight loading. Full resumable training
67
+ checkpoints remain in the experiment's controlled storage and are not required for inference.
68
+
69
+ Every chapter includes SHA-256 checksums and a JSON manifest connecting each exported file to:
70
+
71
+ - the exact upstream checkpoint identifier;
72
+ - architecture and training mode;
73
+ - random seed and selected epoch;
74
+ - validation and test metrics;
75
+ - configuration fingerprint; and
76
+ - the checksum of the original training checkpoint.
77
+
78
+ ## Important scope note
79
+
80
+ This is a **multi-model book archive**, not a single `from_pretrained()` repository. Always open the
81
+ README inside the relevant chapter before loading a file. Model construction and preprocessing are
82
+ chapter-specific.
83
+
84
+ ## License and attribution
85
+
86
+ The repository contains fine-tuned derivatives of upstream research checkpoints. Each chapter lists
87
+ the exact upstream model identifiers and papers. Before making a new public redistribution or a
88
+ commercial derivative, review the applicable upstream model and dataset terms. The book's
89
+ documentation does not replace those licenses.
90
+
chapter-04-efficient-and-scalable-vision-transformers/EXPERIMENT_REPORT.md ADDED
@@ -0,0 +1,661 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # What actually wins under a fixed vision-transformer budget?
2
+
3
+ ## A controlled CIFAR-100 study of ViT, DeiT, Swin, EfficientFormer, and distillation
4
+
5
+ This report records the completed experiment for the chapter project **Efficient and Scalable
6
+ Vision Transformers**. The goal was not to reproduce a collection of headline numbers from model
7
+ cards. It was to put several important architecture and training ideas into the same experimental
8
+ frame: the same image-classification task, the same train/validation/test policy, the same
9
+ fine-tuning budget, and the same inference hardware.
10
+
11
+ The result is a practical answer rather than a universal leaderboard. On this task, a small plain
12
+ ViT was already an excellent L4 throughput baseline; Swin's hierarchy did not make it faster;
13
+ EfficientFormer dramatically reduced parameter count and MACs but gave up accuracy; and active
14
+ hard distillation produced a small, repeatable accuracy gain at training time without changing
15
+ deployment cost. Just as importantly, the benchmark showed why parameter count, theoretical
16
+ operations, latency, and throughput must be measured separately.
17
+
18
+ > **Experiment status:** complete. All 13 training runs reached 20 epochs, all 24 inference cases
19
+ > completed, the report artifacts were generated, and all 13 validation-selected checkpoints were
20
+ > downloaded and verified locally.
21
+
22
+ ---
23
+
24
+ ## Contents
25
+
26
+ - [Executive summary](#executive-summary)
27
+ - [1. Objective and research questions](#1-objective-and-research-questions)
28
+ - [2. Models and why they were selected](#2-models-and-why-they-were-selected)
29
+ - [3. Experimental design](#3-experimental-design)
30
+ - [4. How the experiment was executed](#4-how-the-experiment-was-executed)
31
+ - [5. Accuracy and training results](#5-accuracy-and-training-results)
32
+ - [6. What did distillation buy?](#6-what-did-distillation-buy)
33
+ - [7. Parameters and operation counts](#7-parameters-and-operation-counts)
34
+ - [8. Inference benchmark](#8-inference-benchmark)
35
+ - [9. Interpretation by model family](#9-interpretation-by-model-family)
36
+ - [10. Decision guide](#10-decision-guide)
37
+ - [11. Threats to validity and limitations](#11-threats-to-validity-and-limitations)
38
+ - [12. Reproducibility record and artifact map](#12-reproducibility-record-and-artifact-map)
39
+ - [13. Reproducing the experiment](#13-reproducing-the-experiment)
40
+ - [14. Loading a downloaded checkpoint](#14-loading-a-downloaded-checkpoint)
41
+ - [15. Final takeaway](#15-final-takeaway)
42
+ - [16. Primary references](#16-primary-references)
43
+
44
+ ## Executive summary
45
+
46
+ - **Best single-run test accuracy:** hard-distilled DeiT-S/16, seed 42, at **89.83%** top-1.
47
+ - **Best multi-seed transformer result:** hard-distilled DeiT-S/16 at
48
+ **89.72% ± 0.11** top-1 across three seeds.
49
+ - **Best single-seed reference row:** ConvNeXt-T at **89.78%**, although its one run does not
50
+ provide an uncertainty estimate.
51
+ - **Controlled distillation result:** hard KD improved Distilled DeiT by **+0.09, +0.40, and
52
+ +0.30 percentage points** for seeds 42, 43, and 44. The mean paired gain was **+0.26 points**.
53
+ - **Fastest FP16 batch-64 result on the NVIDIA L4:** ViT-S/16 at approximately
54
+ **1,995 images/s**. DeiT-S/16 and Distilled DeiT were effectively in the same throughput band.
55
+ - **Smallest candidate:** EfficientFormer-L1 at **11.48M parameters** and **1.32 GMACs**. It
56
+ reached **86.83%** top-1 and about **1,961 FP16 images/s** at batch 64.
57
+ - **Most expensive model in this training setup:** Swin-T, at about **60.5 minutes** per run and
58
+ **4.84 GB** peak CUDA allocator memory. It also had the lowest measured FP16 throughput.
59
+ - **Most useful systems lesson:** MACs did not predict the runtime ordering. EfficientFormer used
60
+ roughly 69% fewer measured MACs than ViT, yet their FP16 batch-64 throughput was nearly the same
61
+ on this GPU.
62
+
63
+ These findings are specific to this dataset, software stack, and NVIDIA L4. They are evidence for
64
+ how to make a deployment decision, not proof that one architecture always dominates another.
65
+
66
+ ## 1. Objective and research questions
67
+
68
+ The project asks one central question:
69
+
70
+ > When data, fine-tuning budget, input resolution, evaluation rules, and hardware are held as
71
+ > constant as practical, what do ViT, DeiT, Swin, and a compact efficient model trade in accuracy,
72
+ > training behavior, model size, operation count, memory, latency, and throughput?
73
+
74
+ That question is divided into six measurable subquestions:
75
+
76
+ 1. How competitive is a plain global-attention ViT after transfer learning on a modest dataset?
77
+ 2. Does active teacher distillation improve a distilled DeiT when architecture, seed, and data are
78
+ held fixed?
79
+ 3. Does Swin's windowed hierarchical design translate into lower memory use or higher throughput in
80
+ this implementation?
81
+ 4. How much accuracy does a compact EfficientFormer exchange for fewer parameters and MACs?
82
+ 5. Do MAC counts predict real latency and throughput?
83
+ 6. Which conclusions survive a multi-seed comparison, and which remain tentative single-seed
84
+ observations?
85
+
86
+ The project fine-tunes pretrained models. It does **not** train these architectures from scratch.
87
+ That choice matches the workflow most readers will use when compute and labeled data are limited.
88
+
89
+ ## 2. Models and why they were selected
90
+
91
+ | Project alias | Exact `timm` checkpoint | Role in the chapter |
92
+ | --- | --- | --- |
93
+ | `vit` | `vit_small_patch16_224.augreg_in1k` | Plain global-attention baseline |
94
+ | `deit` | `deit_small_patch16_224.fb_in1k` | Data-efficient ViT recipe |
95
+ | `deit_distilled` | `deit_small_distilled_patch16_224.fb_in1k` | Controlled standard-versus-hard-KD comparison |
96
+ | `swin` | `swin_tiny_patch4_window7_224.ms_in1k` | Shifted-window hierarchical transformer |
97
+ | `efficientformer` | `efficientformer_l1.snap_dist_in1k` | Compact, latency-oriented candidate |
98
+ | `convnext` | `convnext_tiny.fb_in1k` | CNN-style reference and frozen teacher |
99
+
100
+ These are checkpoint-level comparisons: an architecture, its upstream training recipe, and its
101
+ published weights arrive together in practice. For that reason, a broad ViT-versus-DeiT comparison
102
+ cannot isolate one causal mechanism. The narrower Distilled DeiT experiment can: standard and
103
+ hard-KD runs use the same student architecture, initialization family, split, and seeds; only the
104
+ teacher loss changes.
105
+
106
+ The model selection also separates **load-bearing ideas** from a larger paper map:
107
+
108
+ - ViT supplies patch tokens and global self-attention.
109
+ - DeiT shows that the training recipe and teacher supervision can matter as much as a new block.
110
+ - Swin supplies local windows, shifted-window communication, patch merging, and a feature hierarchy.
111
+ - EfficientFormer represents compact, latency-oriented hybrid design.
112
+ - ConvNeXt provides a strong modern convolutional reference and a teacher whose inference graph is
113
+ not needed after student training.
114
+
115
+ MobileViT, TinyViT, and MaxViT remain valuable related work, but adding every family would make this
116
+ chapter project slower and less controlled. The selected set is large enough to expose the central
117
+ trade-offs while remaining reproducible within a few hours of rented GPU time.
118
+
119
+ ## 3. Experimental design
120
+
121
+ ### 3.1 Dataset and split discipline
122
+
123
+ The task is CIFAR-100 classification. CIFAR-100 contains 100 classes and 32×32 source images. The
124
+ official 50,000-image training split was divided once, with split seed `2027`, into:
125
+
126
+ - **45,000 training images:** 450 images per class;
127
+ - **5,000 validation images:** 50 images per class; and
128
+ - **10,000 test images:** the untouched official test split.
129
+
130
+ Every run used exactly these indices. Checkpoint selection used validation accuracy only, with
131
+ validation loss as the tie-breaker. The official test split was evaluated after training and was not
132
+ used for early stopping or hyperparameter selection. This separation matters: repeatedly choosing
133
+ settings from test accuracy would turn the test set into another validation set.
134
+
135
+ All inputs were resized to 224×224 to match the pretrained checkpoints. Training augmentation was:
136
+
137
+ 1. random 32×32 crop with four pixels of reflected padding;
138
+ 2. random horizontal flip;
139
+ 3. RandAugment with `num_ops=2` and `magnitude=9`;
140
+ 4. bicubic resize to 224×224;
141
+ 5. checkpoint-native normalization; and
142
+ 6. random erasing with probability `0.25`.
143
+
144
+ Validation and test preprocessing was deterministic: resize followed by the same checkpoint-native
145
+ normalization. Resizing a 32×32 dataset to 224×224 is intentionally a transfer-learning exercise;
146
+ it should not be confused with evidence from naturally high-resolution data.
147
+
148
+ ### 3.2 Run matrix
149
+
150
+ The complete preset contains 13 training runs:
151
+
152
+ | Model and mode | Seeds | Runs | Purpose |
153
+ | --- | --- | ---: | --- |
154
+ | ConvNeXt-T, standard | 42 | 1 | Teacher and CNN reference |
155
+ | ViT-S/16, standard | 42 | 1 | Plain ViT baseline |
156
+ | Swin-T, standard | 42 | 1 | Hierarchical/windowed baseline |
157
+ | EfficientFormer-L1, standard | 42 | 1 | Compact candidate |
158
+ | DeiT-S/16, standard | 42, 43, 44 | 3 | Multi-seed DeiT estimate |
159
+ | Distilled DeiT-S/16, standard | 42, 43, 44 | 3 | No active teacher during fine-tuning |
160
+ | Distilled DeiT-S/16, hard KD | 42, 43, 44 | 3 | Paired active-distillation treatment |
161
+
162
+ Only the DeiT family received three seeds because the controlled distillation question is the main
163
+ training ablation. The other model rows are useful engineering observations, but one seed cannot
164
+ support strong claims about small accuracy differences.
165
+
166
+ ### 3.3 Fine-tuning recipe
167
+
168
+ All runs used the `full` preset:
169
+
170
+ | Setting | Value |
171
+ | --- | --- |
172
+ | Epochs | 20 |
173
+ | Batch size | 64 |
174
+ | Optimizer | AdamW |
175
+ | Pretrained backbone learning rate | `5e-5` |
176
+ | Classification-head learning rate | `5e-4` |
177
+ | Weight decay | `0.05` |
178
+ | Schedule | 2-epoch warmup, then cosine decay |
179
+ | Minimum learning rate | `1e-6` |
180
+ | Label smoothing | `0.1` |
181
+ | Gradient clipping | `1.0` |
182
+ | Automatic mixed precision | Enabled |
183
+ | Input size | 224×224 |
184
+
185
+ The 10× higher head learning rate lets the new 100-class classifier adapt more quickly while
186
+ preserving useful pretrained features. Each checkpoint contains the model, optimizer, scheduler,
187
+ random-number-generator, and data-generator state, so an interrupted run can resume without silently
188
+ changing its planned data order.
189
+
190
+ ### 3.4 Hard distillation
191
+
192
+ The ConvNeXt-T teacher was fine-tuned first and then frozen. During a hard-KD student run, the
193
+ teacher's predicted class becomes a target for the distillation head. With `alpha = 0.5`, the loss is
194
+
195
+ \[
196
+ \mathcal{L} = (1-\alpha)\,\mathcal{L}_{\text{class}}
197
+ + \alpha\,\mathcal{L}_{\text{teacher}}.
198
+ \]
199
+
200
+ The teacher is in evaluation mode and receives no gradients. At student evaluation time, the class
201
+ and distillation-head predictions are averaged. The teacher adds work only while training; it is not
202
+ part of the deployed student.
203
+
204
+ ### 3.5 How to read the metrics
205
+
206
+ | Metric | Meaning in this report |
207
+ | --- | --- |
208
+ | Top-1 accuracy | Percentage for which the highest-scoring class is correct |
209
+ | Top-5 accuracy | Percentage for which the correct class appears among the five highest scores |
210
+ | Best validation accuracy | Selection metric used to choose `best.pt`; not the final test score |
211
+ | Parameters | Live parameter count after replacing the classifier with a 100-class head |
212
+ | GMACs | Traced multiply-accumulate estimate for one 224×224 image |
213
+ | Peak memory | Maximum PyTorch accelerator allocator usage inside the measured operation |
214
+ | Batch latency | Synchronized time for one complete model forward pass at the stated batch size |
215
+ | Images per second | `batch_size × 1000 / mean_latency_ms`; higher is better |
216
+
217
+ Accuracy measures predictive quality; parameters approximate storage capacity; MACs approximate
218
+ work; and latency and throughput measure the realized implementation. They answer different
219
+ questions and should not be collapsed into one vague notion of “efficiency.”
220
+
221
+ ## 4. How the experiment was executed
222
+
223
+ The final run used Modal with a persistent volume named
224
+ `vision-transformer-benchmark-data`. The successful artifacts live remotely under
225
+ `/artifacts/full` and have also been copied into this repository where noted below.
226
+
227
+ | Provenance field | Recorded value |
228
+ | --- | --- |
229
+ | Completion date | 16 August 2026 |
230
+ | Modal app ID | `ap-731KstAj4aSwjYegWlbGfo` |
231
+ | State at handoff | Stopped; zero running tasks |
232
+ | Training/benchmark accelerator | NVIDIA L4 |
233
+ | Persistent volume | `vision-transformer-benchmark-data` |
234
+ | Remote result root | `/artifacts/full` |
235
+ | Local result root | `modal_full_results_20260816` |
236
+
237
+ Execution was staged deliberately:
238
+
239
+ 1. Train the ConvNeXt teacher first.
240
+ 2. Launch the remaining student jobs with bounded concurrency of at most four NVIDIA L4
241
+ containers.
242
+ 3. Benchmark every architecture sequentially in one L4 container, so devices are not mixed within
243
+ the timing table.
244
+ 4. Generate CSV tables, figures, and the machine-generated report on a CPU container.
245
+
246
+ The Modal functions commit the persistent volume after every checkpoint and automatically resume
247
+ from the latest committed epoch after a retry or restart. This was important in practice because an
248
+ earlier execution stopped between stages; the final invocation reused completed work rather than
249
+ starting it again. The completed app has been stopped, so it is no longer consuming compute, while
250
+ the volume retains the artifacts.
251
+
252
+ The completed run is identified by configuration fingerprint:
253
+
254
+ ```text
255
+ 7b87d57ae5546600c460245a81431288db34c3e40a44c2e83da01acc4160d731
256
+ ```
257
+
258
+ That fingerprint appears in the report and checkpoints and prevents results from an incompatible
259
+ configuration from being combined accidentally.
260
+
261
+ ### 4.1 Compute accounting
262
+
263
+ The recorded training durations sum to **27,362.9 seconds**, or approximately **7.60 L4
264
+ GPU-hours**, across all 13 runs. Parallel student jobs reduced the successful workflow's elapsed
265
+ wall-clock time to roughly **2 hours 4 minutes**; wall time is therefore not the same as total GPU
266
+ consumption. Based on the recorded latency means, the configured inference warm-ups and timed
267
+ forwards account for about another **18 minutes** of L4 execution, before model loading, MAC tracing,
268
+ and container overhead.
269
+
270
+ These are workload measurements, not a billing statement. Provider charges can also include
271
+ container startup, downloads, CPU, memory, retries, and rounding, and the applicable unit price can
272
+ change. For planning a repeat, budget approximately eight L4 GPU-hours plus setup and benchmark
273
+ overhead, while expecting much less elapsed time when four training containers are available.
274
+
275
+ ## 5. Accuracy and training results
276
+
277
+ ### 5.1 Aggregate comparison
278
+
279
+ | Model | Mode | Seeds | Test top-1 (%) | Best val top-1 (%) | Params (M) | Mean train time (min) | Peak train memory (MB) |
280
+ | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
281
+ | ConvNeXt-T | Standard | 1 | **89.78** | 89.86 | 27.90 | 46.49 | 4,245.67 |
282
+ | ViT-S/16 | Standard | 1 | 89.22 | 89.60 | 21.70 | 27.89 | 2,563.02 |
283
+ | Swin-T | Standard | 1 | 89.54 | 89.54 | 27.60 | 60.52 | 4,843.58 |
284
+ | EfficientFormer-L1 | Standard | 1 | 86.83 | 86.86 | **11.48** | 28.35 | 2,633.86 |
285
+ | DeiT-S/16 | Standard | 3 | 88.86 ± 0.03 | 89.72 | 21.70 | 27.94 | 2,563.02 |
286
+ | Distilled DeiT-S/16 | Standard | 3 | 89.46 ± 0.27 | 90.17 | 21.74 | 28.36 | 2,566.76 |
287
+ | Distilled DeiT-S/16 | Hard KD | 3 | **89.72 ± 0.11** | **90.27** | 21.74 | 41.29 | 3,051.61 |
288
+
289
+ The `±` values are sample standard deviations across seeds. A blank uncertainty estimate for a
290
+ single-seed row should not be read as zero variance.
291
+
292
+ ![Validation accuracy curves for all completed runs](results/figures/validation_accuracy.png)
293
+
294
+ Several best checkpoints occurred at epoch 19 or 20, and only ConvNeXt selected substantially
295
+ earlier, at epoch 17. The 20-epoch budget therefore appears close to the useful end of this preset,
296
+ but the experiment does not prove that every model was fully saturated. Extending training would be
297
+ a new experiment and should preserve the same selection discipline.
298
+
299
+ ### 5.2 Every completed run
300
+
301
+ | Model | Mode | Seed | Best epoch | Best val top-1 | Test top-1 | Test top-5 |
302
+ | --- | --- | ---: | ---: | ---: | ---: | ---: |
303
+ | ConvNeXt-T | Standard | 42 | 17 | 89.86 | 89.78 | 98.86 |
304
+ | ViT-S/16 | Standard | 42 | 20 | 89.60 | 89.22 | 98.32 |
305
+ | Swin-T | Standard | 42 | 20 | 89.54 | 89.54 | 98.65 |
306
+ | EfficientFormer-L1 | Standard | 42 | 20 | 86.86 | 86.83 | 98.26 |
307
+ | DeiT-S/16 | Standard | 42 | 20 | 89.80 | 88.89 | 98.09 |
308
+ | DeiT-S/16 | Standard | 43 | 20 | 89.70 | 88.86 | 98.22 |
309
+ | DeiT-S/16 | Standard | 44 | 18 | 89.66 | 88.83 | 98.28 |
310
+ | Distilled DeiT-S/16 | Standard | 42 | 19 | 90.04 | 89.74 | 98.25 |
311
+ | Distilled DeiT-S/16 | Standard | 43 | 20 | 90.16 | 89.21 | 98.24 |
312
+ | Distilled DeiT-S/16 | Standard | 44 | 19 | 90.30 | 89.42 | 98.31 |
313
+ | Distilled DeiT-S/16 | Hard KD | 42 | 20 | 90.46 | **89.83** | 98.88 |
314
+ | Distilled DeiT-S/16 | Hard KD | 43 | 20 | 90.06 | 89.61 | **98.94** |
315
+ | Distilled DeiT-S/16 | Hard KD | 44 | 19 | 90.28 | 89.72 | 98.85 |
316
+
317
+ The best individual result, 89.83%, came from hard-KD seed 42. ConvNeXt's 89.78% is the strongest
318
+ single-seed reference row, while the hard-KD aggregate is the strongest multi-seed transformer
319
+ result. Their 0.06-point difference is too small to treat as meaningful without matched repetitions.
320
+
321
+ ## 6. What did distillation buy?
322
+
323
+ The most defensible causal result in the project is the paired standard-versus-hard-KD comparison:
324
+
325
+ | Seed | Standard Distilled DeiT | Hard KD | Paired gain |
326
+ | ---: | ---: | ---: | ---: |
327
+ | 42 | 89.74 | 89.83 | +0.09 points |
328
+ | 43 | 89.21 | 89.61 | +0.40 points |
329
+ | 44 | 89.42 | 89.72 | +0.30 points |
330
+ | **Mean** | **89.46** | **89.72** | **+0.26 points** |
331
+
332
+ ![Paired hard-distillation gains](results/figures/distillation_gain.png)
333
+
334
+ All three paired differences are positive. The treatment also reduced the observed test-accuracy
335
+ standard deviation from 0.27 to 0.11 points in these three runs. Three seeds are too few to claim a
336
+ general variance reduction, but the direction is worth following up.
337
+
338
+ The gain was not free during training:
339
+
340
+ - mean training time rose from **28.36 to 41.29 minutes**, an increase of about **45.6%**;
341
+ - peak CUDA allocator memory rose from roughly **2,566.76 to 3,051.61 MB**, about **18.9%**; and
342
+ - inference cost stayed unchanged because both treatments deploy the same student architecture.
343
+
344
+ This is the classic attraction of offline distillation: pay for a teacher during training, then
345
+ retain only the student at inference. Whether +0.26 points is worth the added training cost depends
346
+ on how often training happens and how valuable final accuracy is.
347
+
348
+ The broader comparison between ordinary DeiT-S/16 (88.86%) and Distilled DeiT without an active
349
+ teacher (89.46%) shows a +0.60-point difference, but it is **not** a clean estimate of distillation.
350
+ Those rows use different upstream checkpoints and a different token/head structure. The paired
351
+ hard-KD table is the appropriate evidence for the teacher's fine-tuning effect.
352
+
353
+ ## 7. Parameters and operation counts
354
+
355
+ | Architecture | Task parameters (M) | Measured GMACs at 224×224 |
356
+ | --- | ---: | ---: |
357
+ | EfficientFormer-L1 | **11.48** | **1.317** |
358
+ | ViT-S/16 | 21.70 | 4.250 |
359
+ | DeiT-S/16 | 21.70 | 4.250 |
360
+ | Distilled DeiT-S/16 | 21.74 | 4.272 |
361
+ | ConvNeXt-T | 27.90 | 4.470 |
362
+ | Swin-T | 27.60 | 4.509 |
363
+
364
+ These are live counts after replacing the original classifier with a 100-class head. The operation
365
+ counter uses `fvcore`'s MAC-style convention: one multiply-add is reported as one operation. It is
366
+ better to call these **MACs**, not universal FLOPs. Some operators are not counted by the tracer;
367
+ the exact unsupported-operator lists are preserved in
368
+ [`model_profiles.csv`](results/model_profiles.csv).
369
+
370
+ EfficientFormer used about 47% fewer parameters and 69% fewer measured MACs than ViT. Those are
371
+ important advantages for storage, bandwidth, and some runtimes. They did not, however, produce a
372
+ 69% throughput improvement on the L4. Operation count describes computational work at one level;
373
+ runtime also depends on kernel quality, memory traffic, parallelism, launch overhead, precision,
374
+ and batch shape.
375
+
376
+ ## 8. Inference benchmark
377
+
378
+ ### 8.1 Measurement protocol
379
+
380
+ All six architectures were benchmarked sequentially on one **NVIDIA L4** with:
381
+
382
+ - PyTorch `2.9.1+cu128`, torchvision `0.24.1+cu128`, and `timm 1.0.28`;
383
+ - FP32 and FP16;
384
+ - batch sizes 1 and 64;
385
+ - 50 warm-up iterations;
386
+ - 200 timed iterations per repeat;
387
+ - 5 repeats, or 1,000 timed samples per model/precision/batch case;
388
+ - CUDA events plus synchronization; and
389
+ - random input tensors already resident on the GPU.
390
+
391
+ The timings include the model forward pass and exclude image decoding, preprocessing, data loading,
392
+ host-to-device transfer, postprocessing, networking, and service overhead. Peak memory is PyTorch's
393
+ CUDA allocator peak, not whole-system memory or energy use. All **24 of 24** configured benchmark
394
+ cases completed.
395
+
396
+ ### 8.2 Main FP16 results
397
+
398
+ | Model | Batch-1 latency (ms) | Batch-1 images/s | Batch-64 latency (ms) | Batch-64 images/s | Batch-64 peak MB |
399
+ | --- | ---: | ---: | ---: | ---: | ---: |
400
+ | ConvNeXt-T | 5.377 | 185.98 | 57.764 | 1,107.96 | 728.76 |
401
+ | ViT-S/16 | **4.694** | **213.04** | **32.072** | **1,995.49** | **320.05** |
402
+ | Swin-T | 9.133 | 109.49 | 84.709 | 755.52 | 970.56 |
403
+ | EfficientFormer-L1 | 6.209 | 161.06 | 32.634 | 1,961.13 | 354.11 |
404
+ | DeiT-S/16 | 4.723 | 211.73 | 32.136 | 1,991.55 | **320.05** |
405
+ | Distilled DeiT-S/16 | 4.723 | 211.73 | 32.342 | 1,978.86 | 321.56 |
406
+
407
+ ViT and DeiT are effectively tied at batch 64: their reported means differ by less than 0.2%.
408
+ EfficientFormer is also in the same broad FP16 throughput band despite having far fewer MACs. Swin
409
+ is the slowest and has the largest inference allocator peak in this environment.
410
+
411
+ ![Accuracy versus FP16 batch-64 throughput](results/figures/accuracy_throughput.png)
412
+
413
+ ### 8.3 Precision changes the ranking
414
+
415
+ | Model | FP32 b1 images/s | FP16 b1 images/s | FP32 b64 images/s | FP16 b64 images/s |
416
+ | --- | ---: | ---: | ---: | ---: |
417
+ | ConvNeXt-T | 209.30 | 185.98 | 500.35 | 1,107.96 |
418
+ | ViT-S/16 | **233.61** | **213.04** | 598.39 | **1,995.49** |
419
+ | Swin-T | 123.19 | 109.49 | 359.25 | 755.52 |
420
+ | EfficientFormer-L1 | 173.24 | 161.06 | **1,128.16** | 1,961.13 |
421
+ | DeiT-S/16 | 228.91 | 211.73 | 599.09 | 1,991.55 |
422
+ | Distilled DeiT-S/16 | 228.13 | 211.73 | 607.31 | 1,978.86 |
423
+
424
+ FP16 was slower than FP32 at batch 1 for every model. At such a small batch, conversion and kernel
425
+ launch overhead can outweigh tensor-core savings. At batch 64, FP16 was substantially faster for
426
+ every architecture. EfficientFormer led the FP32 batch-64 table, while ViT narrowly led the FP16
427
+ table. A statement such as “model A is faster” is incomplete unless it names the hardware,
428
+ precision, batch size, software stack, and timing boundary.
429
+
430
+ The raw means, medians, p90 values, standard deviations, sample counts, and memory measurements are
431
+ available in
432
+ [`inference_benchmark.csv`](results/inference_benchmark.csv).
433
+
434
+ ## 9. Interpretation by model family
435
+
436
+ ### Plain ViT: stronger than its reputation under transfer learning
437
+
438
+ ViT-S/16 reached 89.22% and delivered the best measured FP16 batch-64 throughput with low inference
439
+ memory. This does not contradict the claim that plain ViT can be data hungry from scratch. It shows
440
+ that a pretrained ViT can be a very practical small-data fine-tuning baseline. Global attention is
441
+ not automatically too expensive at a 14×14 token grid.
442
+
443
+ ### DeiT: the recipe is a load-bearing idea
444
+
445
+ Standard DeiT averaged 88.86% across three seeds, while the distilled checkpoint family did better.
446
+ The central lesson is not that the DeiT block is universally superior to ViT—the architectures are
447
+ close and the upstream checkpoints differ. The lesson is that augmentation, regularization,
448
+ optimization, and teacher supervision deserve first-class experimental treatment.
449
+
450
+ ### Swin: hierarchy is useful, but it is not a free speedup
451
+
452
+ Swin-T reached a competitive 89.54%, illustrating that windowed attention and hierarchical feature
453
+ maps work. In this PyTorch/L4 setup, however, it trained longest, used the most peak memory, and had
454
+ the lowest inference throughput. Window locality changes asymptotic attention behavior, but shifted
455
+ windows, tensor layouts, and kernel implementations still determine wall-clock performance. Swin's
456
+ hierarchy may be more valuable for detection and segmentation than this classification-only project
457
+ can reveal.
458
+
459
+ ### EfficientFormer: compact does not mean universally fastest
460
+
461
+ EfficientFormer-L1 was clearly the smallest model and had the fewest measured MACs. Its 86.83%
462
+ accuracy was 2.39 points below ViT and 2.89 points below hard-KD Distilled DeiT. On the L4 it nearly
463
+ matched ViT's FP16 batch-64 throughput, but did not beat it. The compact model may still be preferable
464
+ when storage, download size, CPU/mobile execution, or energy dominates; this GPU experiment does not
465
+ measure those targets. A real mobile recommendation requires benchmarking the exported model on the
466
+ actual runtime and device.
467
+
468
+ ### ConvNeXt: a strong CNN remains a relevant baseline
469
+
470
+ ConvNeXt-T reached 89.78%, the best single-seed architecture row, and served as an effective teacher.
471
+ It was slower and larger than ViT/DeiT in the FP16 L4 benchmark. This is exactly why a CNN-style
472
+ baseline belongs in the chapter: architectural novelty should be compared with a strong, modern
473
+ convolutional model, not with an obsolete strawman.
474
+
475
+ ## 10. Decision guide
476
+
477
+ For this exact task and L4 software stack:
478
+
479
+ | Constraint | Sensible starting point | Reason |
480
+ | --- | --- | --- |
481
+ | Highest transformer accuracy | Hard-KD Distilled DeiT-S/16 | Best multi-seed transformer mean; no teacher at inference |
482
+ | FP16 GPU throughput | ViT-S/16 or DeiT-S/16 | Approximately 2,000 images/s at batch 64 |
483
+ | Lowest parameter/MAC budget | EfficientFormer-L1 | 11.48M parameters and 1.32 GMACs |
484
+ | CNN-style accuracy reference | ConvNeXt-T | 89.78% in its single completed run |
485
+ | Hierarchical features for downstream dense tasks | Swin-T, then benchmark again | Classification result alone does not value the full hierarchy |
486
+ | Minimal training complexity | Plain ViT/DeiT fine-tuning | Avoids the teacher's training-time cost |
487
+
488
+ This table is a starting point, not a deployment guarantee. If the target is a phone, browser, CPU,
489
+ TensorRT service, or different accelerator, export the shortlisted models and rerun the benchmark on
490
+ that exact stack.
491
+
492
+ ## 11. Threats to validity and limitations
493
+
494
+ 1. **Single-seed architecture rows.** ViT, Swin, EfficientFormer, and ConvNeXt were run once. Small
495
+ differences between those rows should not be interpreted as statistically settled rankings.
496
+ 2. **Checkpoint-level, not architecture-only, comparison.** The pretrained recipes and weights
497
+ differ. Only the paired standard-versus-hard-KD runs isolate the active teacher treatment.
498
+ 3. **Upsampled low-resolution data.** CIFAR-100 images begin at 32×32 and are resized to 224×224.
499
+ This is a controlled transfer task, not a substitute for naturally high-resolution benchmarks.
500
+ 4. **One GPU and software stack.** Kernel support can reorder models across hardware, framework
501
+ versions, compilers, and deployment runtimes.
502
+ 5. **No end-to-end serving measurement.** The inference benchmark excludes input pipelines, data
503
+ transfer, postprocessing, network latency, power, and energy.
504
+ 6. **No quantization or compiler optimization.** Results use eager PyTorch FP32/FP16, not INT8,
505
+ `torch.compile`, TensorRT, Core ML, TFLite, or vendor-specific graph optimization.
506
+ 7. **MAC tracing is incomplete by construction.** Unsupported operators are disclosed rather than
507
+ silently treated as proof of exact FLOPs.
508
+ 8. **Finite training budget.** Many runs selected epoch 19 or 20. Longer schedules could change the
509
+ result, but would require a fresh controlled run.
510
+ 9. **No dense prediction task.** Classification does not fully test the practical value of Swin's
511
+ multi-scale hierarchy.
512
+
513
+ ## 12. Reproducibility record and artifact map
514
+
515
+ The completed local result bundle is
516
+ [`results`](results). Important files are:
517
+
518
+ | Artifact | Purpose |
519
+ | --- | --- |
520
+ | [`benchmark.json`](results/benchmark.json) | Complete hardware/software metadata and raw inference measurements |
521
+ | [`run_results.csv`](results/run_results.csv) | One row for every training run |
522
+ | [`epoch_metrics.csv`](results/epoch_metrics.csv) | Per-epoch learning curves and timing |
523
+ | [`aggregate_results.csv`](results/aggregate_results.csv) | Grouped mean and standard deviation |
524
+ | [`distillation_gains.csv`](results/distillation_gains.csv) | Seed-matched KD differences |
525
+ | [`model_profiles.csv`](results/model_profiles.csv) | Parameters, MACs, and unsupported tracing operators |
526
+ | [`inference_benchmark.csv`](results/inference_benchmark.csv) | All 24 timing and memory cases |
527
+ | [`report.md`](results/report.md) | Automatically generated compact report |
528
+ | [`checkpoints`](checkpoints) | Exported model-only Safetensors files |
529
+ | [`SHA256SUMS`](checkpoints/SHA256SUMS) | Integrity manifest for all local checkpoints |
530
+
531
+ The Hugging Face checkpoint directory contains 13 model-only
532
+ `model.safetensors` files totaling approximately 1.06 GiB. The larger source
533
+ `best.pt` files remain in controlled local and Modal storage because they also contain optimizer,
534
+ scheduler, scaler, and random-state data used for exact training resume.
535
+
536
+ To verify every downloaded model file:
537
+
538
+ ```bash
539
+ cd checkpoints
540
+ shasum -a 256 -c SHA256SUMS
541
+ ```
542
+
543
+ Each line should end in `OK`. A mismatch means that file should be downloaded again before use.
544
+
545
+ ## 13. Reproducing the experiment
546
+
547
+ From the project root, install and validate the environment as described in the README, then choose
548
+ one of the following paths.
549
+
550
+ ### Run the complete workflow on Modal
551
+
552
+ ```bash
553
+ uv run modal run modal_app.py --preset full --stage all
554
+ ```
555
+
556
+ The teacher runs first, the students run with bounded concurrency, the inference suite uses one L4,
557
+ and the report stage follows. Completed checkpoints are resumable, so rerunning after interruption
558
+ does not intentionally discard finished epochs.
559
+
560
+ Individual stages can also be run explicitly:
561
+
562
+ ```bash
563
+ uv run modal run modal_app.py --preset full --stage train
564
+ uv run modal run modal_app.py --preset full --stage benchmark
565
+ uv run modal run modal_app.py --preset full --stage report
566
+ ```
567
+
568
+ ### Run on a local CUDA machine
569
+
570
+ ```bash
571
+ uv run vision-bench all --preset full --device cuda
572
+ ```
573
+
574
+ For a first instructional pass, use the shorter preset documented in the README before committing
575
+ to the full multi-seed run.
576
+
577
+ ### Regenerate the report from existing artifacts
578
+
579
+ ```bash
580
+ uv run vision-bench report --preset full
581
+ ```
582
+
583
+ ### Run the quality gates
584
+
585
+ ```bash
586
+ uv run pytest -q
587
+ uv run ruff check .
588
+ uv run mypy src
589
+ ```
590
+
591
+ At handoff, the project passed **41 tests with 1 hardware-dependent MPS test skipped**, and both
592
+ Ruff and mypy completed cleanly.
593
+
594
+ ## 14. Loading a downloaded checkpoint
595
+
596
+ The Hugging Face files contain model parameters only and use Safetensors. This example restores the
597
+ validation-selected ViT on CPU after downloading the chapter folder:
598
+
599
+ ```python
600
+ from pathlib import Path
601
+
602
+ from safetensors.torch import load_file
603
+ import timm
604
+
605
+ weights_path = Path(
606
+ "checkpoints/vit-s16/standard/seed-42/model.safetensors"
607
+ )
608
+ state_dict = load_file(weights_path, device="cpu")
609
+
610
+ model = timm.create_model(
611
+ "vit_small_patch16_224.augreg_in1k",
612
+ pretrained=False,
613
+ num_classes=100,
614
+ )
615
+ model.load_state_dict(state_dict, strict=True)
616
+ model.eval()
617
+ ```
618
+
619
+ For `deit-distilled-s16`, disable distilled-training output before ordinary evaluation if the
620
+ installed `timm` model exposes the switch:
621
+
622
+ ```python
623
+ if hasattr(model, "set_distilled_training"):
624
+ model.set_distilled_training(False)
625
+ ```
626
+
627
+ Use `manifest.json` to map each published path to its exact `timm` identifier, training mode, seed,
628
+ metrics, and source checksum. Use checkpoint-native preprocessing as shown in this chapter's
629
+ README. These model-only exports cannot resume training because optimizer, scheduler, scaler, and
630
+ random-number-generator state intentionally remain in the controlled source checkpoints.
631
+ ## 15. Final takeaway
632
+
633
+ No single number answered this project. ViT and DeiT were excellent FP16 GPU throughput baselines;
634
+ hard distillation bought a repeatable but modest accuracy gain; EfficientFormer minimized size and
635
+ MACs without becoming universally faster; Swin's valuable hierarchy carried real implementation
636
+ cost on this classifier; and ConvNeXt remained highly competitive. The practical method is the
637
+ lasting result: select checkpoints without touching the test set, repeat the comparison that is
638
+ meant to be causal, disclose uncertainty, profile live models, and benchmark the exact deployment
639
+ shape instead of choosing from FLOPs alone.
640
+
641
+ That is the chapter's main engineering lesson: efficient vision is not a property of an architecture
642
+ name. It is an accuracy–training–memory–latency trade-off measured under a stated workload.
643
+
644
+ ## 16. Primary references
645
+
646
+ - Dosovitskiy et al., [*An Image Is Worth 16×16 Words: Transformers for Image Recognition at
647
+ Scale*](https://arxiv.org/abs/2010.11929) — ViT.
648
+ - Touvron et al., [*Training data-efficient image transformers & distillation through
649
+ attention*](https://arxiv.org/abs/2012.12877) — DeiT and the distillation token.
650
+ - Liu et al., [*Swin Transformer: Hierarchical Vision Transformer using Shifted
651
+ Windows*](https://arxiv.org/abs/2103.14030) — window attention, shifts, and hierarchy.
652
+ - Li et al., [*EfficientFormer: Vision Transformers at MobileNet
653
+ Speed*](https://arxiv.org/abs/2206.01191) — compact, latency-oriented design.
654
+ - Liu et al., [*A ConvNet for the 2020s*](https://arxiv.org/abs/2201.03545) — ConvNeXt.
655
+ - Mehta and Rastegari, [*MobileViT*](https://arxiv.org/abs/2110.02178); Wu et al.,
656
+ [*TinyViT*](https://arxiv.org/abs/2207.10666); and Tu et al.,
657
+ [*MaxViT*](https://arxiv.org/abs/2204.01697) — practical variants for the chapter's paper map.
658
+
659
+ The exact executable checkpoint identifiers are pinned in
660
+ [the chapter model table](README.md#exact-upstream-model-identifiers). Architecture names alone are not enough
661
+ to reproduce a pretrained-checkpoint comparison.
chapter-04-efficient-and-scalable-vision-transformers/README.md ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Chapter 4 — Efficient and scalable vision transformers
2
+
3
+ ## ViT, DeiT, Swin, EfficientFormer, and hard distillation on CIFAR-100
4
+
5
+ This folder contains the validation-selected inference weights and measured artifacts for Chapter
6
+ 4's controlled image-classification project. Six architectures were fine-tuned from pinned `timm`
7
+ checkpoints on the same fixed CIFAR-100 split. The experiment measured accuracy, training behavior,
8
+ parameters, MAC-style operation counts, accelerator memory, latency, and throughput.
9
+
10
+ The published `.safetensors` files contain **model parameters only**. They are derived from the
11
+ verified `best.pt` files selected by validation top-1 accuracy; optimizer and resume state are not
12
+ included.
13
+
14
+ ## Experiment summary
15
+
16
+ - Dataset: CIFAR-100
17
+ - Split: 45,000 train / 5,000 validation / 10,000 official test
18
+ - Input: 224×224
19
+ - Training: 20 epochs, AdamW, mixed precision, batch size 64
20
+ - Hardware: NVIDIA L4
21
+ - Configuration fingerprint:
22
+ `7b87d57ae5546600c460245a81431288db34c3e40a44c2e83da01acc4160d731`
23
+ - Completed training runs: 13
24
+ - Completed inference cases: 24
25
+
26
+ ## Accuracy results
27
+
28
+ | Model | Mode | Seeds | Test top-1 (%) | Published checkpoint folder |
29
+ | --- | --- | --- | ---: | --- |
30
+ | ConvNeXt-T | Standard | 42 | 89.78 | `checkpoints/convnext-t/standard/seed-42` |
31
+ | ViT-S/16 | Standard | 42 | 89.22 | `checkpoints/vit-s16/standard/seed-42` |
32
+ | Swin-T | Standard | 42 | 89.54 | `checkpoints/swin-t/standard/seed-42` |
33
+ | EfficientFormer-L1 | Standard | 42 | 86.83 | `checkpoints/efficientformer-l1/standard/seed-42` |
34
+ | DeiT-S/16 | Standard | 42, 43, 44 | 88.86 ± 0.03 | `checkpoints/deit-s16/standard/seed-*` |
35
+ | Distilled DeiT-S/16 | Standard | 42, 43, 44 | 89.46 ± 0.27 | `checkpoints/deit-distilled-s16/standard/seed-*` |
36
+ | Distilled DeiT-S/16 | Hard KD | 42, 43, 44 | **89.72 ± 0.11** | `checkpoints/deit-distilled-s16/hard-kd/seed-*` |
37
+
38
+ The `±` value is the sample standard deviation across seeds. Single-seed rows do not have an
39
+ uncertainty estimate.
40
+
41
+ ## Exact upstream model identifiers
42
+
43
+ | Export folder | `timm` model identifier |
44
+ | --- | --- |
45
+ | `convnext-t` | `convnext_tiny.fb_in1k` |
46
+ | `vit-s16` | `vit_small_patch16_224.augreg_in1k` |
47
+ | `swin-t` | `swin_tiny_patch4_window7_224.ms_in1k` |
48
+ | `efficientformer-l1` | `efficientformer_l1.snap_dist_in1k` |
49
+ | `deit-s16` | `deit_small_patch16_224.fb_in1k` |
50
+ | `deit-distilled-s16` | `deit_small_distilled_patch16_224.fb_in1k` |
51
+
52
+ All exported models have a 100-class task head. Instantiate with `pretrained=False`; loading the
53
+ published state replaces every parameter.
54
+
55
+ ## Download and load one model
56
+
57
+ Install the runtime packages:
58
+
59
+ ```bash
60
+ python -m pip install huggingface_hub safetensors timm torch
61
+ ```
62
+
63
+ Then download and restore the ViT seed-42 model:
64
+
65
+ ```python
66
+ from huggingface_hub import hf_hub_download
67
+ from safetensors.torch import load_file
68
+ import timm
69
+
70
+ repo_id = (
71
+ "Mayank022/"
72
+ "Transformer-Vision-From-Image-Video-to-World-Models-and-Robotics-Book"
73
+ )
74
+ filename = (
75
+ "chapter-04-efficient-and-scalable-vision-transformers/"
76
+ "checkpoints/vit-s16/standard/seed-42/model.safetensors"
77
+ )
78
+
79
+ weights_path = hf_hub_download(repo_id=repo_id, filename=filename)
80
+ state_dict = load_file(weights_path, device="cpu")
81
+
82
+ model = timm.create_model(
83
+ "vit_small_patch16_224.augreg_in1k",
84
+ pretrained=False,
85
+ num_classes=100,
86
+ )
87
+ model.load_state_dict(state_dict, strict=True)
88
+ model.eval()
89
+ ```
90
+
91
+ For Distilled DeiT evaluation, disable training-time tuple output when supported:
92
+
93
+ ```python
94
+ if hasattr(model, "set_distilled_training"):
95
+ model.set_distilled_training(False)
96
+ ```
97
+
98
+ ## Preprocessing
99
+
100
+ Use checkpoint-native `timm` preprocessing. For a PIL image:
101
+
102
+ ```python
103
+ from timm.data import create_transform, resolve_model_data_config
104
+
105
+ data_config = resolve_model_data_config(model)
106
+ transform = create_transform(**data_config, is_training=False)
107
+ input_tensor = transform(pil_image).unsqueeze(0)
108
+ ```
109
+
110
+ The classifier outputs CIFAR-100 class indices. Class labels and the fixed split are defined by the
111
+ chapter project; do not interpret the output as the original ImageNet-1K label space.
112
+
113
+ ## Hard-distillation result
114
+
115
+ Hard KD held the Distilled DeiT architecture and seed fixed while adding a frozen, fine-tuned
116
+ ConvNeXt teacher during training. Test top-1 changed by:
117
+
118
+ | Seed | Standard | Hard KD | Gain |
119
+ | ---: | ---: | ---: | ---: |
120
+ | 42 | 89.74 | 89.83 | +0.09 points |
121
+ | 43 | 89.21 | 89.61 | +0.40 points |
122
+ | 44 | 89.42 | 89.72 | +0.30 points |
123
+
124
+ The mean paired gain was +0.26 percentage points. The teacher is not required when loading or
125
+ deploying a hard-KD student.
126
+
127
+ ## Artifact map
128
+
129
+ ```text
130
+ chapter-04-efficient-and-scalable-vision-transformers/
131
+ ├── README.md
132
+ ├── EXPERIMENT_REPORT.md
133
+ ├── manifest.json
134
+ ├── configs/
135
+ │ └── full.yaml
136
+ ├── checkpoints/
137
+ │ ├── SHA256SUMS
138
+ │ ├── convnext-t/standard/seed-42/model.safetensors
139
+ │ ├── vit-s16/standard/seed-42/model.safetensors
140
+ │ ├── swin-t/standard/seed-42/model.safetensors
141
+ │ ├── efficientformer-l1/standard/seed-42/model.safetensors
142
+ │ ├── deit-s16/standard/seed-{42,43,44}/model.safetensors
143
+ │ └── deit-distilled-s16/{standard,hard-kd}/seed-{42,43,44}/model.safetensors
144
+ └── results/
145
+ ├── benchmark.json
146
+ ├── aggregate_results.csv
147
+ ├── run_results.csv
148
+ ├── inference_benchmark.csv
149
+ └── figures/
150
+ ```
151
+
152
+ `manifest.json` is the authoritative model-to-file mapping and includes per-run metrics and both
153
+ source and exported checksums.
154
+
155
+ ## Verify downloaded weights
156
+
157
+ From the chapter folder:
158
+
159
+ ```bash
160
+ cd checkpoints
161
+ shasum -a 256 -c SHA256SUMS
162
+ ```
163
+
164
+ Every line should end in `OK`.
165
+
166
+ ## Interpretation and limitations
167
+
168
+ The main finding is that theoretical efficiency and measured runtime are different quantities.
169
+ EfficientFormer used the fewest parameters and MACs, while ViT/DeiT achieved the highest FP16
170
+ batch-64 throughput on the L4. Swin was competitive in accuracy but slower in this implementation.
171
+ Hard distillation improved all three paired seeds at extra training cost and no additional inference
172
+ cost.
173
+
174
+ These results are not a universal leaderboard. Most broad architecture rows use one seed; upstream
175
+ pretraining recipes differ; CIFAR-100 images are enlarged from 32×32 to 224×224; inference excludes
176
+ data loading; and the timing ranking is specific to the recorded hardware and software stack. See
177
+ `EXPERIMENT_REPORT.md` for the complete analysis.
178
+
179
+ ## Upstream references and terms
180
+
181
+ The artifacts are fine-tuned derivatives of the exact `timm` checkpoints listed above. Review their
182
+ upstream model cards and terms, along with CIFAR-100's terms, before redistribution or commercial
183
+ use. Publishing a derived weight file does not remove upstream attribution or license obligations.
184
+
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/SHA256SUMS ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 1cf9f71e4a426b11d2608aef603ac36614d51cf21f63d602ebaba3844f55d1af deit-distilled-s16/hard-kd/seed-44/model.safetensors
2
+ 4365b9b0c25a3aa13be8574df0e76c3b01cbe3cd106bf96f956c4434e2f3990f swin-t/standard/seed-42/model.safetensors
3
+ 466722cd32fcba95055285d9d6eeb28fb18945f83dea71af1a25633a6a7217d6 deit-s16/standard/seed-43/model.safetensors
4
+ 4cb13bd3f8f0f64eb48e083dd9fc91b9bdccc5ae53861f943632f746cb5c8c39 deit-distilled-s16/standard/seed-44/model.safetensors
5
+ 4e6cc980bc70a8e108bcc1e8985a2034c14fb296a7b506e2b06b05b6524b7660 deit-s16/standard/seed-44/model.safetensors
6
+ 5773caa4abdaa282f6c7ab22a8385458aa91cf44b7b78e0137e2099c30860449 deit-distilled-s16/hard-kd/seed-43/model.safetensors
7
+ 8e3142f30a411bf73c94e72ff390be01b80d1aa3de999ae44099007306292ae5 vit-s16/standard/seed-42/model.safetensors
8
+ 91e245848a91b2775f9107713dab970cb5b316c3adeb6316e7d771940ec0ee6b deit-s16/standard/seed-42/model.safetensors
9
+ 95bc596579deb6d376175bb08580ca3fb1492f959d6b45f50ae73eed5c026c2e deit-distilled-s16/standard/seed-43/model.safetensors
10
+ b133bd3de04743660ee7fb349252e145b0076d9808ee96471a93885f6f790a34 deit-distilled-s16/standard/seed-42/model.safetensors
11
+ c9afe1fab4646cfa404c017bac68b9fe322e38a60838c01211015de8d45f2b32 efficientformer-l1/standard/seed-42/model.safetensors
12
+ d2c1110fa7b6cd4c225cc27bf23fdeeeeaec120ee451a9bf511dcdb716a63b8e deit-distilled-s16/hard-kd/seed-42/model.safetensors
13
+ d61158f6d560081ee2f12d47de5dbd2e9d4efbf0deffcc4eab653c93d4833180 convnext-t/standard/seed-42/model.safetensors
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/convnext-t/standard/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d61158f6d560081ee2f12d47de5dbd2e9d4efbf0deffcc4eab653c93d4833180
3
+ size 111606200
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2c1110fa7b6cd4c225cc27bf23fdeeeeaec120ee451a9bf511dcdb716a63b8e
3
+ size 86988248
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-43/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5773caa4abdaa282f6c7ab22a8385458aa91cf44b7b78e0137e2099c30860449
3
+ size 86988248
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-44/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cf9f71e4a426b11d2608aef603ac36614d51cf21f63d602ebaba3844f55d1af
3
+ size 86988248
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b133bd3de04743660ee7fb349252e145b0076d9808ee96471a93885f6f790a34
3
+ size 86988248
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-43/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95bc596579deb6d376175bb08580ca3fb1492f959d6b45f50ae73eed5c026c2e
3
+ size 86988248
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-44/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4cb13bd3f8f0f64eb48e083dd9fc91b9bdccc5ae53861f943632f746cb5c8c39
3
+ size 86988248
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91e245848a91b2775f9107713dab970cb5b316c3adeb6316e7d771940ec0ee6b
3
+ size 86830888
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-43/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:466722cd32fcba95055285d9d6eeb28fb18945f83dea71af1a25633a6a7217d6
3
+ size 86830888
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-44/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4e6cc980bc70a8e108bcc1e8985a2034c14fb296a7b506e2b06b05b6524b7660
3
+ size 86830888
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/efficientformer-l1/standard/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9afe1fab4646cfa404c017bac68b9fe322e38a60838c01211015de8d45f2b32
3
+ size 46102432
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/swin-t/standard/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4365b9b0c25a3aa13be8574df0e76c3b01cbe3cd106bf96f956c4434e2f3990f
3
+ size 110402760
chapter-04-efficient-and-scalable-vision-transformers/checkpoints/vit-s16/standard/seed-42/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e3142f30a411bf73c94e72ff390be01b80d1aa3de999ae44099007306292ae5
3
+ size 86830888
chapter-04-efficient-and-scalable-vision-transformers/configs/full.yaml ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: full
2
+ tutorial_only: false
3
+ description: Complete chapter benchmark used for reportable results.
4
+ pretrained: true
5
+ data:
6
+ root: data
7
+ split_seed: 2027
8
+ train_per_class: 450
9
+ val_per_class: 50
10
+ test_limit: null
11
+ input_size: 224
12
+ num_workers: 8
13
+ training:
14
+ epochs: 20
15
+ batch_size: 64
16
+ backbone_lr: 0.00005
17
+ head_lr: 0.0005
18
+ weight_decay: 0.05
19
+ warmup_epochs: 2
20
+ min_lr: 0.000001
21
+ label_smoothing: 0.1
22
+ gradient_clip: 1.0
23
+ amp: true
24
+ random_erasing: 0.25
25
+ benchmark:
26
+ precisions: [fp32, fp16]
27
+ batch_sizes: [1, 64]
28
+ warmup_iterations: 50
29
+ timed_iterations: 200
30
+ repeats: 5
31
+ runs:
32
+ - model: convnext
33
+ mode: standard
34
+ seeds: [42]
35
+ - model: vit
36
+ mode: standard
37
+ seeds: [42]
38
+ - model: swin
39
+ mode: standard
40
+ seeds: [42]
41
+ - model: efficientformer
42
+ mode: standard
43
+ seeds: [42]
44
+ - model: deit
45
+ mode: standard
46
+ seeds: [42, 43, 44]
47
+ - model: deit_distilled
48
+ mode: standard
49
+ seeds: [42, 43, 44]
50
+ - model: deit_distilled
51
+ mode: hard_kd
52
+ seeds: [42, 43, 44]
53
+
chapter-04-efficient-and-scalable-vision-transformers/manifest.json ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "book_title": "Transformer Vision: From Image, Video to World Models & Robotics",
3
+ "chapter": 4,
4
+ "chapter_directory": "chapter-04-efficient-and-scalable-vision-transformers",
5
+ "chapter_title": "Efficient and scalable vision transformers",
6
+ "checkpoint_count": 13,
7
+ "config_fingerprint": "7b87d57ae5546600c460245a81431288db34c3e40a44c2e83da01acc4160d731",
8
+ "created_at_utc": "2026-08-16T13:43:34.633218+00:00",
9
+ "dataset": "CIFAR-100",
10
+ "format": "model-only Safetensors state dictionaries",
11
+ "models": [
12
+ {
13
+ "best_epoch": 17,
14
+ "best_validation_top1": 89.86,
15
+ "display_name": "ConvNeXt-T",
16
+ "exported_bytes": 111606200,
17
+ "exported_sha256": "d61158f6d560081ee2f12d47de5dbd2e9d4efbf0deffcc4eab653c93d4833180",
18
+ "family": "modern convolutional network",
19
+ "input_size": 224,
20
+ "model": "convnext",
21
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/convnext-t/standard/seed-42/model.safetensors",
22
+ "num_classes": 100,
23
+ "parameters": 27897028,
24
+ "run_key": "convnext-standard-seed42",
25
+ "seed": 42,
26
+ "source_checkpoint": "convnext-standard-seed42-7b87d57ae5/best.pt",
27
+ "source_checkpoint_bytes": 335007241,
28
+ "source_checkpoint_sha256": "ab2e8c6b9fd0fd8108c59c1f10996a2dd2107b5a2276fafa0f375275207553a0",
29
+ "test_top1": 89.78,
30
+ "test_top5": 98.86,
31
+ "timm_checkpoint": "convnext_tiny.fb_in1k",
32
+ "training_mode": "standard",
33
+ "training_peak_memory_mb": 4245.66796875,
34
+ "training_seconds": 2789.4574548180008
35
+ },
36
+ {
37
+ "best_epoch": 20,
38
+ "best_validation_top1": 89.6,
39
+ "display_name": "ViT-S/16",
40
+ "exported_bytes": 86830888,
41
+ "exported_sha256": "8e3142f30a411bf73c94e72ff390be01b80d1aa3de999ae44099007306292ae5",
42
+ "family": "plain global-attention transformer",
43
+ "input_size": 224,
44
+ "model": "vit",
45
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/vit-s16/standard/seed-42/model.safetensors",
46
+ "num_classes": 100,
47
+ "parameters": 21704164,
48
+ "run_key": "vit-standard-seed42",
49
+ "seed": 42,
50
+ "source_checkpoint": "vit-standard-seed42-7b87d57ae5/best.pt",
51
+ "source_checkpoint_bytes": 260658233,
52
+ "source_checkpoint_sha256": "b174a80bd73b1947aa9b64e9561285ed90e934f0960eedb8460c85b69546df26",
53
+ "test_top1": 89.22,
54
+ "test_top5": 98.32,
55
+ "timm_checkpoint": "vit_small_patch16_224.augreg_in1k",
56
+ "training_mode": "standard",
57
+ "training_peak_memory_mb": 2563.0244140625,
58
+ "training_seconds": 1673.357545405
59
+ },
60
+ {
61
+ "best_epoch": 20,
62
+ "best_validation_top1": 89.54,
63
+ "display_name": "Swin-T",
64
+ "exported_bytes": 110402760,
65
+ "exported_sha256": "4365b9b0c25a3aa13be8574df0e76c3b01cbe3cd106bf96f956c4434e2f3990f",
66
+ "family": "hierarchical shifted-window transformer",
67
+ "input_size": 224,
68
+ "model": "swin",
69
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/swin-t/standard/seed-42/model.safetensors",
70
+ "num_classes": 100,
71
+ "parameters": 27596254,
72
+ "run_key": "swin-standard-seed42",
73
+ "seed": 42,
74
+ "source_checkpoint": "swin-standard-seed42-7b87d57ae5/best.pt",
75
+ "source_checkpoint_bytes": 331388497,
76
+ "source_checkpoint_sha256": "102610136420e467186b860b34ae68a420598e417da1dc4049ec8e5ced8ba76b",
77
+ "test_top1": 89.54,
78
+ "test_top5": 98.65,
79
+ "timm_checkpoint": "swin_tiny_patch4_window7_224.ms_in1k",
80
+ "training_mode": "standard",
81
+ "training_peak_memory_mb": 4843.58154296875,
82
+ "training_seconds": 3631.1184958180006
83
+ },
84
+ {
85
+ "best_epoch": 20,
86
+ "best_validation_top1": 86.86,
87
+ "display_name": "EfficientFormer-L1",
88
+ "exported_bytes": 46102432,
89
+ "exported_sha256": "c9afe1fab4646cfa404c017bac68b9fe322e38a60838c01211015de8d45f2b32",
90
+ "family": "latency-oriented compact transformer",
91
+ "input_size": 224,
92
+ "model": "efficientformer",
93
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/efficientformer-l1/standard/seed-42/model.safetensors",
94
+ "num_classes": 100,
95
+ "parameters": 11481728,
96
+ "run_key": "efficientformer-standard-seed42",
97
+ "seed": 42,
98
+ "source_checkpoint": "efficientformer-standard-seed42-7b87d57ae5/best.pt",
99
+ "source_checkpoint_bytes": 138203465,
100
+ "source_checkpoint_sha256": "b92f254262b5f1698330ac93cfa179a1174fc2d7f7faf1fc8c110f899ca2b4fb",
101
+ "test_top1": 86.83,
102
+ "test_top5": 98.26,
103
+ "timm_checkpoint": "efficientformer_l1.snap_dist_in1k",
104
+ "training_mode": "standard",
105
+ "training_peak_memory_mb": 2633.85888671875,
106
+ "training_seconds": 1701.0025390570008
107
+ },
108
+ {
109
+ "best_epoch": 20,
110
+ "best_validation_top1": 89.8,
111
+ "display_name": "DeiT-S/16",
112
+ "exported_bytes": 86830888,
113
+ "exported_sha256": "91e245848a91b2775f9107713dab970cb5b316c3adeb6316e7d771940ec0ee6b",
114
+ "family": "data-efficient ViT recipe",
115
+ "input_size": 224,
116
+ "model": "deit",
117
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-42/model.safetensors",
118
+ "num_classes": 100,
119
+ "parameters": 21704164,
120
+ "run_key": "deit-standard-seed42",
121
+ "seed": 42,
122
+ "source_checkpoint": "deit-standard-seed42-7b87d57ae5/best.pt",
123
+ "source_checkpoint_bytes": 260658233,
124
+ "source_checkpoint_sha256": "9f4858d4f748ae7c7f4716f51dbeae3f0b7b20d39510c24c0eb63f1f2f25619f",
125
+ "test_top1": 88.89,
126
+ "test_top5": 98.09,
127
+ "timm_checkpoint": "deit_small_patch16_224.fb_in1k",
128
+ "training_mode": "standard",
129
+ "training_peak_memory_mb": 2563.0244140625,
130
+ "training_seconds": 1639.156589266
131
+ },
132
+ {
133
+ "best_epoch": 20,
134
+ "best_validation_top1": 89.7,
135
+ "display_name": "DeiT-S/16",
136
+ "exported_bytes": 86830888,
137
+ "exported_sha256": "466722cd32fcba95055285d9d6eeb28fb18945f83dea71af1a25633a6a7217d6",
138
+ "family": "data-efficient ViT recipe",
139
+ "input_size": 224,
140
+ "model": "deit",
141
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-43/model.safetensors",
142
+ "num_classes": 100,
143
+ "parameters": 21704164,
144
+ "run_key": "deit-standard-seed43",
145
+ "seed": 43,
146
+ "source_checkpoint": "deit-standard-seed43-7b87d57ae5/best.pt",
147
+ "source_checkpoint_bytes": 260658233,
148
+ "source_checkpoint_sha256": "6773ec182869a69c0e4c9508d6630442376eb5541a6c2a052912d6307a24caf5",
149
+ "test_top1": 88.86,
150
+ "test_top5": 98.22,
151
+ "timm_checkpoint": "deit_small_patch16_224.fb_in1k",
152
+ "training_mode": "standard",
153
+ "training_peak_memory_mb": 2563.0244140625,
154
+ "training_seconds": 1688.338380226
155
+ },
156
+ {
157
+ "best_epoch": 18,
158
+ "best_validation_top1": 89.66,
159
+ "display_name": "DeiT-S/16",
160
+ "exported_bytes": 86830888,
161
+ "exported_sha256": "4e6cc980bc70a8e108bcc1e8985a2034c14fb296a7b506e2b06b05b6524b7660",
162
+ "family": "data-efficient ViT recipe",
163
+ "input_size": 224,
164
+ "model": "deit",
165
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-s16/standard/seed-44/model.safetensors",
166
+ "num_classes": 100,
167
+ "parameters": 21704164,
168
+ "run_key": "deit-standard-seed44",
169
+ "seed": 44,
170
+ "source_checkpoint": "deit-standard-seed44-7b87d57ae5/best.pt",
171
+ "source_checkpoint_bytes": 260658233,
172
+ "source_checkpoint_sha256": "d00aeae136f35b4d8906cace4bea2a24c3c92aa2b53dbff348cdb757377226c2",
173
+ "test_top1": 88.83,
174
+ "test_top5": 98.28,
175
+ "timm_checkpoint": "deit_small_patch16_224.fb_in1k",
176
+ "training_mode": "standard",
177
+ "training_peak_memory_mb": 2563.0244140625,
178
+ "training_seconds": 1702.554159402
179
+ },
180
+ {
181
+ "best_epoch": 19,
182
+ "best_validation_top1": 90.04,
183
+ "display_name": "Distilled DeiT-S/16",
184
+ "exported_bytes": 86988248,
185
+ "exported_sha256": "b133bd3de04743660ee7fb349252e145b0076d9808ee96471a93885f6f790a34",
186
+ "family": "DeiT with class and distillation tokens",
187
+ "input_size": 224,
188
+ "model": "deit_distilled",
189
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-42/model.safetensors",
190
+ "num_classes": 100,
191
+ "parameters": 21743432,
192
+ "run_key": "deit_distilled-standard-seed42",
193
+ "seed": 42,
194
+ "source_checkpoint": "deit_distilled-standard-seed42-7b87d57ae5/best.pt",
195
+ "source_checkpoint_bytes": 261132897,
196
+ "source_checkpoint_sha256": "0b428a07b3d3ba7f5cc351434045a304c4809654f81521b615f7ca2887f74fb4",
197
+ "test_top1": 89.74,
198
+ "test_top5": 98.25,
199
+ "timm_checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
200
+ "training_mode": "standard",
201
+ "training_peak_memory_mb": 2594.0869140625,
202
+ "training_seconds": 1680.1939577700005
203
+ },
204
+ {
205
+ "best_epoch": 20,
206
+ "best_validation_top1": 90.16,
207
+ "display_name": "Distilled DeiT-S/16",
208
+ "exported_bytes": 86988248,
209
+ "exported_sha256": "95bc596579deb6d376175bb08580ca3fb1492f959d6b45f50ae73eed5c026c2e",
210
+ "family": "DeiT with class and distillation tokens",
211
+ "input_size": 224,
212
+ "model": "deit_distilled",
213
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-43/model.safetensors",
214
+ "num_classes": 100,
215
+ "parameters": 21743432,
216
+ "run_key": "deit_distilled-standard-seed43",
217
+ "seed": 43,
218
+ "source_checkpoint": "deit_distilled-standard-seed43-7b87d57ae5/best.pt",
219
+ "source_checkpoint_bytes": 261132961,
220
+ "source_checkpoint_sha256": "87730512bd0d2a8fd29fa6c5bf166d9d0198486dee44e66cbfacd6db51a05fac",
221
+ "test_top1": 89.21,
222
+ "test_top5": 98.24,
223
+ "timm_checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
224
+ "training_mode": "standard",
225
+ "training_peak_memory_mb": 2594.0869140625,
226
+ "training_seconds": 1683.276820501
227
+ },
228
+ {
229
+ "best_epoch": 19,
230
+ "best_validation_top1": 90.3,
231
+ "display_name": "Distilled DeiT-S/16",
232
+ "exported_bytes": 86988248,
233
+ "exported_sha256": "4cb13bd3f8f0f64eb48e083dd9fc91b9bdccc5ae53861f943632f746cb5c8c39",
234
+ "family": "DeiT with class and distillation tokens",
235
+ "input_size": 224,
236
+ "model": "deit_distilled",
237
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/standard/seed-44/model.safetensors",
238
+ "num_classes": 100,
239
+ "parameters": 21743432,
240
+ "run_key": "deit_distilled-standard-seed44",
241
+ "seed": 44,
242
+ "source_checkpoint": "deit_distilled-standard-seed44-7b87d57ae5/best.pt",
243
+ "source_checkpoint_bytes": 261131233,
244
+ "source_checkpoint_sha256": "377f506858be6d24e238941b0bafb171bb0f38508ff10042f2f5aac58ecdccdc",
245
+ "test_top1": 89.42,
246
+ "test_top5": 98.31,
247
+ "timm_checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
248
+ "training_mode": "standard",
249
+ "training_peak_memory_mb": 2512.09765625,
250
+ "training_seconds": 1741.7318086770006
251
+ },
252
+ {
253
+ "best_epoch": 20,
254
+ "best_validation_top1": 90.46,
255
+ "display_name": "Distilled DeiT-S/16",
256
+ "exported_bytes": 86988248,
257
+ "exported_sha256": "d2c1110fa7b6cd4c225cc27bf23fdeeeeaec120ee451a9bf511dcdb716a63b8e",
258
+ "family": "DeiT with class and distillation tokens",
259
+ "input_size": 224,
260
+ "model": "deit_distilled",
261
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-42/model.safetensors",
262
+ "num_classes": 100,
263
+ "parameters": 21743432,
264
+ "run_key": "deit_distilled-hard_kd-seed42",
265
+ "seed": 42,
266
+ "source_checkpoint": "deit_distilled-hard_kd-seed42-7b87d57ae5/best.pt",
267
+ "source_checkpoint_bytes": 261131169,
268
+ "source_checkpoint_sha256": "7da1b2f363c0eb39de39c8c2d3fbb13b1286dbe9565267f50b79a1cccc52c925",
269
+ "test_top1": 89.83,
270
+ "test_top5": 98.88,
271
+ "timm_checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
272
+ "training_mode": "hard_kd",
273
+ "training_peak_memory_mb": 3051.60888671875,
274
+ "training_seconds": 2489.6353192010006
275
+ },
276
+ {
277
+ "best_epoch": 20,
278
+ "best_validation_top1": 90.06,
279
+ "display_name": "Distilled DeiT-S/16",
280
+ "exported_bytes": 86988248,
281
+ "exported_sha256": "5773caa4abdaa282f6c7ab22a8385458aa91cf44b7b78e0137e2099c30860449",
282
+ "family": "DeiT with class and distillation tokens",
283
+ "input_size": 224,
284
+ "model": "deit_distilled",
285
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-43/model.safetensors",
286
+ "num_classes": 100,
287
+ "parameters": 21743432,
288
+ "run_key": "deit_distilled-hard_kd-seed43",
289
+ "seed": 43,
290
+ "source_checkpoint": "deit_distilled-hard_kd-seed43-7b87d57ae5/best.pt",
291
+ "source_checkpoint_bytes": 261131233,
292
+ "source_checkpoint_sha256": "62f5fe35ee2926ff1e6d69cc588f4483605ead10ad96b231f8a4cf21e9de157b",
293
+ "test_top1": 89.61,
294
+ "test_top5": 98.94,
295
+ "timm_checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
296
+ "training_mode": "hard_kd",
297
+ "training_peak_memory_mb": 3051.60888671875,
298
+ "training_seconds": 2475.6306675059996
299
+ },
300
+ {
301
+ "best_epoch": 19,
302
+ "best_validation_top1": 90.28,
303
+ "display_name": "Distilled DeiT-S/16",
304
+ "exported_bytes": 86988248,
305
+ "exported_sha256": "1cf9f71e4a426b11d2608aef603ac36614d51cf21f63d602ebaba3844f55d1af",
306
+ "family": "DeiT with class and distillation tokens",
307
+ "input_size": 224,
308
+ "model": "deit_distilled",
309
+ "model_file": "chapter-04-efficient-and-scalable-vision-transformers/checkpoints/deit-distilled-s16/hard-kd/seed-44/model.safetensors",
310
+ "num_classes": 100,
311
+ "parameters": 21743432,
312
+ "run_key": "deit_distilled-hard_kd-seed44",
313
+ "seed": 44,
314
+ "source_checkpoint": "deit_distilled-hard_kd-seed44-7b87d57ae5/best.pt",
315
+ "source_checkpoint_bytes": 261131233,
316
+ "source_checkpoint_sha256": "3fc93e36eb684ae97d74159987a2d204ae148b88973a0765af38f71268c2d7f6",
317
+ "test_top1": 89.72,
318
+ "test_top5": 98.85,
319
+ "timm_checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
320
+ "training_mode": "hard_kd",
321
+ "training_peak_memory_mb": 3051.60888671875,
322
+ "training_seconds": 2467.4307780010004
323
+ }
324
+ ],
325
+ "repository_id": "Mayank022/Transformer-Vision-From-Image-Video-to-World-Models-and-Robotics-Book",
326
+ "safetensors_version": "0.8.0",
327
+ "schema_version": 1,
328
+ "torch_version": "2.9.1",
329
+ "total_exported_bytes": 1137364432
330
+ }
chapter-04-efficient-and-scalable-vision-transformers/results/aggregate_results.csv ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ model,display_name,mode,seeds,test_top1_mean,test_top1_std,test_top5_mean,best_validation_top1_mean,parameters_m,training_seconds_mean,training_peak_memory_mb
2
+ convnext,ConvNeXt-T,standard,1,89.78,,98.86,89.86,27.897028,2789.4574548180008,4245.66796875
3
+ vit,ViT-S/16,standard,1,89.22,,98.32,89.6,21.704164,1673.357545405,2563.0244140625
4
+ swin,Swin-T,standard,1,89.54,,98.65,89.54,27.596254,3631.1184958180006,4843.58154296875
5
+ efficientformer,EfficientFormer-L1,standard,1,86.83,,98.26,86.86,11.481728,1701.0025390570008,2633.85888671875
6
+ deit,DeiT-S/16,standard,3,88.86,0.030000000000001137,98.19666666666667,89.71999999999998,21.704164,1676.6830429646668,2563.0244140625
7
+ deit_distilled,Distilled DeiT-S/16,standard,3,89.45666666666666,0.2668957349478132,98.26666666666667,90.16666666666667,21.743432,1701.7341956493337,2566.7571614583335
8
+ deit_distilled,Distilled DeiT-S/16,hard_kd,3,89.71999999999998,0.10999999999999943,98.88999999999999,90.26666666666667,21.743432,2477.565588236,3051.60888671875
chapter-04-efficient-and-scalable-vision-transformers/results/benchmark.json ADDED
@@ -0,0 +1,529 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config_fingerprint": "7b87d57ae5546600c460245a81431288db34c3e40a44c2e83da01acc4160d731",
3
+ "environment": {
4
+ "cuda": "12.8",
5
+ "cudnn": 91002,
6
+ "device_memory_mb": 22563.125,
7
+ "device_name": "NVIDIA L4",
8
+ "device_type": "cuda",
9
+ "machine": "x86_64",
10
+ "pid": 2,
11
+ "platform": "Linux-4.19.0-gvisor-x86_64-with-glibc2.36",
12
+ "python": "3.12.10",
13
+ "timm": "1.0.28",
14
+ "torch": "2.9.1+cu128",
15
+ "torchvision": "0.24.1+cu128"
16
+ },
17
+ "measurements": [
18
+ {
19
+ "batch_size": 1,
20
+ "latency_mean_ms": 4.777800642490387,
21
+ "latency_median_ms": 4.769615888595581,
22
+ "latency_p90_ms": 4.826025533676148,
23
+ "latency_std_ms": 0.09854292782443023,
24
+ "model": "convnext",
25
+ "peak_memory_mb": 132.1884765625,
26
+ "precision": "fp32",
27
+ "repeats": 5,
28
+ "samples": 1000,
29
+ "status": "complete",
30
+ "throughput_images_per_second": 209.3013239411259,
31
+ "timed_iterations": 200,
32
+ "warmup_iterations": 50
33
+ },
34
+ {
35
+ "batch_size": 64,
36
+ "latency_mean_ms": 127.90953128051758,
37
+ "latency_median_ms": 128.02047729492188,
38
+ "latency_p90_ms": 132.2467269897461,
39
+ "latency_std_ms": 3.4320032409674415,
40
+ "model": "convnext",
41
+ "peak_memory_mb": 962.6767578125,
42
+ "precision": "fp32",
43
+ "repeats": 5,
44
+ "samples": 1000,
45
+ "status": "complete",
46
+ "throughput_images_per_second": 500.3536433859804,
47
+ "timed_iterations": 200,
48
+ "warmup_iterations": 50
49
+ },
50
+ {
51
+ "batch_size": 1,
52
+ "latency_mean_ms": 5.376872823238373,
53
+ "latency_median_ms": 5.378112077713013,
54
+ "latency_p90_ms": 5.495808124542236,
55
+ "latency_std_ms": 0.11512835348717641,
56
+ "model": "convnext",
57
+ "peak_memory_mb": 183.4208984375,
58
+ "precision": "fp16",
59
+ "repeats": 5,
60
+ "samples": 1000,
61
+ "status": "complete",
62
+ "throughput_images_per_second": 185.98170960601627,
63
+ "timed_iterations": 200,
64
+ "warmup_iterations": 50
65
+ },
66
+ {
67
+ "batch_size": 64,
68
+ "latency_mean_ms": 57.763763633728026,
69
+ "latency_median_ms": 57.5544319152832,
70
+ "latency_p90_ms": 59.53341598510742,
71
+ "latency_std_ms": 1.2430091115071689,
72
+ "model": "convnext",
73
+ "peak_memory_mb": 728.7607421875,
74
+ "precision": "fp16",
75
+ "repeats": 5,
76
+ "samples": 1000,
77
+ "status": "complete",
78
+ "throughput_images_per_second": 1107.9610464064474,
79
+ "timed_iterations": 200,
80
+ "warmup_iterations": 50
81
+ },
82
+ {
83
+ "batch_size": 1,
84
+ "latency_mean_ms": 4.280692895412445,
85
+ "latency_median_ms": 4.261360168457031,
86
+ "latency_p90_ms": 4.343808174133301,
87
+ "latency_std_ms": 0.16694712271134712,
88
+ "model": "vit",
89
+ "peak_memory_mb": 97.1484375,
90
+ "precision": "fp32",
91
+ "repeats": 5,
92
+ "samples": 1000,
93
+ "status": "complete",
94
+ "throughput_images_per_second": 233.60704083016213,
95
+ "timed_iterations": 200,
96
+ "warmup_iterations": 50
97
+ },
98
+ {
99
+ "batch_size": 64,
100
+ "latency_mean_ms": 106.9532296295166,
101
+ "latency_median_ms": 106.99007797241211,
102
+ "latency_p90_ms": 108.48696365356446,
103
+ "latency_std_ms": 1.1434555353430906,
104
+ "model": "vit",
105
+ "peak_memory_mb": 351.763671875,
106
+ "precision": "fp32",
107
+ "repeats": 5,
108
+ "samples": 1000,
109
+ "status": "complete",
110
+ "throughput_images_per_second": 598.3924021901391,
111
+ "timed_iterations": 200,
112
+ "warmup_iterations": 50
113
+ },
114
+ {
115
+ "batch_size": 1,
116
+ "latency_mean_ms": 4.69389853143692,
117
+ "latency_median_ms": 4.659152030944824,
118
+ "latency_p90_ms": 4.780019092559815,
119
+ "latency_std_ms": 0.16487908037721768,
120
+ "model": "vit",
121
+ "peak_memory_mb": 137.90283203125,
122
+ "precision": "fp16",
123
+ "repeats": 5,
124
+ "samples": 1000,
125
+ "status": "complete",
126
+ "throughput_images_per_second": 213.04252601597565,
127
+ "timed_iterations": 200,
128
+ "warmup_iterations": 50
129
+ },
130
+ {
131
+ "batch_size": 64,
132
+ "latency_mean_ms": 32.072251497268674,
133
+ "latency_median_ms": 32.125953674316406,
134
+ "latency_p90_ms": 33.052775573730464,
135
+ "latency_std_ms": 0.8095062193205872,
136
+ "model": "vit",
137
+ "peak_memory_mb": 320.05126953125,
138
+ "precision": "fp16",
139
+ "repeats": 5,
140
+ "samples": 1000,
141
+ "status": "complete",
142
+ "throughput_images_per_second": 1995.4944543089014,
143
+ "timed_iterations": 200,
144
+ "warmup_iterations": 50
145
+ },
146
+ {
147
+ "batch_size": 1,
148
+ "latency_mean_ms": 8.11762380886078,
149
+ "latency_median_ms": 8.089599609375,
150
+ "latency_p90_ms": 8.21555233001709,
151
+ "latency_std_ms": 0.07401799461648069,
152
+ "model": "swin",
153
+ "peak_memory_mb": 134.0771484375,
154
+ "precision": "fp32",
155
+ "repeats": 5,
156
+ "samples": 1000,
157
+ "status": "complete",
158
+ "throughput_images_per_second": 123.18875862520896,
159
+ "timed_iterations": 200,
160
+ "warmup_iterations": 50
161
+ },
162
+ {
163
+ "batch_size": 64,
164
+ "latency_mean_ms": 178.14805532836914,
165
+ "latency_median_ms": 178.41305541992188,
166
+ "latency_p90_ms": 180.40453033447267,
167
+ "latency_std_ms": 1.9795728141419107,
168
+ "model": "swin",
169
+ "peak_memory_mb": 1077.705078125,
170
+ "precision": "fp32",
171
+ "repeats": 5,
172
+ "samples": 1000,
173
+ "status": "complete",
174
+ "throughput_images_per_second": 359.251746430983,
175
+ "timed_iterations": 200,
176
+ "warmup_iterations": 50
177
+ },
178
+ {
179
+ "batch_size": 1,
180
+ "latency_mean_ms": 9.13337626171112,
181
+ "latency_median_ms": 9.041919708251953,
182
+ "latency_p90_ms": 9.377792358398438,
183
+ "latency_std_ms": 0.29909913260705207,
184
+ "model": "swin",
185
+ "peak_memory_mb": 185.33349609375,
186
+ "precision": "fp16",
187
+ "repeats": 5,
188
+ "samples": 1000,
189
+ "status": "complete",
190
+ "throughput_images_per_second": 109.4885364782565,
191
+ "timed_iterations": 200,
192
+ "warmup_iterations": 50
193
+ },
194
+ {
195
+ "batch_size": 64,
196
+ "latency_mean_ms": 84.70931391143799,
197
+ "latency_median_ms": 84.73241424560547,
198
+ "latency_p90_ms": 86.2045181274414,
199
+ "latency_std_ms": 1.2024556603816736,
200
+ "model": "swin",
201
+ "peak_memory_mb": 970.5625,
202
+ "precision": "fp16",
203
+ "repeats": 5,
204
+ "samples": 1000,
205
+ "status": "complete",
206
+ "throughput_images_per_second": 755.5249481410133,
207
+ "timed_iterations": 200,
208
+ "warmup_iterations": 50
209
+ },
210
+ {
211
+ "batch_size": 1,
212
+ "latency_mean_ms": 5.772215712070465,
213
+ "latency_median_ms": 5.725183963775635,
214
+ "latency_p90_ms": 5.933670282363892,
215
+ "latency_std_ms": 0.18675654583815726,
216
+ "model": "efficientformer",
217
+ "peak_memory_mb": 60.97119140625,
218
+ "precision": "fp32",
219
+ "repeats": 5,
220
+ "samples": 1000,
221
+ "status": "complete",
222
+ "throughput_images_per_second": 173.2436987600564,
223
+ "timed_iterations": 200,
224
+ "warmup_iterations": 50
225
+ },
226
+ {
227
+ "batch_size": 64,
228
+ "latency_mean_ms": 56.72956251525879,
229
+ "latency_median_ms": 56.71116638183594,
230
+ "latency_p90_ms": 57.0277889251709,
231
+ "latency_std_ms": 0.22907337112652218,
232
+ "model": "efficientformer",
233
+ "peak_memory_mb": 497.74072265625,
234
+ "precision": "fp32",
235
+ "repeats": 5,
236
+ "samples": 1000,
237
+ "status": "complete",
238
+ "throughput_images_per_second": 1128.1595902098777,
239
+ "timed_iterations": 200,
240
+ "warmup_iterations": 50
241
+ },
242
+ {
243
+ "batch_size": 1,
244
+ "latency_mean_ms": 6.20901661491394,
245
+ "latency_median_ms": 6.112767934799194,
246
+ "latency_p90_ms": 6.5593345165252686,
247
+ "latency_std_ms": 0.30308211309436084,
248
+ "model": "efficientformer",
249
+ "peak_memory_mb": 80.21435546875,
250
+ "precision": "fp16",
251
+ "repeats": 5,
252
+ "samples": 1000,
253
+ "status": "complete",
254
+ "throughput_images_per_second": 161.05609986580146,
255
+ "timed_iterations": 200,
256
+ "warmup_iterations": 50
257
+ },
258
+ {
259
+ "batch_size": 64,
260
+ "latency_mean_ms": 32.634319339752196,
261
+ "latency_median_ms": 32.62673568725586,
262
+ "latency_p90_ms": 32.93388748168945,
263
+ "latency_std_ms": 0.21541325392113395,
264
+ "model": "efficientformer",
265
+ "peak_memory_mb": 354.11083984375,
266
+ "precision": "fp16",
267
+ "repeats": 5,
268
+ "samples": 1000,
269
+ "status": "complete",
270
+ "throughput_images_per_second": 1961.125627708158,
271
+ "timed_iterations": 200,
272
+ "warmup_iterations": 50
273
+ },
274
+ {
275
+ "batch_size": 1,
276
+ "latency_mean_ms": 4.368596731185913,
277
+ "latency_median_ms": 4.306943893432617,
278
+ "latency_p90_ms": 4.604022598266601,
279
+ "latency_std_ms": 0.16726820626053793,
280
+ "model": "deit",
281
+ "peak_memory_mb": 97.1484375,
282
+ "precision": "fp32",
283
+ "repeats": 5,
284
+ "samples": 1000,
285
+ "status": "complete",
286
+ "throughput_images_per_second": 228.9064570463424,
287
+ "timed_iterations": 200,
288
+ "warmup_iterations": 50
289
+ },
290
+ {
291
+ "batch_size": 64,
292
+ "latency_mean_ms": 106.82791548156739,
293
+ "latency_median_ms": 106.8067855834961,
294
+ "latency_p90_ms": 107.79443359375,
295
+ "latency_std_ms": 0.8205535043948153,
296
+ "model": "deit",
297
+ "peak_memory_mb": 351.763671875,
298
+ "precision": "fp32",
299
+ "repeats": 5,
300
+ "samples": 1000,
301
+ "status": "complete",
302
+ "throughput_images_per_second": 599.094344502518,
303
+ "timed_iterations": 200,
304
+ "warmup_iterations": 50
305
+ },
306
+ {
307
+ "batch_size": 1,
308
+ "latency_mean_ms": 4.722966948986054,
309
+ "latency_median_ms": 4.696063995361328,
310
+ "latency_p90_ms": 4.82521595954895,
311
+ "latency_std_ms": 0.09960610584523705,
312
+ "model": "deit",
313
+ "peak_memory_mb": 137.90283203125,
314
+ "precision": "fp16",
315
+ "repeats": 5,
316
+ "samples": 1000,
317
+ "status": "complete",
318
+ "throughput_images_per_second": 211.73131440495982,
319
+ "timed_iterations": 200,
320
+ "warmup_iterations": 50
321
+ },
322
+ {
323
+ "batch_size": 64,
324
+ "latency_mean_ms": 32.135718923568724,
325
+ "latency_median_ms": 32.168447494506836,
326
+ "latency_p90_ms": 33.121176147460936,
327
+ "latency_std_ms": 0.8138286399443037,
328
+ "model": "deit",
329
+ "peak_memory_mb": 320.05126953125,
330
+ "precision": "fp16",
331
+ "repeats": 5,
332
+ "samples": 1000,
333
+ "status": "complete",
334
+ "throughput_images_per_second": 1991.5533911725133,
335
+ "timed_iterations": 200,
336
+ "warmup_iterations": 50
337
+ },
338
+ {
339
+ "batch_size": 1,
340
+ "latency_mean_ms": 4.383408827781677,
341
+ "latency_median_ms": 4.355168104171753,
342
+ "latency_p90_ms": 4.442111968994141,
343
+ "latency_std_ms": 0.20651985327066089,
344
+ "model": "deit_distilled",
345
+ "peak_memory_mb": 97.30419921875,
346
+ "precision": "fp32",
347
+ "repeats": 5,
348
+ "samples": 1000,
349
+ "status": "complete",
350
+ "throughput_images_per_second": 228.13295297990092,
351
+ "timed_iterations": 200,
352
+ "warmup_iterations": 50
353
+ },
354
+ {
355
+ "batch_size": 64,
356
+ "latency_mean_ms": 105.38310792541503,
357
+ "latency_median_ms": 105.41926574707031,
358
+ "latency_p90_ms": 106.30379638671876,
359
+ "latency_std_ms": 0.7789229665081872,
360
+ "model": "deit_distilled",
361
+ "peak_memory_mb": 352.50732421875,
362
+ "precision": "fp32",
363
+ "repeats": 5,
364
+ "samples": 1000,
365
+ "status": "complete",
366
+ "throughput_images_per_second": 607.3079572230498,
367
+ "timed_iterations": 200,
368
+ "warmup_iterations": 50
369
+ },
370
+ {
371
+ "batch_size": 1,
372
+ "latency_mean_ms": 4.723058529853821,
373
+ "latency_median_ms": 4.704256057739258,
374
+ "latency_p90_ms": 4.769792079925537,
375
+ "latency_std_ms": 0.15652674115081888,
376
+ "model": "deit_distilled",
377
+ "peak_memory_mb": 138.13818359375,
378
+ "precision": "fp16",
379
+ "repeats": 5,
380
+ "samples": 1000,
381
+ "status": "complete",
382
+ "throughput_images_per_second": 211.72720890057442,
383
+ "timed_iterations": 200,
384
+ "warmup_iterations": 50
385
+ },
386
+ {
387
+ "batch_size": 64,
388
+ "latency_mean_ms": 32.341811212539675,
389
+ "latency_median_ms": 32.4213752746582,
390
+ "latency_p90_ms": 33.34256629943848,
391
+ "latency_std_ms": 0.8330030872120695,
392
+ "model": "deit_distilled",
393
+ "peak_memory_mb": 321.55615234375,
394
+ "precision": "fp16",
395
+ "repeats": 5,
396
+ "samples": 1000,
397
+ "status": "complete",
398
+ "throughput_images_per_second": 1978.8625806827326,
399
+ "timed_iterations": 200,
400
+ "warmup_iterations": 50
401
+ }
402
+ ],
403
+ "preset": "full",
404
+ "profiles": [
405
+ {
406
+ "checkpoint": "convnext_tiny.fb_in1k",
407
+ "display_name": "ConvNeXt-T",
408
+ "error": null,
409
+ "expected_gmacs_from_model_card": 4.5,
410
+ "expected_parameters_m": 28.6,
411
+ "measured_gmacs": 4.469746176,
412
+ "measured_macs": 4469746176,
413
+ "model": "convnext",
414
+ "parameters": 27897028,
415
+ "representative_run": "convnext-standard-seed42",
416
+ "unsupported_operators": {
417
+ "aten::add": 18,
418
+ "aten::gelu": 18,
419
+ "aten::mul": 18
420
+ }
421
+ },
422
+ {
423
+ "checkpoint": "vit_small_patch16_224.augreg_in1k",
424
+ "display_name": "ViT-S/16",
425
+ "error": null,
426
+ "expected_gmacs_from_model_card": 4.3,
427
+ "expected_parameters_m": 22.1,
428
+ "measured_gmacs": 4.25032896,
429
+ "measured_macs": 4250328960,
430
+ "model": "vit",
431
+ "parameters": 21704164,
432
+ "representative_run": "vit-standard-seed42",
433
+ "unsupported_operators": {
434
+ "aten::add": 25,
435
+ "aten::gelu": 12,
436
+ "aten::scaled_dot_product_attention": 12
437
+ }
438
+ },
439
+ {
440
+ "checkpoint": "swin_tiny_patch4_window7_224.ms_in1k",
441
+ "display_name": "Swin-T",
442
+ "error": null,
443
+ "expected_gmacs_from_model_card": 4.5,
444
+ "expected_parameters_m": 28.3,
445
+ "measured_gmacs": 4.508503296,
446
+ "measured_macs": 4508503296,
447
+ "model": "swin",
448
+ "parameters": 27596254,
449
+ "representative_run": "swin-standard-seed42",
450
+ "unsupported_operators": {
451
+ "aten::add": 41,
452
+ "aten::bernoulli_": 22,
453
+ "aten::div_": 22,
454
+ "aten::gelu": 12,
455
+ "aten::mean": 1,
456
+ "aten::mul": 34,
457
+ "aten::pad": 15,
458
+ "aten::rsub": 24,
459
+ "aten::softmax": 12
460
+ }
461
+ },
462
+ {
463
+ "checkpoint": "efficientformer_l1.snap_dist_in1k",
464
+ "display_name": "EfficientFormer-L1",
465
+ "error": null,
466
+ "expected_gmacs_from_model_card": 1.3,
467
+ "expected_parameters_m": 12.3,
468
+ "measured_gmacs": 1.317055936,
469
+ "measured_macs": 1317055936,
470
+ "model": "efficientformer",
471
+ "parameters": 11481728,
472
+ "representative_run": "efficientformer-standard-seed42",
473
+ "unsupported_operators": {
474
+ "aten::add": 32,
475
+ "aten::add_": 33,
476
+ "aten::avg_pool2d": 14,
477
+ "aten::div": 1,
478
+ "aten::gelu": 15,
479
+ "aten::mean": 1,
480
+ "aten::mul": 31,
481
+ "aten::softmax": 1,
482
+ "aten::sub": 14
483
+ }
484
+ },
485
+ {
486
+ "checkpoint": "deit_small_patch16_224.fb_in1k",
487
+ "display_name": "DeiT-S/16",
488
+ "error": null,
489
+ "expected_gmacs_from_model_card": 4.6,
490
+ "expected_parameters_m": 22.1,
491
+ "measured_gmacs": 4.25032896,
492
+ "measured_macs": 4250328960,
493
+ "model": "deit",
494
+ "parameters": 21704164,
495
+ "representative_run": "deit-standard-seed42",
496
+ "unsupported_operators": {
497
+ "aten::add": 25,
498
+ "aten::gelu": 12,
499
+ "aten::scaled_dot_product_attention": 12
500
+ }
501
+ },
502
+ {
503
+ "checkpoint": "deit_small_distilled_patch16_224.fb_in1k",
504
+ "display_name": "Distilled DeiT-S/16",
505
+ "error": null,
506
+ "expected_gmacs_from_model_card": 4.6,
507
+ "expected_parameters_m": 22.4,
508
+ "measured_gmacs": 4.271649024,
509
+ "measured_macs": 4271649024,
510
+ "model": "deit_distilled",
511
+ "parameters": 21743432,
512
+ "representative_run": "deit_distilled-standard-seed42",
513
+ "unsupported_operators": {
514
+ "aten::add": 26,
515
+ "aten::div": 1,
516
+ "aten::gelu": 12,
517
+ "aten::scaled_dot_product_attention": 12
518
+ }
519
+ }
520
+ ],
521
+ "protocol": {
522
+ "includes_data_loading": false,
523
+ "input_size": 224,
524
+ "synchronization": "CUDA events per iteration; synchronized wall clock otherwise",
525
+ "weights": "best validation checkpoint; one representative per architecture"
526
+ },
527
+ "schema_version": 1,
528
+ "tutorial_only": false
529
+ }
chapter-04-efficient-and-scalable-vision-transformers/results/distillation_gains.csv ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ seed,standard_top1,hard_kd_top1,gain_percentage_points
2
+ 42,89.74,89.83,0.09000000000000341
3
+ 43,89.21,89.61,0.4000000000000057
4
+ 44,89.42,89.72,0.29999999999999716
chapter-04-efficient-and-scalable-vision-transformers/results/epoch_metrics.csv ADDED
@@ -0,0 +1,261 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ run_key,model,display_name,mode,seed,epoch,train_loss,train_top1,validation_loss,validation_top1,cumulative_seconds,classification_loss,distillation_loss
2
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,1,3.7667001406351726,31.56888888888889,1.8161395473480224,70.0,159.24966592000033,,
3
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,2,1.8095489675309924,70.46,0.7216742023468018,83.18,296.13400899700014,,
4
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,3,1.4038030299504598,79.46666666666667,0.5683593006610871,86.54,434.103854834,,
5
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,4,1.2779912848154704,83.35555555555555,0.5082297623157501,87.32,572.8992680669996,,
6
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,5,1.197589386929406,85.94222222222223,0.4819089977264404,87.86,711.395580007,,
7
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,6,1.139879513253106,88.0,0.4684164373397827,88.32,849.9560964589998,,
8
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,7,1.0999575252744886,89.35777777777778,0.4619133004665375,88.76,988.9534960309995,,
9
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,8,1.0620388389693367,90.66,0.4679763640880585,88.36,1127.306333117,,
10
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,9,1.0302280043496026,91.79777777777778,0.45847382922172547,89.2,1265.6016385320002,,
11
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,10,1.0055605604489644,92.85111111111111,0.44975349364280703,89.12,1404.8528756820003,,
12
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,11,0.9827514073371887,93.58666666666667,0.45226348009109496,88.88,1542.4162078940005,,
13
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,12,0.9706555672645569,94.02888888888889,0.4561493213176727,89.16,1681.0910127630007,,
14
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,13,0.9541406662835015,94.58666666666667,0.45763017377853393,89.24,1819.9787216280004,,
15
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,14,0.9400494391123454,95.12666666666667,0.4576495222568512,89.08,1958.8628607710004,,
16
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,15,0.9326667542987399,95.41555555555556,0.45384993853569033,89.6,2098.1818932940005,,
17
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,16,0.9284473850038316,95.42888888888889,0.45101784572601317,89.6,2237.0839156250004,,
18
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,17,0.9209549523247613,95.80666666666667,0.4518927227973938,89.86,2376.160370025,,
19
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,18,0.9181310733053419,95.89111111111112,0.4524921130180359,89.66,2514.854323261,,
20
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,19,0.9160427381409539,95.92222222222222,0.4524287845611572,89.68,2651.8460178230007,,
21
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,20,0.9136880412737528,96.03333333333333,0.45195455298423765,89.7,2789.4574548180008,,
22
+ vit-standard-seed42,vit,ViT-S/16,standard,42,1,2.902411583709717,42.67333333333333,0.7650930633544922,80.46,83.11916694800001,,
23
+ vit-standard-seed42,vit,ViT-S/16,standard,42,2,1.5302659155527751,75.52666666666667,0.649686996459961,83.54,164.81945953899998,,
24
+ vit-standard-seed42,vit,ViT-S/16,standard,42,3,1.3980587674034965,79.51555555555555,0.5959713744163513,84.52,246.867734873,,
25
+ vit-standard-seed42,vit,ViT-S/16,standard,42,4,1.2869545261594983,83.11777777777777,0.573504077720642,85.8,331.16401449499995,,
26
+ vit-standard-seed42,vit,ViT-S/16,standard,42,5,1.2156278246985541,85.6288888888889,0.5497735964775086,86.28,415.21942545599995,,
27
+ vit-standard-seed42,vit,ViT-S/16,standard,42,6,1.1534308321634927,87.72666666666667,0.5519826049804688,86.18,499.18630522800004,,
28
+ vit-standard-seed42,vit,ViT-S/16,standard,42,7,1.1043820426834954,89.32,0.5393952094078064,87.08,583.2546063570001,,
29
+ vit-standard-seed42,vit,ViT-S/16,standard,42,8,1.0637690071105956,90.77777777777777,0.5385724670410156,86.7,667.412148083,,
30
+ vit-standard-seed42,vit,ViT-S/16,standard,42,9,1.0268184286435444,92.14222222222222,0.5259280432701111,87.26,751.691665754,,
31
+ vit-standard-seed42,vit,ViT-S/16,standard,42,10,0.999160442966885,93.18888888888888,0.5202932633399964,87.9,835.836512563,,
32
+ vit-standard-seed42,vit,ViT-S/16,standard,42,11,0.9693983827379015,94.13555555555556,0.514621384191513,88.42,920.0706118429999,,
33
+ vit-standard-seed42,vit,ViT-S/16,standard,42,12,0.9511773754755656,94.86666666666666,0.5179296373844147,87.9,1004.0796335339998,,
34
+ vit-standard-seed42,vit,ViT-S/16,standard,42,13,0.9272429713990953,95.67111111111112,0.5121905665397644,88.8,1086.6519678279997,,
35
+ vit-standard-seed42,vit,ViT-S/16,standard,42,14,0.910502517996894,96.21333333333334,0.5084908224105835,88.6,1168.9551837609997,,
36
+ vit-standard-seed42,vit,ViT-S/16,standard,42,15,0.8966341973834567,96.69555555555556,0.5138636219501496,88.86,1252.1163708319998,,
37
+ vit-standard-seed42,vit,ViT-S/16,standard,42,16,0.8879092311435276,97.07111111111111,0.5049399044036865,89.06,1336.772580855,,
38
+ vit-standard-seed42,vit,ViT-S/16,standard,42,17,0.8786597423129612,97.32,0.5035600093841552,89.32,1421.238053443,,
39
+ vit-standard-seed42,vit,ViT-S/16,standard,42,18,0.8743622001012167,97.47777777777777,0.4988097204208374,89.2,1505.2902451799998,,
40
+ vit-standard-seed42,vit,ViT-S/16,standard,42,19,0.8682376603338453,97.64888888888889,0.4981942099571228,89.18,1589.188959569,,
41
+ vit-standard-seed42,vit,ViT-S/16,standard,42,20,0.8671988519350687,97.64888888888889,0.49440441904067994,89.6,1673.357545405,,
42
+ swin-standard-seed42,swin,Swin-T,standard,42,1,3.1138392703586155,36.37777777777778,0.8303258764266968,78.2,182.143709855,,
43
+ swin-standard-seed42,swin,Swin-T,standard,42,2,1.6815805814531115,71.27555555555556,0.6566583446502685,82.28,362.3566214130001,,
44
+ swin-standard-seed42,swin,Swin-T,standard,42,3,1.4958824817233616,76.2688888888889,0.5993878432750702,84.08,542.215195601,,
45
+ swin-standard-seed42,swin,Swin-T,standard,42,4,1.3791291867574056,80.05111111111111,0.5440349873542786,85.46,722.4046990390001,,
46
+ swin-standard-seed42,swin,Swin-T,standard,42,5,1.2997279549280802,82.76222222222222,0.5114192454338073,86.52,902.6733066970002,,
47
+ swin-standard-seed42,swin,Swin-T,standard,42,6,1.2405421981493632,84.82222222222222,0.5049465229034423,87.18,1083.1310168,,
48
+ swin-standard-seed42,swin,Swin-T,standard,42,7,1.1918076894548204,86.44444444444444,0.49310361399650576,87.02,1264.15614292,,
49
+ swin-standard-seed42,swin,Swin-T,standard,42,8,1.1489616010453967,88.01777777777778,0.4983553493976593,87.32,1445.669742795,,
50
+ swin-standard-seed42,swin,Swin-T,standard,42,9,1.1118056599511041,89.42666666666666,0.47800114431381224,87.84,1627.8956264800001,,
51
+ swin-standard-seed42,swin,Swin-T,standard,42,10,1.0824293551127115,90.58888888888889,0.48054675245285033,87.88,1809.7915364240002,,
52
+ swin-standard-seed42,swin,Swin-T,standard,42,11,1.0564987625969782,91.44222222222223,0.4688482060432434,88.04,1992.3521930600004,,
53
+ swin-standard-seed42,swin,Swin-T,standard,42,12,1.0332676078372531,92.25555555555556,0.4628698630809784,89.16,2174.7467130040004,,
54
+ swin-standard-seed42,swin,Swin-T,standard,42,13,1.0080077913920085,93.19777777777777,0.4688817408561707,88.56,2357.198300522,,
55
+ swin-standard-seed42,swin,Swin-T,standard,42,14,0.9919483540429009,93.75333333333333,0.4652939272403717,88.94,2538.5730069070005,,
56
+ swin-standard-seed42,swin,Swin-T,standard,42,15,0.9800122749010722,94.24,0.4553578992366791,89.3,2720.9659736020003,,
57
+ swin-standard-seed42,swin,Swin-T,standard,42,16,0.9694040551715427,94.65333333333334,0.4507915984630585,89.48,2903.200041328,,
58
+ swin-standard-seed42,swin,Swin-T,standard,42,17,0.9622505562676323,94.91555555555556,0.4503328215122223,89.5,3085.8433564590005,,
59
+ swin-standard-seed42,swin,Swin-T,standard,42,18,0.9549930867618984,95.14666666666666,0.4524413750648498,89.52,3267.932922547,,
60
+ swin-standard-seed42,swin,Swin-T,standard,42,19,0.9485410739368862,95.36444444444444,0.4528714479923248,89.54,3450.0135159150004,,
61
+ swin-standard-seed42,swin,Swin-T,standard,42,20,0.9490107592052883,95.34222222222222,0.45156445999145506,89.54,3631.1184958180006,,
62
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,1,3.86097444513109,20.94,1.5167168102264403,61.48,87.81622463100001,,
63
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,2,1.963156677500407,62.82222222222222,0.8302864381790162,78.68,171.946322549,,
64
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,3,1.6159678107791478,73.06888888888889,0.7159340080261231,82.66,256.353993296,,
65
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,4,1.4824932571411134,77.32,0.6627669515609741,83.4,340.65199616900003,,
66
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,5,1.386941508441501,80.6,0.6122228536605835,84.48,425.15089323200004,,
67
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,6,1.3214185864342582,82.75555555555556,0.6030615650177001,84.94,509.56850352800006,,
68
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,7,1.2774883761088054,84.15555555555555,0.5855043698310852,85.2,593.7636439120001,,
69
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,8,1.2294677474127875,85.8711111111111,0.5810406120300293,85.48,678.2063882370003,,
70
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,9,1.1969785375383166,87.09333333333333,0.5696206838607788,85.52,762.6665857520002,,
71
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,10,1.1670788527382745,88.24222222222222,0.5626538040161133,86.16,847.2176097350002,,
72
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,11,1.1434139019860161,89.11111111111111,0.555591562795639,86.18,931.4248162340004,,
73
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,12,1.1194964197794597,89.94,0.5510715413093566,86.28,1015.5840988140005,,
74
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,13,1.101558770688375,90.42444444444445,0.5498418887138367,86.48,1102.2390305400006,,
75
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,14,1.0842033411237928,91.24,0.5494314468383789,86.3,1186.8125441570005,,
76
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,15,1.0785100873947144,91.50444444444445,0.5476529896259308,86.46,1272.3136917130005,,
77
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,16,1.0688635341538324,91.85111111111111,0.5373651230812073,86.66,1357.7778178120006,,
78
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,17,1.0617455692503188,92.08222222222223,0.5425855985641479,86.82,1443.1470524550007,,
79
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,18,1.0559050056669448,92.26,0.5469162731170655,86.64,1529.4091974040007,,
80
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,19,1.056951585345798,92.27333333333333,0.5501786388397217,86.62,1615.1883237940008,,
81
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,20,1.0506543249236213,92.40444444444445,0.5462933820724487,86.86,1701.0025390570008,,
82
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,1,3.194199195543925,37.67111111111111,0.9571177589416504,77.64,82.860228159,,
83
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,2,1.5704157097286648,74.24444444444444,0.6539145792961121,83.72,163.526656124,,
84
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,3,1.3949972147199843,79.32666666666667,0.5740103552818299,85.5,244.49539434799996,,
85
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,4,1.2877895130793253,82.95555555555555,0.5353437189102173,86.28,326.0574370830001,,
86
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,5,1.2159836768468222,85.20666666666666,0.5291574817180633,86.56,407.06445852300004,,
87
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,6,1.154969121668074,87.49111111111111,0.5094177061080932,88.12,487.88356403500006,,
88
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,7,1.110998962349362,88.97111111111111,0.5132681596279144,87.16,568.3669005710001,,
89
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,8,1.066391011344062,90.48222222222222,0.4960452775001526,88.08,648.94724951,,
90
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,9,1.0294513582865397,91.91111111111111,0.49717512345314024,88.4,730.5383563429999,,
91
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,10,1.0010287435213725,92.9888888888889,0.49309459257125854,88.36,811.1509497509999,,
92
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,11,0.9738257635116577,93.88444444444444,0.5020302115440368,88.28,892.7442546759999,,
93
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,12,0.952776749420166,94.6,0.4851966609477997,88.68,973.4491799649999,,
94
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,13,0.9325482057147556,95.30888888888889,0.4961971499443054,89.02,1054.4753422049998,,
95
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,14,0.9174271399603949,95.89111111111112,0.48942312593460086,89.32,1136.504434496,,
96
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,15,0.9073710475073921,96.11777777777777,0.4874080156326294,89.16,1219.5248612139999,,
97
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,16,0.8973959156354269,96.44888888888889,0.4900791407585144,89.44,1302.509800286,,
98
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,17,0.8886431807623969,96.7088888888889,0.48342578125,89.74,1386.602007661,,
99
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,18,0.8851760086165534,96.89333333333333,0.4842074983596802,89.58,1470.9288105599999,,
100
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,19,0.8782249345779419,97.1511111111111,0.48175542941093447,89.7,1555.347857367,,
101
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,20,0.8758682016266717,97.21111111111111,0.48031524109840396,89.8,1639.156589266,,
102
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,1,3.1554136654324,38.24444444444445,0.9740959652900696,77.38,84.901784078,,
103
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,2,1.5730218242645264,74.08444444444444,0.6653622232437134,82.8,168.07388327900003,,
104
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,3,1.4070982536527845,79.16666666666667,0.5856769444465637,85.18,253.31197407000002,,
105
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,4,1.2846227007971869,82.9,0.5376330299377441,86.32,337.77078011800006,,
106
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,5,1.216858652750651,85.30888888888889,0.5463018033981323,86.14,421.9236422840001,,
107
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,6,1.1511801248338487,87.44222222222223,0.509611957025528,87.22,507.1537427510001,,
108
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,7,1.1035662026723225,89.2688888888889,0.49713537378311157,87.76,590.0196407740001,,
109
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,8,1.0636458375400968,90.48,0.48970663332939146,88.16,674.4691078180001,,
110
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,9,1.0285717680401272,91.92444444444445,0.48187320470809936,88.54,759.7265785280001,,
111
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,10,1.0023919584910075,92.85111111111111,0.48758344564437867,88.52,845.157430746,,
112
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,11,0.9762912966516283,93.6,0.4860206575870514,88.9,929.443957199,,
113
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,12,0.9509553065723843,94.59333333333333,0.4846278016090393,89.0,1014.9636868690001,,
114
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,13,0.933472623931037,95.24666666666667,0.48037488231658937,88.78,1097.9972289520001,,
115
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,14,0.9183323530515035,95.80666666666667,0.4773489830970764,89.34,1181.646935469,,
116
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,15,0.9042640240881178,96.16444444444444,0.4777989665031433,89.24,1266.802762635,,
117
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,16,0.9012931256082323,96.37555555555555,0.4747199629306793,89.44,1349.042777788,,
118
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,17,0.8854330974155002,96.88444444444444,0.46981862335205077,89.56,1432.589390092,,
119
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,18,0.8824417904429965,97.02,0.4704814514160156,89.6,1518.1876454740002,,
120
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,19,0.8763937163247002,97.18888888888888,0.4697572201251984,89.68,1604.0159294580003,,
121
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,20,0.8764924024793836,97.24444444444444,0.46827153100967406,89.7,1688.338380226,,
122
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,1,3.196826624806722,37.33777777777778,1.0013699850082398,76.7,84.213616519,,
123
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,2,1.571290406841702,74.00222222222222,0.6547010645389557,83.54,168.12630540600003,,
124
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,3,1.3961302981058756,79.30666666666667,0.5598467971801758,85.62,253.62356726400006,,
125
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,4,1.2877197409311931,82.85333333333334,0.5460019410133362,85.68,338.49668671300003,,
126
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,5,1.209022402911716,85.53555555555556,0.5317278738021851,86.64,423.599549614,,
127
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,6,1.1572605774349636,87.45333333333333,0.5061660194873809,87.44,511.098877663,,
128
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,7,1.1038765400038826,89.26444444444445,0.5105860779762268,87.18,596.784319558,,
129
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,8,1.0689265658272638,90.45111111111112,0.491797119808197,88.16,681.875149594,,
130
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,9,1.0335834069781833,91.81777777777778,0.4941571761608124,88.18,767.032548826,,
131
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,10,1.0024565981970892,92.84666666666666,0.48806377296447756,88.56,852.112595989,,
132
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,11,0.9778886142412822,93.74444444444444,0.4922834037303925,88.36,937.2038073390002,,
133
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,12,0.9564637901730008,94.55111111111111,0.4861561080932617,88.52,1022.2376097670001,,
134
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,13,0.9358821586290995,95.18666666666667,0.48182631273269655,88.72,1107.0871700500002,,
135
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,14,0.9205817525015937,95.71333333333334,0.4810323775291443,89.02,1192.059168028,,
136
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,15,0.9094649105919732,96.12222222222222,0.4806832550048828,89.3,1277.24111453,,
137
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,16,0.8969224764929877,96.5111111111111,0.48068887367248536,89.36,1362.426087027,,
138
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,17,0.8901528752538893,96.70666666666666,0.47879109582901,89.62,1447.373477251,,
139
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,18,0.881282042588128,97.01555555555555,0.4804483486175537,89.66,1532.604494716,,
140
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,19,0.8807935371186998,97.10444444444444,0.47964754467010495,89.6,1617.6611158340002,,
141
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,20,0.8797675667126974,97.11111111111111,0.47917526655197146,89.58,1702.554159402,,
142
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,1,2.971982460445828,43.931111111111115,0.8180987700462341,80.22,83.843518139,,
143
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,2,1.5167006523132325,75.96,0.6119530912399292,84.4,167.168673744,,
144
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,3,1.3666032607608372,80.22444444444444,0.569834406042099,85.36,250.33327016199993,,
145
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,4,1.263768236372206,83.72,0.5298959607124328,86.88,333.486853559,,
146
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,5,1.19601071272956,86.19555555555556,0.517924436044693,87.26,416.604916755,,
147
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,6,1.1366201146337722,88.34444444444445,0.4964476699829102,87.62,500.433297622,,
148
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,7,1.0915187283833823,89.85777777777778,0.49391090426445006,87.94,583.6337957989999,,
149
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,8,1.0519614795684815,91.31111111111112,0.4845743315219879,88.52,667.746342061,,
150
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,9,1.0190510958777534,92.41111111111111,0.4960920108795166,88.6,752.2955900499999,,
151
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,10,0.9927112843725416,93.47777777777777,0.48470961332321166,88.94,836.8128453109999,,
152
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,11,0.9697918816778395,94.2,0.4851248734474182,88.82,921.118611499,,
153
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,12,0.9485911116917928,94.96,0.48808993263244627,89.18,1007.4213817830001,,
154
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,13,0.9298490361425612,95.5911111111111,0.4955332342624664,89.12,1092.0135485810001,,
155
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,14,0.9151839838027954,96.06444444444445,0.4814388228416443,89.38,1175.237132826,,
156
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,15,0.905952920850118,96.33333333333333,0.4765923174858093,89.34,1259.867307092,,
157
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,16,0.8961676205211215,96.72444444444444,0.47162820463180544,89.7,1344.531542515,,
158
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,17,0.8858082230461969,97.03777777777778,0.4764399881362915,89.64,1428.171998382,,
159
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,18,0.8820553650644091,97.22,0.474872510433197,89.94,1512.8349848000003,,
160
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,19,0.878790746720632,97.33333333333333,0.47467298197746277,90.04,1596.8932530280003,,
161
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,20,0.8764258578088548,97.31777777777778,0.47465604796409605,90.0,1680.1939577700005,,
162
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,1,3.0095239078097875,41.98,0.8497823201179504,79.96,86.148048668,,
163
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,2,1.5267975524478488,75.38666666666667,0.61035900349617,84.02,172.97497606500002,,
164
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,3,1.3784011817084418,80.10666666666667,0.5814183602333068,85.56,259.57245713,,
165
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,4,1.2618183036592272,83.78222222222222,0.5143791406154633,87.12,346.4161076959999,,
166
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,5,1.2004180563078986,86.07333333333334,0.5008319865703583,87.5,433.1932378729999,,
167
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,6,1.1408493053860134,88.00666666666666,0.5139105744361877,87.16,515.8224261859998,,
168
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,7,1.093280386077033,89.74888888888889,0.48809808349609374,87.72,597.2057122559999,,
169
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,8,1.0524332208739386,91.29555555555555,0.4791537547111511,88.68,679.6215752329998,,
170
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,9,1.0247595519913568,92.36,0.4839293314933777,88.42,761.7212217409999,,
171
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,10,0.9961849431355795,93.32666666666667,0.467258198928833,88.8,844.9681168279999,,
172
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,11,0.9716094647195604,94.1288888888889,0.48206463735103605,89.2,929.127655951,,
173
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,12,0.9504373678631253,94.85111111111111,0.47850291204452516,89.26,1012.4233676609998,,
174
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,13,0.9304480115678575,95.58222222222223,0.47780429615974424,89.1,1096.4166046849998,,
175
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,14,0.9158269773907132,96.06888888888889,0.4794639537334442,89.46,1180.3875245379998,,
176
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,15,0.9014540897687277,96.51777777777778,0.4796844746589661,89.76,1263.5969933509998,,
177
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,16,0.8968948127322727,96.67777777777778,0.47670816011428835,89.82,1347.8067791919998,,
178
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,17,0.8847612547768486,97.11777777777777,0.46957905249595644,90.0,1431.7310385709998,,
179
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,18,0.8790466987821791,97.24222222222222,0.47458293809890745,90.0,1514.7739755899997,,
180
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,19,0.8732703325483534,97.46,0.47182472505569456,90.0,1599.1957372069999,,
181
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,20,0.8731164227909513,97.54444444444445,0.47295894360542295,90.16,1683.276820501,,
182
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,1,2.9977581045362682,42.75555555555555,0.8509647571563721,79.68,84.188060908,,
183
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,2,1.5293172847323948,75.35333333333334,0.627078067445755,83.96,169.434934128,,
184
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,3,1.369779471927219,80.32222222222222,0.5474709315299988,85.8,257.82205899200005,,
185
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,4,1.2741754770067002,83.47333333333333,0.529567231798172,86.84,342.73414671300003,,
186
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,5,1.196279378551907,86.05777777777777,0.4961685337543488,88.0,430.40775736300003,,
187
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,6,1.143081200281779,87.99333333333334,0.491046804189682,88.18,516.3663920089999,,
188
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,7,1.0937492934544881,89.76666666666667,0.49740197639465333,87.96,605.995652101,,
189
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,8,1.0561246426052517,91.10444444444444,0.492019255065918,88.48,690.7955250440001,,
190
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,9,1.0237880036248102,92.31777777777778,0.47564145946502684,89.0,776.0408037910001,,
191
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,10,0.995832539876302,93.32222222222222,0.48339254236221313,89.46,864.8096337790003,,
192
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,11,0.9728447216245864,94.0111111111111,0.48064363379478453,88.82,953.6293515720001,,
193
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,12,0.9496805101182726,94.87333333333333,0.4762904680252075,89.54,1041.7340647820001,,
194
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,13,0.9323136636734008,95.46,0.48379494886398317,89.32,1133.8188962220004,,
195
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,14,0.9161827259805467,96.04444444444445,0.4832069589614868,89.44,1222.4505687970002,,
196
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,15,0.9069438054826524,96.36222222222223,0.4768580966949463,89.66,1311.3063252710003,,
197
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,16,0.8942975118849013,96.7311111111111,0.475810445690155,89.7,1396.1095069200005,,
198
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,17,0.8902478694915772,96.85333333333334,0.47872688302993777,89.88,1483.4896943250005,,
199
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,18,0.8789131625493367,97.26222222222222,0.480087397480011,89.98,1570.4980786050005,,
200
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,19,0.8805714562416077,97.26444444444445,0.47695729274749754,90.3,1657.6466858940005,,
201
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,20,0.8774085379070706,97.32444444444444,0.4765383381843567,90.28,1741.7318086770006,,
202
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,1,2.891303874291314,43.58444444444444,0.7823614247322083,79.72,129.67461937000002,3.0271674709743923,2.7554402774386935
203
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,2,1.1876610801908705,75.83555555555556,0.5414647546768189,84.16,252.34651784900004,1.5427573557959662,0.8325648040771484
204
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,3,1.0061806173854404,80.2088888888889,0.4768359443664551,85.9,375.692797325,1.3834636107232836,0.6288976232846578
205
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,4,0.8947540015962389,83.70222222222222,0.4441151406288147,86.78,500.362236125,1.2784623081419204,0.5110456932703654
206
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,5,0.8228176123407152,86.06222222222222,0.42421336784362795,87.16,625.7417416510001,1.2116484966066148,0.43398672875298394
207
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,6,0.763524847624037,88.20666666666666,0.409509094285965,87.98,751.6183524050001,1.1525930098109776,0.37445668535232546
208
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,7,0.7157429592556424,89.65555555555555,0.4245356678009033,87.68,877.2789197310001,1.109786534108056,0.3216993831422594
209
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,8,0.6763199755350748,90.95555555555555,0.4036053611040115,88.4,1000.958533601,1.071368237792121,0.28127171156141495
210
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,9,0.6393239784028795,92.3,0.4089566869735718,88.54,1125.552717204,1.037098964267307,0.2415489924536811
211
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,10,0.6139209205097622,93.15555555555555,0.4001792684316635,88.52,1249.907995705,1.0112061354955038,0.2166357067373064
212
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,11,0.5895874520301819,94.02222222222223,0.396558064365387,89.16,1375.8699237350002,0.9875530295477973,0.19162187317477333
213
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,12,0.573295332898034,94.64666666666666,0.3879859871864319,88.9,1499.8493775440002,0.9677312017228868,0.17885946276452805
214
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,13,0.5550679882844289,95.28,0.39951880366802217,89.2,1625.9221191220001,0.9492251159667969,0.16091086073981392
215
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,14,0.5398053416570028,95.70666666666666,0.3892052047252655,89.5,1751.1481698890002,0.9340377052730984,0.14557297928598192
216
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,15,0.5345867886543274,96.03333333333333,0.38163992581367495,89.64,1873.1241391210003,0.9239453143861559,0.145228263314565
217
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,16,0.5279601024097866,96.36222222222223,0.36974528813362123,90.16,1996.8540595680006,0.9125766407118904,0.14334356382422977
218
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,17,0.5234279460430146,96.59777777777778,0.36778093738555906,90.16,2121.2349653710007,0.9053525572141011,0.1415033326705297
219
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,18,0.5371519863181644,96.66888888888889,0.36090206460952756,90.32,2244.1225055700006,0.9007420391188727,0.17356193328963385
220
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,19,0.5340569213761224,96.74666666666667,0.359119135427475,90.38,2367.225204148001,0.8981096373028226,0.17000420770910052
221
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,20,0.5313887091318766,96.80444444444444,0.35858049035072326,90.46,2489.6353192010006,0.8954598051495022,0.16731761072741613
222
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,1,2.9287832387924193,41.54666666666667,0.8195689846992492,79.32,135.76922614600002,3.0824710364023846,2.7750954484727646
223
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,2,1.1976113839891223,75.24888888888889,0.5429152712345123,84.22,259.0439842480001,1.5526228285047743,0.842599940999349
224
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,3,1.0213200540648566,79.89111111111112,0.4906630965709686,85.7,382.164758299,1.3959846112993028,0.6466554945415921
225
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,4,0.8950510659959581,83.86888888888889,0.43704870057106016,86.72,505.474577456,1.2768856774224175,0.5132164569642809
226
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,5,0.8310969106144376,86.01333333333334,0.4212643687725067,87.84,628.704182082,1.2137438252555,0.4484499966568417
227
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,6,0.7742280316564771,87.83777777777777,0.43822868962287903,86.8,751.8393803299999,1.156732429631551,0.3917236333211263
228
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,7,0.728911703130934,89.42222222222222,0.4072139594554901,87.86,874.911157876,1.1124767728381686,0.34534663320117526
229
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,8,0.6893146724806891,90.94444444444444,0.4018845633506775,88.28,998.1578501330001,1.0699806736098396,0.3086486725065443
230
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,9,0.6664539758152432,91.9088888888889,0.4044099115848541,88.86,1121.247578128,1.0472418416129219,0.285666108724806
231
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,10,0.6395534198760986,92.82222222222222,0.39913368508815766,88.7,1244.5626637179998,1.0193096835242377,0.2597971566412184
232
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,11,0.6162675294452243,93.65777777777778,0.38752014577388766,89.04,1367.7723100969997,0.9938013131247626,0.23873374446762932
233
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,12,0.5965302309354147,94.24888888888889,0.38459586548805236,89.16,1490.8595400249997,0.9713725334591335,0.22168792927530076
234
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,13,0.5757942104657491,94.98,0.3848479796409607,89.1,1613.8521726029996,0.9526513829125298,0.19893703789446088
235
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,14,0.5671409094863468,95.52,0.3798333389759064,89.48,1737.0080181519995,0.9361915278858609,0.19809029173056283
236
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,15,0.554848009051217,95.81777777777778,0.3778343957185745,89.52,1860.1085322999993,0.9253742494795058,0.18432176601621839
237
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,16,0.5501120466444227,96.07555555555555,0.3691397216796875,89.62,1983.0631068049997,0.9187914066208733,0.18143268666267395
238
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,17,0.5379814247820113,96.32888888888888,0.3659845009803772,90.0,2106.316168004,0.9061751669036018,0.16978768435054356
239
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,18,0.5337994150055779,96.59777777777778,0.3606197656154633,89.7,2229.3478398089997,0.9013160623868306,0.1662827663845486
240
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,19,0.528296198993259,96.69333333333333,0.3612505676746368,89.9,2352.5222674789993,0.8955731566111247,0.16101924628681608
241
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,20,0.5296659093644884,96.8488888888889,0.361381387758255,90.06,2475.6306675059996,0.8955944094869825,0.16373740825917985
242
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,1,2.9172539457745024,42.32666666666667,0.8037968199729919,80.0,129.24327998899997,3.0575056590186227,2.777002233039008
243
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,2,1.199185688633389,75.25555555555556,0.5595191810131073,83.54,250.98709217099994,1.5534146911621094,0.8449566852993435
244
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,3,1.0142347576565212,80.26666666666667,0.4710086986064911,85.78,373.29275533500004,1.3892860037909613,0.6391835083431667
245
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,4,0.9099242265171474,83.39333333333333,0.4479987185955048,86.38,496.21334167299995,1.28951179945204,0.5303366531133652
246
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,5,0.8317347321404351,86.01333333333334,0.4168547761917114,87.74,619.0086425959998,1.2139732154740228,0.44949625146653915
247
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,6,0.7770806811332702,87.74888888888889,0.41382922625541685,88.04,741.9203825609998,1.1590111846076117,0.3951501806047228
248
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,7,0.7310264108763801,89.63777777777777,0.41661795749664304,87.6,864.9877230799998,1.111869426557753,0.3501833961725235
249
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,8,0.6927898583730062,90.92666666666666,0.4051929706573486,88.38,988.2038016439999,1.0743477234734429,0.31123199504216514
250
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,9,0.6638727407879299,91.84222222222222,0.37963612928390505,89.06,1111.5598942339998,1.0453598051495023,0.28238567671246
251
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,10,0.6362758345921834,92.82888888888888,0.39949473524093626,88.9,1234.8359054669997,1.0173541036817764,0.25519756574630736
252
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,11,0.6193733670075734,93.57777777777778,0.385602642250061,89.36,1357.7475060469997,0.9946745898988512,0.2440721433401108
253
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,12,0.5950572917408413,94.30222222222223,0.39176607789993284,89.08,1481.1199927039995,0.9713103383594089,0.21880424451298183
254
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,13,0.5815811908192104,94.81555555555556,0.38579091906547547,89.26,1604.1639940099997,0.9551089630974664,0.20805342066287993
255
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,14,0.562831224515703,95.49333333333334,0.38141796951293944,89.42,1727.3423413549997,0.9377868717829386,0.18787557439009347
256
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,15,0.5554835402594672,95.67111111111112,0.3635530668258667,90.18,1850.2814545489998,0.9289417793273925,0.18202530020078023
257
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,16,0.5463188575108846,96.04888888888888,0.356517165517807,90.16,1973.2980403569998,0.9175062625249227,0.17513145196172927
258
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,17,0.5405616811116536,96.2688888888889,0.3586801685333252,90.04,2096.783539895,0.9109745461569893,0.17014881643454233
259
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,18,0.5333575668652852,96.67333333333333,0.3591350576877594,90.08,2220.469081041,0.8992170536465115,0.16749807998869154
260
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,19,0.5337492761823867,96.54222222222222,0.35689546976089476,90.28,2344.1217141380007,0.9018334956169128,0.1656650566233529
261
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,20,0.533892258728875,96.57555555555555,0.3583702641963959,90.06,2467.4307780010004,0.8999511775864495,0.1678333395799001
chapter-04-efficient-and-scalable-vision-transformers/results/figures/accuracy_throughput.png ADDED
chapter-04-efficient-and-scalable-vision-transformers/results/figures/distillation_gain.png ADDED
chapter-04-efficient-and-scalable-vision-transformers/results/figures/validation_accuracy.png ADDED

Git LFS Details

  • SHA256: fcad5d1e62af49e8962c33a05832acdc09b0c66cf7118006481120289ea7f9d1
  • Pointer size: 131 Bytes
  • Size of remote file: 198 kB
chapter-04-efficient-and-scalable-vision-transformers/results/inference_benchmark.csv ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ batch_size,latency_mean_ms,latency_median_ms,latency_p90_ms,latency_std_ms,model,peak_memory_mb,precision,repeats,samples,status,throughput_images_per_second,timed_iterations,warmup_iterations
2
+ 1,4.777800642490387,4.769615888595581,4.826025533676148,0.09854292782443023,convnext,132.1884765625,fp32,5,1000,complete,209.3013239411259,200,50
3
+ 64,127.90953128051758,128.02047729492188,132.2467269897461,3.4320032409674415,convnext,962.6767578125,fp32,5,1000,complete,500.3536433859804,200,50
4
+ 1,5.376872823238373,5.378112077713013,5.495808124542236,0.11512835348717641,convnext,183.4208984375,fp16,5,1000,complete,185.98170960601627,200,50
5
+ 64,57.763763633728026,57.5544319152832,59.53341598510742,1.2430091115071689,convnext,728.7607421875,fp16,5,1000,complete,1107.9610464064474,200,50
6
+ 1,4.280692895412445,4.261360168457031,4.343808174133301,0.16694712271134712,vit,97.1484375,fp32,5,1000,complete,233.60704083016213,200,50
7
+ 64,106.9532296295166,106.99007797241211,108.48696365356446,1.1434555353430906,vit,351.763671875,fp32,5,1000,complete,598.3924021901391,200,50
8
+ 1,4.69389853143692,4.659152030944824,4.780019092559815,0.16487908037721768,vit,137.90283203125,fp16,5,1000,complete,213.04252601597565,200,50
9
+ 64,32.072251497268674,32.125953674316406,33.052775573730464,0.8095062193205872,vit,320.05126953125,fp16,5,1000,complete,1995.4944543089014,200,50
10
+ 1,8.11762380886078,8.089599609375,8.21555233001709,0.07401799461648069,swin,134.0771484375,fp32,5,1000,complete,123.18875862520896,200,50
11
+ 64,178.14805532836914,178.41305541992188,180.40453033447267,1.9795728141419107,swin,1077.705078125,fp32,5,1000,complete,359.251746430983,200,50
12
+ 1,9.13337626171112,9.041919708251953,9.377792358398438,0.29909913260705207,swin,185.33349609375,fp16,5,1000,complete,109.4885364782565,200,50
13
+ 64,84.70931391143799,84.73241424560547,86.2045181274414,1.2024556603816736,swin,970.5625,fp16,5,1000,complete,755.5249481410133,200,50
14
+ 1,5.772215712070465,5.725183963775635,5.933670282363892,0.18675654583815726,efficientformer,60.97119140625,fp32,5,1000,complete,173.2436987600564,200,50
15
+ 64,56.72956251525879,56.71116638183594,57.0277889251709,0.22907337112652218,efficientformer,497.74072265625,fp32,5,1000,complete,1128.1595902098777,200,50
16
+ 1,6.20901661491394,6.112767934799194,6.5593345165252686,0.30308211309436084,efficientformer,80.21435546875,fp16,5,1000,complete,161.05609986580146,200,50
17
+ 64,32.634319339752196,32.62673568725586,32.93388748168945,0.21541325392113395,efficientformer,354.11083984375,fp16,5,1000,complete,1961.125627708158,200,50
18
+ 1,4.368596731185913,4.306943893432617,4.604022598266601,0.16726820626053793,deit,97.1484375,fp32,5,1000,complete,228.9064570463424,200,50
19
+ 64,106.82791548156739,106.8067855834961,107.79443359375,0.8205535043948153,deit,351.763671875,fp32,5,1000,complete,599.094344502518,200,50
20
+ 1,4.722966948986054,4.696063995361328,4.82521595954895,0.09960610584523705,deit,137.90283203125,fp16,5,1000,complete,211.73131440495982,200,50
21
+ 64,32.135718923568724,32.168447494506836,33.121176147460936,0.8138286399443037,deit,320.05126953125,fp16,5,1000,complete,1991.5533911725133,200,50
22
+ 1,4.383408827781677,4.355168104171753,4.442111968994141,0.20651985327066089,deit_distilled,97.30419921875,fp32,5,1000,complete,228.13295297990092,200,50
23
+ 64,105.38310792541503,105.41926574707031,106.30379638671876,0.7789229665081872,deit_distilled,352.50732421875,fp32,5,1000,complete,607.3079572230498,200,50
24
+ 1,4.723058529853821,4.704256057739258,4.769792079925537,0.15652674115081888,deit_distilled,138.13818359375,fp16,5,1000,complete,211.72720890057442,200,50
25
+ 64,32.341811212539675,32.4213752746582,33.34256629943848,0.8330030872120695,deit_distilled,321.55615234375,fp16,5,1000,complete,1978.8625806827326,200,50
chapter-04-efficient-and-scalable-vision-transformers/results/model_profiles.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ checkpoint,display_name,error,expected_gmacs_from_model_card,expected_parameters_m,measured_gmacs,measured_macs,model,parameters,representative_run,unsupported_operators
2
+ convnext_tiny.fb_in1k,ConvNeXt-T,,4.5,28.6,4.469746176,4469746176,convnext,27897028,convnext-standard-seed42,"{'aten::add': 18, 'aten::gelu': 18, 'aten::mul': 18}"
3
+ vit_small_patch16_224.augreg_in1k,ViT-S/16,,4.3,22.1,4.25032896,4250328960,vit,21704164,vit-standard-seed42,"{'aten::add': 25, 'aten::gelu': 12, 'aten::scaled_dot_product_attention': 12}"
4
+ swin_tiny_patch4_window7_224.ms_in1k,Swin-T,,4.5,28.3,4.508503296,4508503296,swin,27596254,swin-standard-seed42,"{'aten::add': 41, 'aten::bernoulli_': 22, 'aten::div_': 22, 'aten::gelu': 12, 'aten::mean': 1, 'aten::mul': 34, 'aten::pad': 15, 'aten::rsub': 24, 'aten::softmax': 12}"
5
+ efficientformer_l1.snap_dist_in1k,EfficientFormer-L1,,1.3,12.3,1.317055936,1317055936,efficientformer,11481728,efficientformer-standard-seed42,"{'aten::add': 32, 'aten::add_': 33, 'aten::avg_pool2d': 14, 'aten::div': 1, 'aten::gelu': 15, 'aten::mean': 1, 'aten::mul': 31, 'aten::softmax': 1, 'aten::sub': 14}"
6
+ deit_small_patch16_224.fb_in1k,DeiT-S/16,,4.6,22.1,4.25032896,4250328960,deit,21704164,deit-standard-seed42,"{'aten::add': 25, 'aten::gelu': 12, 'aten::scaled_dot_product_attention': 12}"
7
+ deit_small_distilled_patch16_224.fb_in1k,Distilled DeiT-S/16,,4.6,22.4,4.271649024,4271649024,deit_distilled,21743432,deit_distilled-standard-seed42,"{'aten::add': 26, 'aten::div': 1, 'aten::gelu': 12, 'aten::scaled_dot_product_attention': 12}"
chapter-04-efficient-and-scalable-vision-transformers/results/report.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Full vision-transformer benchmark
2
+
3
+ Configuration fingerprint: `7b87d57ae5546600c460245a81431288db34c3e40a44c2e83da01acc4160d731`.
4
+
5
+ ## Main comparison
6
+
7
+ | Model | Training | Seeds | Test top-1 (%) | Parameters (M) | Images/s | Timing setting |
8
+ | --- | --- | --- | --- | --- | --- | --- |
9
+ | ConvNeXt-T | standard | 1 | 89.78 | 27.90 | 1107.96 | fp16, batch 64 |
10
+ | ViT-S/16 | standard | 1 | 89.22 | 21.70 | 1995.49 | fp16, batch 64 |
11
+ | Swin-T | standard | 1 | 89.54 | 27.60 | 755.52 | fp16, batch 64 |
12
+ | EfficientFormer-L1 | standard | 1 | 86.83 | 11.48 | 1961.13 | fp16, batch 64 |
13
+ | DeiT-S/16 | standard | 3 | 88.86 ± 0.03 | 21.70 | 1991.55 | fp16, batch 64 |
14
+ | Distilled DeiT-S/16 | standard | 3 | 89.46 ± 0.27 | 21.74 | 1978.86 | fp16, batch 64 |
15
+ | Distilled DeiT-S/16 | hard_kd | 3 | 89.72 ± 0.11 | 21.74 | 1978.86 | fp16, batch 64 |
16
+
17
+ A `±` value is the sample standard deviation across seeds; single-seed rows have no
18
+ uncertainty estimate. Throughput is an architecture property here, so the same timing is
19
+ reused for standard and hard-distilled runs of the same Distilled DeiT model.
20
+
21
+ ## Isolated training-time distillation gain
22
+
23
+ This paired comparison holds the Distilled DeiT architecture and seed fixed. It isolates
24
+ the effect of using the ConvNeXt teacher during fine-tuning; comparing ordinary DeiT with
25
+ Distilled DeiT would also change the checkpoint and architecture.
26
+
27
+ | Seed | Standard top-1 | Hard-KD top-1 | Gain (points) |
28
+ | --- | --- | --- | --- |
29
+ | 42 | 89.74 | 89.83 | 0.09 |
30
+ | 43 | 89.21 | 89.61 | 0.40 |
31
+ | 44 | 89.42 | 89.72 | 0.30 |
32
+
33
+ ## Hardware protocol
34
+
35
+ Device: **NVIDIA L4**; PyTorch 2.9.1+cu128; precision and batch size are shown per row. Timing excludes data loading and includes synchronized model forward passes.
36
+
37
+ The operation counter reports MAC-style fvcore operations (one multiply-add is counted as
38
+ one), plus any unsupported operators in `model_profiles.csv`. Peak memory is allocator
39
+ memory, not whole-system power or memory use.
40
+
41
+ ## Training behavior and trade-offs
42
+
43
+ ![Validation Accuracy](figures/validation_accuracy.png)
44
+ ![Distillation Gain](figures/distillation_gain.png)
45
+ ![Accuracy Throughput](figures/accuracy_throughput.png)
46
+
47
+ ## Reproducibility files
48
+
49
+ - `run_results.csv`: one row per seed and training mode
50
+ - `epoch_metrics.csv`: learning curves and elapsed training time
51
+ - `aggregate_results.csv`: grouped accuracy statistics
52
+ - `distillation_gains.csv`: paired hard-distillation differences
53
+ - `model_profiles.csv` and `inference_benchmark.csv`: created after hardware benchmarking
54
+ - each run directory: resolved configuration, checkpoints, predictions, and environment data
55
+
56
+ Select checkpoints with validation accuracy only. The official CIFAR-100 test split is
57
+ evaluated after training and is not used for early stopping or hyperparameter selection.
chapter-04-efficient-and-scalable-vision-transformers/results/report_summary.json ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "aggregate": [
3
+ {
4
+ "best_validation_top1_mean": 89.86,
5
+ "display_name": "ConvNeXt-T",
6
+ "mode": "standard",
7
+ "model": "convnext",
8
+ "parameters_m": 27.897028,
9
+ "seeds": 1,
10
+ "test_top1_mean": 89.78,
11
+ "test_top1_std": NaN,
12
+ "test_top5_mean": 98.86,
13
+ "training_peak_memory_mb": 4245.66796875,
14
+ "training_seconds_mean": 2789.4574548180008
15
+ },
16
+ {
17
+ "best_validation_top1_mean": 89.6,
18
+ "display_name": "ViT-S/16",
19
+ "mode": "standard",
20
+ "model": "vit",
21
+ "parameters_m": 21.704164,
22
+ "seeds": 1,
23
+ "test_top1_mean": 89.22,
24
+ "test_top1_std": NaN,
25
+ "test_top5_mean": 98.32,
26
+ "training_peak_memory_mb": 2563.0244140625,
27
+ "training_seconds_mean": 1673.357545405
28
+ },
29
+ {
30
+ "best_validation_top1_mean": 89.54,
31
+ "display_name": "Swin-T",
32
+ "mode": "standard",
33
+ "model": "swin",
34
+ "parameters_m": 27.596254,
35
+ "seeds": 1,
36
+ "test_top1_mean": 89.54,
37
+ "test_top1_std": NaN,
38
+ "test_top5_mean": 98.65,
39
+ "training_peak_memory_mb": 4843.58154296875,
40
+ "training_seconds_mean": 3631.1184958180006
41
+ },
42
+ {
43
+ "best_validation_top1_mean": 86.86,
44
+ "display_name": "EfficientFormer-L1",
45
+ "mode": "standard",
46
+ "model": "efficientformer",
47
+ "parameters_m": 11.481728,
48
+ "seeds": 1,
49
+ "test_top1_mean": 86.83,
50
+ "test_top1_std": NaN,
51
+ "test_top5_mean": 98.26,
52
+ "training_peak_memory_mb": 2633.85888671875,
53
+ "training_seconds_mean": 1701.0025390570008
54
+ },
55
+ {
56
+ "best_validation_top1_mean": 89.71999999999998,
57
+ "display_name": "DeiT-S/16",
58
+ "mode": "standard",
59
+ "model": "deit",
60
+ "parameters_m": 21.704164,
61
+ "seeds": 3,
62
+ "test_top1_mean": 88.86,
63
+ "test_top1_std": 0.030000000000001137,
64
+ "test_top5_mean": 98.19666666666667,
65
+ "training_peak_memory_mb": 2563.0244140625,
66
+ "training_seconds_mean": 1676.6830429646668
67
+ },
68
+ {
69
+ "best_validation_top1_mean": 90.16666666666667,
70
+ "display_name": "Distilled DeiT-S/16",
71
+ "mode": "standard",
72
+ "model": "deit_distilled",
73
+ "parameters_m": 21.743432,
74
+ "seeds": 3,
75
+ "test_top1_mean": 89.45666666666666,
76
+ "test_top1_std": 0.2668957349478132,
77
+ "test_top5_mean": 98.26666666666667,
78
+ "training_peak_memory_mb": 2566.7571614583335,
79
+ "training_seconds_mean": 1701.7341956493337
80
+ },
81
+ {
82
+ "best_validation_top1_mean": 90.26666666666667,
83
+ "display_name": "Distilled DeiT-S/16",
84
+ "mode": "hard_kd",
85
+ "model": "deit_distilled",
86
+ "parameters_m": 21.743432,
87
+ "seeds": 3,
88
+ "test_top1_mean": 89.71999999999998,
89
+ "test_top1_std": 0.10999999999999943,
90
+ "test_top5_mean": 98.88999999999999,
91
+ "training_peak_memory_mb": 3051.60888671875,
92
+ "training_seconds_mean": 2477.565588236
93
+ }
94
+ ],
95
+ "completed_runs": 13,
96
+ "config_fingerprint": "7b87d57ae5546600c460245a81431288db34c3e40a44c2e83da01acc4160d731",
97
+ "distillation_gains": [
98
+ {
99
+ "gain_percentage_points": 0.09000000000000341,
100
+ "hard_kd_top1": 89.83,
101
+ "seed": 42,
102
+ "standard_top1": 89.74
103
+ },
104
+ {
105
+ "gain_percentage_points": 0.4000000000000057,
106
+ "hard_kd_top1": 89.61,
107
+ "seed": 43,
108
+ "standard_top1": 89.21
109
+ },
110
+ {
111
+ "gain_percentage_points": 0.29999999999999716,
112
+ "hard_kd_top1": 89.72,
113
+ "seed": 44,
114
+ "standard_top1": 89.42
115
+ }
116
+ ],
117
+ "figures": [
118
+ "validation_accuracy.png",
119
+ "distillation_gain.png",
120
+ "accuracy_throughput.png"
121
+ ],
122
+ "missing_runs": [],
123
+ "preset": "full",
124
+ "schema_version": 1,
125
+ "tutorial_only": false
126
+ }
chapter-04-efficient-and-scalable-vision-transformers/results/run_results.csv ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ run_key,model,display_name,mode,seed,best_epoch,best_validation_top1,test_top1,test_top5,parameters,parameters_m,training_seconds,training_peak_memory_mb,run_directory
2
+ convnext-standard-seed42,convnext,ConvNeXt-T,standard,42,17,89.86,89.78,98.86,27897028,27.897028,2789.4574548180008,4245.66796875,/vol/artifacts/full/convnext-standard-seed42-7b87d57ae5
3
+ vit-standard-seed42,vit,ViT-S/16,standard,42,20,89.6,89.22,98.32,21704164,21.704164,1673.357545405,2563.0244140625,/vol/artifacts/full/vit-standard-seed42-7b87d57ae5
4
+ swin-standard-seed42,swin,Swin-T,standard,42,20,89.54,89.54,98.65,27596254,27.596254,3631.1184958180006,4843.58154296875,/vol/artifacts/full/swin-standard-seed42-7b87d57ae5
5
+ efficientformer-standard-seed42,efficientformer,EfficientFormer-L1,standard,42,20,86.86,86.83,98.26,11481728,11.481728,1701.0025390570008,2633.85888671875,/vol/artifacts/full/efficientformer-standard-seed42-7b87d57ae5
6
+ deit-standard-seed42,deit,DeiT-S/16,standard,42,20,89.8,88.89,98.09,21704164,21.704164,1639.156589266,2563.0244140625,/vol/artifacts/full/deit-standard-seed42-7b87d57ae5
7
+ deit-standard-seed43,deit,DeiT-S/16,standard,43,20,89.7,88.86,98.22,21704164,21.704164,1688.338380226,2563.0244140625,/vol/artifacts/full/deit-standard-seed43-7b87d57ae5
8
+ deit-standard-seed44,deit,DeiT-S/16,standard,44,18,89.66,88.83,98.28,21704164,21.704164,1702.554159402,2563.0244140625,/vol/artifacts/full/deit-standard-seed44-7b87d57ae5
9
+ deit_distilled-standard-seed42,deit_distilled,Distilled DeiT-S/16,standard,42,19,90.04,89.74,98.25,21743432,21.743432,1680.1939577700005,2594.0869140625,/vol/artifacts/full/deit_distilled-standard-seed42-7b87d57ae5
10
+ deit_distilled-standard-seed43,deit_distilled,Distilled DeiT-S/16,standard,43,20,90.16,89.21,98.24,21743432,21.743432,1683.276820501,2594.0869140625,/vol/artifacts/full/deit_distilled-standard-seed43-7b87d57ae5
11
+ deit_distilled-standard-seed44,deit_distilled,Distilled DeiT-S/16,standard,44,19,90.3,89.42,98.31,21743432,21.743432,1741.7318086770006,2512.09765625,/vol/artifacts/full/deit_distilled-standard-seed44-7b87d57ae5
12
+ deit_distilled-hard_kd-seed42,deit_distilled,Distilled DeiT-S/16,hard_kd,42,20,90.46,89.83,98.88,21743432,21.743432,2489.6353192010006,3051.60888671875,/vol/artifacts/full/deit_distilled-hard_kd-seed42-7b87d57ae5
13
+ deit_distilled-hard_kd-seed43,deit_distilled,Distilled DeiT-S/16,hard_kd,43,20,90.06,89.61,98.94,21743432,21.743432,2475.6306675059996,3051.60888671875,/vol/artifacts/full/deit_distilled-hard_kd-seed43-7b87d57ae5
14
+ deit_distilled-hard_kd-seed44,deit_distilled,Distilled DeiT-S/16,hard_kd,44,19,90.28,89.72,98.85,21743432,21.743432,2467.4307780010004,3051.60888671875,/vol/artifacts/full/deit_distilled-hard_kd-seed44-7b87d57ae5