Models · Feature backbones

Perception Encoder

Meta's Perception Encoder (T, S, B, L, G): PE-Core image features aligned with text, and PE-Spatial for dense tasks.

stable Fork of huggingface/pytorch-image-models@0df212b · backends: portable, kernels

Checkpoint

Paper 2025 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 0.683 ms 224x224, fp16
vs the faster original 9.9× original fp32: 6.74 ms
Peak memory 53 MiB original: 58 MiB
Accuracy vs original fp32 – original not run on the test set

Use it

pip install fastforks

Lean install with only what this model needs: pip install "fastforks-core[timm]"

from fastforks import features

model = features.load("pe-core-t16-384")  # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.last_hidden_state  # also: pooler_output, hidden_states
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench pe-core-t16-384

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

BackenddtypeTime per call (ms)vs original fp32Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)fp32 6.74–58 MiB/80 MiB3.20.29
Original fp16torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)fp16 9.040.75×68 MiB/70 MiB3.20.19
Portable fp32fp32not measured ––––
Portablefp16 4.681.4×48 MiB/56 MiB–0.12
Kernelsfp16 0.6839.9×53 MiB/82 MiB–0.07
Portable + torch.compile 2.292.9×78 MiB/96 MiB9 (build)–
TensorRT fp16fp16 0.43216×34 MiBenginenot comparable36 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-10. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-13Originalfp3216.3 406 MiB process–224x224
Portablefp167.95 388 MiB processmatches224x224
Portablefp327.38 379 MiB processmatches224x224
Kernelsfp167.25 388 MiB processmatches224x224

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0
Weights
Apache-2.0 source
Training data
PE core: billions of web image-text pairs curated with the MetaCLIP pipeline, then video-text fine-tuning; PE spatial: PE core-G distilled with SAM 2 mask-feature alignment (Perception Encoder paper); not released

Our reading of the licences, not legal advice.

Weights

vit_pe_core_tiny_patch16_384.fb.safetensors 24.6 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download pe-core-t16-384).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

ImageNet-1k val

kNN top-1 % (k = 20, 10000 labelled / 5000 test images)

Rundtypetop-1 % ↑imagesms / image
Original fp32not measured
Original fp16not measured
Portable fp32fp3233.34 5000 0.410
Portablenot measured
Kernelsnot measured

The original code was not run on this dataset, so the table cannot show the distance to it.

Two disjoint seeded subsets of the val folders; each image shorter side 256 (bicubic), centre crop 224, the CLS / pooled feature; cosine kNN, vote weighted by similarity. Measured on RTX 5060 Ti, torch 2.14.1+cu130, fastforks 44640884, 2026-11-18.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 16 % and p99 <= 68 % of the reference's median |value| (absolute error of the output last_hidden_state).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.0001 (relative)not recorded
cpu_rtol≤ 0.00002 (relative)not recorded
GPU default dtypes, mean |diff|≤ 0.16 (relative)0.02347 (relative)
GPU default dtypes, p99 |diff|≤ 0.68 (relative)0.18832 (relative)

Recorded for pe-core-t16-384 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-10, with these kernels: cudnn_haccfvm_convfvm_extrafvm_mbfvm_r3

Details

Perception Encoder (Bolya et al. 2025, Meta) image towers with 2D RoPE: PE core (contrastive, attention-pool embedding) and PE spatial (dense features for detection / segmentation; no learned pool: pooler_output is the mean of the patch tokens, as timm); tokens at any size.

Input / output
Input: one RGB image. Output: dense patch features and a pooled image feature.
Input size
any H x W >= 1, resized or padded inside the model; tested up to 3000x4000 (799 MiB allocated)
Options
  • fp16_accumulate=false
  • fp32_accumulate=false
