Flor commited on
Commit
734e879
·
verified ·
1 Parent(s): 75a79cf

Model card synced with fastforks 7204e33f

Browse files
Files changed (1) hide show
  1. README.md +12 -4
README.md CHANGED
@@ -48,13 +48,19 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `efficientvit_b2.r288_in1k` 28
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
- | `efficientvit_b2.r288_in1k` | 10.67 | 14.66 | 11.9 | 1.2 | 8.9x | 9.9x | 173 / 194 | 85 / 124 | 120 / 190 |
52
 
53
  ### Startup and first call
54
 
55
  | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
56
  | --- | --- | --- | --- | --- | --- | --- |
57
- | `efficientvit_b2.r288_in1k` | 1.84 | 0.40 | 0.26† | 1.89 | 0.04 | 0.00 |
 
 
 
 
 
 
58
 
59
  ### Fixed-size speed and peak memory, all models
60
 
@@ -71,14 +77,14 @@ Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastfo
71
 
72
  ### Parity with the original code
73
 
74
- Every variant is checked against golden 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.05 px and p99 <= 0.2 px.
75
 
76
  ## Usage
77
 
78
  ```python
79
  from fastforks import classification
80
 
81
- model = classification.load("efficientvit_b2.r288_in1k") # portable PyTorch on the GPU if there is one, else the CPU
82
  result = model("photo.jpg")
83
  result.top(5) # top-5 classes
84
  result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
@@ -89,3 +95,5 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
89
  ## Kernels backend
90
 
91
  `classification.load("efficientvit_b2.r288_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.
 
 
 
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
+ | `efficientvit_b2.r288_in1k` | 10.67 | 14.66 | 11.9 | 1.105 | 9.7x | 10.8x | 173 / 194 | 85 / 124 | 120 / 212 |
52
 
53
  ### Startup and first call
54
 
55
  | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
56
  | --- | --- | --- | --- | --- | --- | --- |
57
+ | `efficientvit_b2.r288_in1k` | 1.84 | 0.40 | 1.92 | 1.89 | 0.04 | 0.05 |
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
+ | `efficientvit_b2.r288_in1k` | 224x224 | 11.9 | 6.9 | 11.0 | 0.7 | 39 | 1.105 | 85 / 124 | 120 / 164 | 72 |
64
 
65
  ### Fixed-size speed and peak memory, all models
66
 
 
77
 
78
  ### Parity with the original code
79
 
80
+ Every variant is checked against golden 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.05 and p99 <= 0.2 (absolute error of the output `logits`).
81
 
82
  ## Usage
83
 
84
  ```python
85
  from fastforks import classification
86
 
87
+ model = classification.load("efficientvit_b2.r288_in1k") # mode="auto": the preferred backend from recorded measurements
88
  result = model("photo.jpg")
89
  result.top(5) # top-5 classes
90
  result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
 
95
  ## Kernels backend
96
 
97
  `classification.load("efficientvit_b2.r288_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.
98
+
99
+ <!-- staged from fastforks 7204e33f (2026-11-05) -->