ConvNeXt V2
ConvNeXt V2 (Woo et al. 2023): a convolutional classifier with global response normalisation. Non-commercial weights.
stable Fork of huggingface/pytorch-image-models@0df212b · backends: portable, kernels
- Paper ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders CVPR 2023 · first released 2 Jan 2023
- Authors’ code facebookresearch/ConvNeXt-V2 (PyTorch), not the code forked here: timm re-implements the architecture and hosts the converted FCMAE fine-tuned weights.
Checkpoint convnextv2_base.fcmae_ft_in22k_in1k
Paper 2023 Added in 0.1.0 Evaluated with 0.2.0
Use it
pip install fastforks Lean install with only what this model needs: pip install "fastforks-core[timm]"
from fastforks import classification
model = classification.load("convnextv2_base.fcmae_ft_in22k_in1k") # kernels on a supported GPU, else portable PyTorch
result = model(image)
result.logits
result.backend # what ran: mode, device, dtype, kernels The weights are non-commercial: fastforks downloads them only with FASTFORKS_NONCOMMERCIAL=1 set.
fastforks bench convnextv2_base.fcmae_ft_in22k_in1k 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.
Input: synthetic, 224x224 (the task’s standard size)
| Backend | dtype | Time per call (ms) | vs original fp32 | Peak memory allocated / reserved | Load (s) | First call (s) |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 10.7 | – | 395 MiB/418 MiB | 1.0 | 0.33 |
| Original fp16torch.autocast(fp16) around the forward | fp16 | 14.6 | 0.74× | 542 MiB/566 MiB | 2.7 | 0.63 |
| Portable fp32 | fp32 | not measured | – | – | – | – |
| Portable | fp16 | 10.2 | 1.1× | 220 MiB/234 MiB | 2.1 | 0.33 |
| Kernels | fp16 | 2.96 | 3.6× | 206 MiB/238 MiB | 2.8 | 0.15 |
| Portable + torch.compile | 3.85 | 2.8× | 324 MiB/356 MiB | 14 (build) | – | |
| TensorRT fp16 | fp16 | 2.13 | 5.0× | 204 MiBenginenot comparable | 35 (build) | – |
Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-03 to 2026-11-16. 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
| Device | Backend | dtype | ms / call | Peak memory | Output vs reference | Input |
|---|---|---|---|---|---|---|
| Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-14 | Original | fp32 | 41.0 | 2,066 MiB process | matches | 224x224 |
| Portable | fp16 | 35.8 | 2,323 MiB process | matches | 224x224 | |
| Portable | fp32 | 36.1 | 2,301 MiB process | matches | 224x224 | |
| Kernels | fp16 | not implemented | – | 224x224 | ||
| NVIDIA L4 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 17.3 | 276 MiB/296 MiB | – | 224x224 |
| Kernels | fp16 | 3.68 | 270 MiB/320 MiB | – | 224x224 | |
| NVIDIA L40S CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 11.6 | 276 MiB/296 MiB | – | 224x224 |
| Kernels | fp16 | 2.64 | 270 MiB/320 MiB | – | 224x224 | |
| NVIDIA A10 CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 10.1 | 276 MiB/296 MiB | – | 224x224 |
| Kernels | fp16 | 3.79 | 270 MiB/320 MiB | – | 224x224 | |
| NVIDIA A100-SXM4-40GB CUDA, torch 2.14.1+cu130, 2026-11-07 | Portable | fp16 | 12.2 | 276 MiB/296 MiB | – | 224x224 |
| Kernels | fp16 | 5.03 | 270 MiB/320 MiB | – | 224x224 | |
| NVIDIA RTX PRO 6000 CUDA, torch 2.14.1+cu130, 2026-11-08 | Portable | fp16 | 4.03 | 299 MiB/316 MiB | – | 224x224 |
| Kernels | fp16 | 2.83 | 318 MiB/380 MiB | – | 224x224 | |
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
Non-commercial only
- Code
- Apache-2.0
- Weights
- CC-BY-NC-4.0 source
- Training data
-
- ImageNet-21k / ImageNet-22k (full ImageNet, fall 2011 release) noncommercial, non-commercial
- ImageNet-1k (ILSVRC 2012 classification) noncommercial, non-commercial
- weights: CC-BY-NC-4.0
Our reading of the licences, not legal advice.
Weights
convnextv2_base.fcmae_ft_in22k_in1k.safetensors 355 MB· hosted on Hugging Facefastforks downloads and checks these files on first use (fastforks download convnextv2_base.fcmae_ft_in22k_in1k). Non-commercial weights need FASTFORKS_NONCOMMERCIAL=1.
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
5000 random images, top-1 / top-5 %
| Run | dtype | top-1 % ↑ | top-5 % ↑ | Δ top-1 % vs fp32 original | images | ms / image |
|---|---|---|---|---|---|---|
| Original fp32 | fp32 | 87.32 | 98.18 | reference | 5000 | 5.24 |
| Original fp16 | fp16 | 87.32 | 98.18 | ±0.00 | 5000 | 3.10 |
| Portable fp32 | fp32 | 87.10 | 98.14 | −0.22 | 5000 | 4.50 |
| Portable | fp16 | 87.10 | 98.14 | −0.22 | 5000 | 1.46 |
| Kernels | fp16 | 87.10 | 98.14 | −0.22 | 5000 | 1.33 |
fastforks: the model's own resize / crop on the GPU; original: the library's pretrained loader and its PIL eval transform. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-06; portable fp32: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7c91993, 2026-10-31; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
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.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).
| Check | Tolerance | Measured |
|---|---|---|
| CPU fp32, max |diff| | ≤ 0.002 | not recorded |
| GPU default dtypes, mean |diff| | ≤ 0.02 | 0.00113 |
| GPU default dtypes, p99 |diff| | ≤ 0.08 | 0.00463 |
Recorded for convnextv2_base.fcmae_ft_in22k_in1k on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-04, with these kernels: cudnn_haccfvm_convfvm_extrafvm_mbfvm_r3
Details
ConvNeXt V2 (Woo et al. 2023): ConvNeXt blocks with global response normalisation, FCMAE pre-training.
- Input / output
- Input: one RGB image. Output: ImageNet-1k class logits.
- Input size
- fixed 224x224: the input is resized (short side 256) and centre-cropped to it; tested up to 224x224 (300 MiB allocated)
- Outputs
logits- Checkpoint
arch="convnextv2_base.fcmae_ft_in22k_in1k"- CUDA kernels
cudnn_haccconvolutions with fp16 accumulation (cuDNN)fvm_convfused convolutions for image classifiersfvm_extrafused transformer row operations (rotary split, SwiGLU with LayerNorm)fvm_mbfused MBConv blocks (MobileNet and EfficientNet families)fvm_r3further fused classifier blocks
- Apple (MPS)
- fp32, fp16
Full reference, generated from the repository
ConvNeXt V2 (Woo et al. 2023): a convolutional classifier with global response normalisation. Non-commercial weights.
Commercial use: no (weights: CC-BY-NC-4.0).
| variant | input | backend | time (ms) | peak memory (MiB, allocated / reserved) |
|---|---|---|---|---|
convnextv2_base.fcmae_ft_in22k_in1k | synthetic (224x224) | original (fp32) original portable kernels portable + torch.compile TensorRT fp16 | 10.7 14.6 10.2 2.96 3.85 2.13 | 395 / 418 542 / 566 220 / 234 206 / 238 324 / 356 486 / 518 |
Details
- Original code: https://github.com/huggingface/pytorch-image-models at
0df212b369a5 - Code licence: Apache-2.0 (permissive); files:
- Weights licence: CC-BY-NC-4.0
- Licence evidence: https://huggingface.co/timm/convnextv2_base.fcmae_ft_in22k_in1k/blob/9e250ed8f88b436472d2b24af26f82a8aa8c719d/README.md
- Training data: ImageNet-21k / ImageNet-22k (full ImageNet, fall 2011 release), ImageNet-1k (ILSVRC 2012 classification)
- Kernel libraries:
cudnn_hacc,fvm_conv,fvm_extra,fvm_mb,fvm_r3 - Variants:
convnextv2_base.fcmae_ft_in22k_in1k(default ofconvnextv2_base) - Outputs: logits; label_set:
imagenet-1k - Input size: fixed 224x224: the input is resized (short side 256) and centre-cropped to it
- Tested up to (portable, fp16, RTX 5060 Ti 16 GB):
convnextv2_base.fcmae_ft_in22k_in1k224x224 (0.3 GiB peak allocated, 0.4 reserved) convnextv2_base.fcmae_ft_in22k_in1k224x224, first call: portable + torch.compile 14 s (cold Inductor cache), TensorRT fp16 35 s (ONNX + engine).convnextv2_base.fcmae_ft_in22k_in1koriginal 224x224: torch.autocast(fp16) around the forwardconvnextv2_base.fcmae_ft_in22k_in1kload / first call: original 2.7 s / 0.631 s, portable 2.09 s / 0.331 s, kernels 2.12 s / 0.158 s- Protocol, median of 5 after 3 warm-up, uint8 CUDA input (synthetic for bench_inputs sizes), card defaults; gc before each load; peak = max over the first call and the timed calls
Measured
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.
| variant | dataset | original fp32 | original fp16 | portable | portable fp32 | kernels | note |
|---|---|---|---|---|---|---|---|
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 | 87.10 / 98.14 |
Measured on portable: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06; portable32: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 7c91993, 2026-10-31; kernels: NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 939adfe8, 2026-11-06.
Parity
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).
| variant | kernels error vs original, mean / p99 | GPU, torch | kernels used |
|---|---|---|---|
convnextv2_base.fcmae_ft_in22k_in1k | 0.00113 / 0.00463 | RTX 5060 Ti, torch 2.14.1+cu130 | cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120 |
Example output
One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).
Top 5
Input: Chelsea the cat, Stéfan van der Walt (CC0).