Outputs
last_hidden_state, pooler_output, hidden_states
Checkpoint
arch="vit_pe_core_tiny_patch16_384.fb"
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
  • fvm_convfused convolutions for image classifiers
  • fvm_extrafused transformer row operations (rotary split, SwiGLU with LayerNorm)
  • fvm_mbfused MBConv blocks (MobileNet and EfficientNet families)
  • fvm_r3further fused classifier blocks
Apple (MPS)
vit_metalMetal: vision transformer rotary embeddings. fp32, fp16

Limitations

  • kernels replays a CUDA graph per small input shape without hidden states (up to about 1M activations: ViT-B ~460 px, ViT-L ~300 px), captured on the shape's second call, at most 4 per model; `model.release_graphs()` frees them.
  • Small kernels calls (graph-sized, with or without `layers`) run GEMMs of at most 600 tokens on cuBLAS: faster in a graph replay (ViT-B/16 224 px: 1.26 against 1.52 ms), about 10 % slower eagerly on ViT-T / B; a replay equals the eager call bit for bit.
  • `fp32_accumulate = true` puts every GEMM on cuBLAS with fp32 accumulation (the portable precision; slower on GeForce).
  • Kernels keep CUDA graphs: their private pool and static outputs stay reserved, so peak reserved is ~70 MiB above portable (peak allocated is not); `cuda_graphs=false` or `release_graphs()` frees it.
Full reference, generated from the repository

