Fine-Tuned OpenCLIP ViT-B-16 Checkpoints (DataComp-XL)
This repository contains full fine-tuned OpenCLIP ViT-B-16 checkpoints, each fine-tuned independently on one of the eight Vision8 downstream vision datasets starting from datacomp_xl_s13b_b90k.
Contents
Each dataset folder contains:
full_best_ep.pt: checkpoint with the best validation accuracy
| Dataset | Best epoch | Test accuracy |
|---|---|---|
| SUN397 | 9 | 78.85% |
| Cars | 22 | 93.09% |
| RESISC45 | 8 | 95.94% |
| EuroSAT | 7 | 98.68% |
| SVHN | 4 | 97.89% |
| GTSRB | 8 | 99.01% |
| MNIST | 4 | 99.74% |
| DTD | 7 | 81.91% |
Vision8 macro-average: 93.14%.
Training configuration
- Model: OpenCLIP
ViT-B-16 - Pretrained weights:
datacomp_xl_s13b_b90k - Full checkpoint state dict, fp32
- Validation fraction:
0.1 - Seed:
42
Usage
The checkpoint is a metadata-wrapped payload. Its state_dict uses the project prefix clip_model.model.; remove that prefix before loading it into OpenCLIP:
import torch
import open_clip
from huggingface_hub import hf_hub_download
checkpoint = hf_hub_download(
repo_id="fillo-rinaldi/ViT-B-16-datacomp_xl_s13b_b90k",
filename="Cars/full_best_ep.pt",
repo_type="model",
)
payload = torch.load(checkpoint, map_location="cpu", weights_only=False)
state_dict = {
key.removeprefix("clip_model.model."): value
for key, value in payload["state_dict"].items()
if key.startswith("clip_model.model.")
}
model, _, preprocess = open_clip.create_model_and_transforms(
"ViT-B-16",
pretrained=None,
)
model.load_state_dict(state_dict, strict=True)
The .pt files contain format="full", OpenCLIP backbone metadata, and the complete OpenCLIP model state dict.