Flor commited on
Commit
46aa3c0
·
verified ·
1 Parent(s): 0e13266

Model card synced with fastforks 7204e33f

Browse files
Files changed (1) hide show
  1. README.md +12 -4
README.md CHANGED
@@ -52,13 +52,19 @@ Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `fastvit_sa24.apple_dist_in1k`
52
 
53
  | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
54
  | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
55
- | `fastvit_sa24.apple_dist_in1k` | 11.92 | 16.53 | 6.88 | 1.49 | 8.0x | 4.6x | 157 / 176 | 81 / 108 | 111 / 168 |
56
 
57
  ### Startup and first call
58
 
59
  | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
60
  | --- | --- | --- | --- | --- | --- | --- |
61
- | `fastvit_sa24.apple_dist_in1k` | 2.49 | 0.62 | 0.74† | 1.67 | 0.17 | 0.00 |
 
 
 
 
 
 
62
 
63
  ### Fixed-size speed and peak memory, all models
64
 
@@ -75,14 +81,14 @@ Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastfo
75
 
76
  ### Parity with the original code
77
 
78
- 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.02 px and p99 <= 0.08 px.
79
 
80
  ## Usage
81
 
82
  ```python
83
  from fastforks import classification
84
 
85
- model = classification.load("fastvit_sa24.apple_dist_in1k") # portable PyTorch on the GPU if there is one, else the CPU
86
  result = model("photo.jpg")
87
  result.top(5) # top-5 classes
88
  result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
@@ -93,3 +99,5 @@ Install with `pip install fastforks` (see <https://github.com/kleinicke/fastfork
93
  ## Kernels backend
94
 
95
  `classification.load("fastvit_sa24.apple_dist_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.
 
 
 
52
 
53
  | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels |
54
  | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
55
+ | `fastvit_sa24.apple_dist_in1k` | 11.92 | 16.53 | 6.88 | 1.393 | 8.6x | 4.9x | 157 / 176 | 81 / 108 | 112 / 190 |
56
 
57
  ### Startup and first call
58
 
59
  | model | load (s): original | portable | kernels | first call (s): original | portable | kernels |
60
  | --- | --- | --- | --- | --- | --- | --- |
61
+ | `fastvit_sa24.apple_dist_in1k` | 2.49 | 0.62 | 2.42 | 1.67 | 0.17 | 0.05 |
62
+
63
+ ### torch.compile and TensorRT
64
+
65
+ | 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) |
66
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
67
+ | `fastvit_sa24.apple_dist_in1k` | 224x224 | 6.88 | 3.9 | 9.4 | 0.8 | 36 | 1.393 | 81 / 108 | 113 / 148 | 70 |
68
 
69
  ### Fixed-size speed and peak memory, all models
70
 
 
81
 
82
  ### Parity with the original code
83
 
84
+ 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.02 and p99 <= 0.08 (absolute error of the output `logits`).
85
 
86
  ## Usage
87
 
88
  ```python
89
  from fastforks import classification
90
 
91
+ model = classification.load("fastvit_sa24.apple_dist_in1k") # mode="auto": the preferred backend from recorded measurements
92
  result = model("photo.jpg")
93
  result.top(5) # top-5 classes
94
  result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16')
 
99
  ## Kernels backend
100
 
101
  `classification.load("fastvit_sa24.apple_dist_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 7204e33f (2026-11-05) -->