Meta's Perception Encoder (T, S, B, L, G): PE-Core image features aligned with text, and PE-Spatial for dense tasks.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
pe-core-t16-384synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
6.74
9.04
4.68
0.683
2.29
0.432
58 / 80
68 / 70
48 / 56
53 / 82
78 / 96
79 / 88
pe-core-s16-384synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
7.02
9.28
4.80
0.957
2.39
0.581
128 / 146
171 / 180
83 / 102
82 / 104
113 / 122
145 / 166
pe-core-b16-224synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
7.14
9.35
4.97
1.47
2.50
1.17
397 / 440
584 / 620
218 / 266
218 / 268
251 / 286
409 / 460
pe-core-l14-336synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
23.3
17.7
9.09
4.97
6.53
4.34
1255 / 1266
1848 / 1888
650 / 668
648 / 672
683 / 706
1260 / 1286
pe-core-g14-448synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
97.7
52.4
25.7
17.0
24.5
15.0
7286 / 7490
10848 / 11330
3640 / 3670
3640 / 3696
3667 / 3690
7189 / 7230
pe-spatial-t16-512synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
6.56
8.73
4.48
0.666
2.12
0.426
56 / 78
66 / 68
49 / 56
53 / 82
77 / 96
78 / 88
pe-spatial-s16-512synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
6.70
8.79
4.51
0.922
2.67
0.580
121 / 144
161 / 178
81 / 100
78 / 104
110 / 120
142 / 144
pe-spatial-b16-512synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
7.02
8.79
4.74
1.40
2.67
1.20
369 / 418
544 / 580
207 / 226
204 / 248
237 / 266
397 / 422
pe-spatial-l14-448synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
23.0
17.2
8.84
4.87
6.59
4.35
1206 / 1216
1780 / 1816
626 / 668
623 / 672
658 / 686
1235 / 1284
pe-spatial-g14-448synthetic (224x224)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
97.9
52.7
25.7
16.9
24.3
14.9
7171 / 7380
10688 / 11178
3582 / 3592
3583 / 3676
3608 / 3630
7136 / 7156
Details
  • Original code: https://github.com/huggingface/pytorch-image-models at 0df212b369a5
  • Code licence: Apache-2.0 (permissive); files:
  • Weights licence: Apache-2.0
  • Licence evidence: https://huggingface.co/timm/vit_pe_core_small_patch16_384.fb/blob/255fa76e26fdf8daa47e0d607da46b7051879045/README.md
  • Training data: PE core: billions of web image-text pairs curated with the MetaCLIP pipeline, then video-text fine-tuning; PE spatial: PE core-G distilled with SAM 2 mask-feature alignment (Perception Encoder paper); not released
  • Options: fp16_accumulate = False (precision only), fp32_accumulate = False (precision only)
  • Kernel libraries: cudnn_hacc, fvm_conv, fvm_extra, fvm_mb, fvm_r3
  • Variants: pe-core-t16-384, pe-core-s16-384, pe-core-b16-224, pe-core-l14-336, pe-core-g14-448, pe-spatial-t16-512, pe-spatial-s16-512, pe-spatial-b16-512, pe-spatial-l14-448, pe-spatial-g14-448
  • Outputs: last_hidden_state, pooler_output, hidden_states
  • Input size: any H x W >= 1, resized or padded inside the model
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): pe-core-t16-384 3000x4000 (0.8 GiB peak allocated, 1.1 reserved); pe-core-s16-384 3000x4000 (1.2 GiB peak allocated, 1.3 reserved); pe-core-b16-224 3000x4000 (2.0 GiB peak allocated, 2.3 reserved); pe-core-l14-336 3000x4000 (3.5 GiB peak allocated, 3.8 reserved); pe-core-g14-448 3000x4000 (7.7 GiB peak allocated, 10.2 reserved); pe-spatial-t16-512 3000x4000 (0.8 GiB peak allocated, 1.0 reserved); pe-spatial-s16-512 3000x4000 (1.2 GiB peak allocated, 1.3 reserved); pe-spatial-b16-512 3000x4000 (2.0 GiB peak allocated, 2.3 reserved); pe-spatial-l14-448 3000x4000 (3.4 GiB peak allocated, 3.7 reserved); pe-spatial-g14-448 1988x2880 (5.6 GiB peak allocated, 5.8 reserved)
  • pe-core-t16-384 224x224, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 36 s (ONNX + engine).
  • pe-core-s16-384 224x224, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 37 s (ONNX + engine).
  • pe-core-b16-224 224x224, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 26 s (ONNX + engine).
  • pe-core-l14-336 224x224, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 50 s (ONNX + engine).
  • pe-core-g14-448 224x224, first call: portable + torch.compile 30 s (cold Inductor cache), TensorRT fp16 106 s (ONNX + engine).
  • pe-spatial-t16-512 224x224, first call: portable + torch.compile 8 s (cold Inductor cache), TensorRT fp16 33 s (ONNX + engine).
  • pe-spatial-s16-512 224x224, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 35 s (ONNX + engine).
  • pe-spatial-b16-512 224x224, first call: portable + torch.compile 9 s (cold Inductor cache), TensorRT fp16 35 s (ONNX + engine).
  • pe-spatial-l14-448 224x224, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 53 s (ONNX + engine).
  • pe-spatial-g14-448 224x224, first call: portable + torch.compile 28 s (cold Inductor cache), TensorRT fp16 126 s (ONNX + engine).
  • pe-core-t16-384 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-t16-384 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-s16-384 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-s16-384 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-b16-224 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-b16-224 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-l14-336 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-l14-336 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-g14-448 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-g14-448 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-t16-512 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-t16-512 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-s16-512 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-s16-512 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-b16-512 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-b16-512 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-l14-448 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-l14-448 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-g14-448 original (fp32) 224x224: timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-spatial-g14-448 original 224x224: torch.autocast(fp16) around the forward; timm 1.0.30 create_model(dynamic_img_size=True), forward_head(pre_logits=True)
  • pe-core-t16-384 load / first call: original 3.2 s / 0.194 s, portable – s / 0.124 s, kernels – s / 0.065 s
  • pe-core-s16-384 load / first call: original 5.7 s / 0.184 s, portable – s / 0.096 s, kernels – s / 0.044 s
  • pe-core-b16-224 load / first call: original 14.55 s / 0.191 s, portable – s / 0.292 s, kernels – s / 0.07 s
  • pe-core-l14-336 load / first call: original 41.39 s / 0.205 s, portable – s / 0.113 s, kernels – s / 0.051 s
  • pe-core-g14-448 load / first call: original 232.98 s / 0.281 s, portable 27.16 s / 0.564 s, kernels 15.98 s / 0.115 s
  • pe-spatial-t16-512 load / first call: original 3.09 s / 0.157 s, portable – s / 0.1 s, kernels – s / 0.077 s
  • pe-spatial-s16-512 load / first call: original 5.4 s / 0.163 s, portable – s / 0.084 s, kernels – s / 0.057 s
  • pe-spatial-b16-512 load / first call: original 13.65 s / 0.158 s, portable – s / 0.095 s, kernels – s / 0.071 s
  • pe-spatial-l14-448 load / first call: original 44.48 s / 0.17 s, portable – s / 0.089 s, kernels – s / 0.06 s
  • pe-spatial-g14-448 load / first call: original 227.9 s / 0.358 s, portable 21.43 s / 0.229 s, kernels 18.93 s / 0.172 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

