Flor commited on
Commit
64e14d3
·
verified ·
1 Parent(s): 5804215

card: update from fastforks 24802779

Browse files
Files changed (1) hide show
  1. README.md +19 -16
README.md CHANGED
@@ -44,11 +44,11 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `convnextv2_base.fcmae_ft_in22
44
 
45
  ## Speed and memory
46
 
47
- ### Classification, synthetic, 224x224
48
 
49
- | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
50
- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
51
- | `convnextv2_base.fcmae_ft_in22k_in1k` | 10.7 | 14.6 | 10.2 | 2.94 | 3.7x | 3.5x | 542 / 566 | 299 / 376 | 318 / 380 |
52
 
53
  ### Startup and first call
54
 
@@ -58,23 +58,26 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `convnextv2_base.fcmae_ft_in22
58
 
59
  ### torch.compile and TensorRT
60
 
61
- | model | input | portable ms | compile ms | compile s (cold) | TensorRT fp16 ms | ONNX + build s | kernels ms | peak MiB (alloc / reserved): portable | compile | TensorRT (device) |
62
- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
63
- | `convnextv2_base.fcmae_ft_in22k_in1k` | 224x224 | 10.2 | 3.8 | 14.4 | 2.1 | 35 | 2.94 | 299 / 376 | 324 / 356 | 204 |
64
-
65
- ### Fixed-size speed and peak memory, all models
66
-
67
- | model | mode | 224x224 |
68
- | --- | --- | --- |
69
- | `convnextv2_base.fcmae_ft_in22k_in1k` | portable | 10.2 ms / 300 / 370 |
70
- | `convnextv2_base.fcmae_ft_in22k_in1k` | kernels | 3.0 ms / 334 / 450 |
71
 
72
  Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
73
 
74
- Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the authors' code at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
75
 
76
  ## Accuracy
77
 
 
 
 
 
 
 
 
 
 
 
78
  ### Parity with the original code
79
 
80
  Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 and p99 <= 0.08 (absolute error of the output `logits`).
@@ -97,4 +100,4 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
97
 
98
  `classification.load("convnextv2_base.fcmae_ft_in22k_in1k", mode="kernels")` runs our CUDA kernels (`cudnn_hacc`, `fvm_conv`, `fvm_extra`, `fvm_mb`, `fvm_r3`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice.
99
 
100
- <!-- staged from fastforks feccac41 (2026-11-06) -->
 
44
 
45
  ## Speed and memory
46
 
47
+ ### Classification, synthetic
48
 
49
+ | model | input | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
50
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
51
+ | `convnextv2_base.fcmae_ft_in22k_in1k` | 224x224 | 10.7 | 14.6 | 10.2 | 2.94 | 3.7x | 3.5x | 542 / 566 | 299 / 376 | 318 / 380 |
52
 
53
  ### Startup and first call
54
 
 
58
 
59
  ### torch.compile and TensorRT
60
 
61
+ | model | input | time: portable | compile | TensorRT fp16 | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) |
62
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
63
+ | `convnextv2_base.fcmae_ft_in22k_in1k` | 224x224 | 10.2 ms | 3.85 ms | 2.13 ms | 2.94 ms | 14.4 s | 35.1 s | 299 / 376 | 324 / 356 | 318 / 380 | 486 / 518 |
 
 
 
 
 
 
 
64
 
65
  Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB).
66
 
67
+ Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's.
68
 
69
  ## Accuracy
70
 
71
+ ### On public datasets
72
+
73
+ fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Original = the original code named under Details, same checkpoint and protocol.
74
+
75
+ | variant | dataset | original fp32 | original fp16 | portable | kernels | note |
76
+ |---|---|---|---|---|---|---|
77
+ | `convnextv2_base.fcmae_ft_in22k_in1k` | ImageNet-1k val, 5000 random images, top-1 / top-5 % | 87.32 / 98.18 | 87.32 / 98.18 | 87.10 / 98.14 | 87.10 / 98.14 | |
78
+
79
+ Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
80
+
81
  ### Parity with the original code
82
 
83
  Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.002 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.02 and p99 <= 0.08 (absolute error of the output `logits`).
 
100
 
101
  `classification.load("convnextv2_base.fcmae_ft_in22k_in1k", mode="kernels")` runs our CUDA kernels (`cudnn_hacc`, `fvm_conv`, `fvm_extra`, `fvm_mb`, `fvm_r3`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice.
102
 
103
+ <!-- staged from fastforks 24802779 (2026-11-15) -->