Two disjoint seeded subsets of the val folders; each image shorter side 256 (bicubic), centre crop 224, the CLS / pooled feature; cosine kNN, vote weighted by similarity. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portableportable fp32kernelsnote
pe-core-t16-384ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)33.34
pe-core-s16-384ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)45.5645.5445.4845.38
pe-core-b16-224ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)58.5458.5658.5458.50
pe-core-l14-336ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)65.9866.0665.9666.28
pe-core-g14-448ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)60.4260.4860.4060.48
pe-spatial-t16-512ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)5.525.545.505.46
pe-spatial-s16-512ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)8.028.068.027.98
pe-spatial-b16-512ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)13.5813.6413.5613.58
pe-spatial-l14-448ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)17.1017.1417.1417.12
pe-spatial-g14-448ImageNet-1k val, kNN top-1 % (k = 20, 10000 labelled / 5000 test images)16.3616.3016.3216.30

Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c / 8bce3316 / b2ffd65d / c16d5d41, 2026-11-11 to 2026-11-16; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 44640884, 2026-11-18; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 33b2432c / 8bce3316 / b2ffd65d / c16d5d41, 2026-11-11 to 2026-11-16.

Parity

CPU, float32: max |diff| <= 0.0001 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 16 % and p99 <= 68 % of the reference's median |value| (absolute error of the output last_hidden_state).

variantkernels error vs original, mean / p99GPU, torchkernels used
pe-core-t16-3840.02347 / 0.18832RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-core-s16-3840.014 / 0.10554RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-core-b16-2240.02711 / 0.21018RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-core-l14-3360.05329 / 0.32658RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-core-g14-4480.10494 / 0.45289RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-spatial-t16-5120.0071 / 0.02435RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-spatial-s16-5120.00408 / 0.01398RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-spatial-b16-5120.00618 / 0.02209RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-spatial-l14-4480.00665 / 0.02628RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
pe-spatial-g14-4480.00518 / 0.02189RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120

Limitations

  • kernels replays a CUDA graph per small input shape without hidden states (up to about 1M activations: ViT-B ~460 px, ViT-L ~300 px), captured on the shape's second call, at most 4 per model; model.release_graphs() frees them.
  • Small kernels calls (graph-sized, with or without layers) run GEMMs of at most 600 tokens on cuBLAS: faster in a graph replay (ViT-B/16 224 px: 1.26 against 1.52 ms), about 10 % slower eagerly on ViT-T / B; a replay equals the eager call bit for bit.
  • fp32_accumulate = true puts every GEMM on cuBLAS with fp32 accumulation (the portable precision; slower on GeForce).
  • Kernels keep CUDA graphs: their private pool and static outputs stay reserved, so peak reserved is ~70 MiB above portable (peak allocated is not); cuda_graphs=false or release_graphs() frees it.

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Input
Output
Chelsea the cat, input
Input · 100%

Input: Chelsea the cat, Stéfan van der Walt (CC0).