DFN5B-CLIP-ViT-H-14-378

The DFN5B‑CLIP‑ViT‑H‑14‑378 model is a Contrastive Language‑Image Pre‑training (CLIP) system that learns joint embeddings for images and text. It is built on the Vision Transformer‑H‑14 backbone (ViT‑H‑14) and operates at a 384 × 384 resolution (hence the “378” suffix referring to the token length). The model was trained on a massive, filtered dataset of 5 billion image‑text pairs (the “DFN‑5B” corpus) that were automatically curated by Data Filtering Networks (DFNs) from an original pool of 43 billion uncurated pairs.

apple 271K downloads mit Other
Frameworkspytorch
Tagsopen_clipclip
Downloads
271K
License
mit
Pipeline
Other
Author
apple

Run DFN5B-CLIP-ViT-H-14-378 locally on a Q4KM hard drive

Accelerate your deployments with Q4KM hard drives pre‑loaded with the DFN5B‑CLIP‑ViT‑H‑14‑378 model. No download time, instant GPU‑ready weights, and optimized I/O for large‑scale inference. Get this...

Shop Q4KM Drives

Technical Overview

The DFN5B‑CLIP‑ViT‑H‑14‑378 model is a Contrastive Language‑Image Pre‑training (CLIP) system that learns joint embeddings for images and text. It is built on the Vision Transformer‑H‑14 backbone (ViT‑H‑14) and operates at a 384 × 384 resolution (hence the “378” suffix referring to the token length). The model was trained on a massive, filtered dataset of 5 billion image‑text pairs (the “DFN‑5B” corpus) that were automatically curated by Data Filtering Networks (DFNs) from an original pool of 43 billion uncurated pairs.

Key features include:

  • Zero‑shot image classification – the model can assign labels to images without any task‑specific fine‑tuning.
  • OpenCLIP compatibility – weights are provided in PyTorch and can be loaded directly with the OpenCLIP library.
  • High‑resolution vision transformer – ViT‑H‑14 with 14 × 14 patch embeddings and a 384 px input size yields richer visual features than the standard 224 px CLIP variants.
  • Data‑filtered training – DFNs automatically discard noisy or low‑quality pairs, improving signal‑to‑noise ratio at scale.

The architecture consists of:

  • Image encoder: ViT‑H‑14 (≈632 M parameters) with a 14 × 14 patch grid, positional embeddings, and a CLS token that is projected to a 1024‑dimensional embedding.
  • Text encoder: a transformer‑based language model (compatible with the ViT‑H‑14 tokenizer) that maps token sequences to the same 1024‑dimensional space.
  • Contrastive loss: symmetric cross‑entropy between image and text embeddings, scaled by a learned logit‑scale parameter.

Intended use cases are any scenario that benefits from joint visual‑language understanding: zero‑shot classification, image‑text retrieval, visual grounding, and rapid prototyping of multimodal applications where massive labeled data is unavailable.

Benchmark Performance

The model’s performance is reported on a wide range of vision and multimodal benchmarks. The most relevant metrics for a CLIP‑style model are zero‑shot classification accuracy and retrieval‑style scores. Below is a selection of the reported numbers (higher is better):

  • ImageNet‑1K: 84.22 %
  • CIFAR‑10: 98.79 %
  • CIFAR‑100: 90.41 %
  • Caltech‑101: 95.45 %
  • Food‑101: 96.31 %
  • ImageNet‑R (rendered): 93.76 %
  • Average across 38 datasets: 70.94 %

These benchmarks matter because they test the model’s ability to generalize to unseen classes (zero‑shot) and to handle diverse visual domains (e.g., textures, satellite imagery, sketches). Compared with earlier CLIP‑ViT‑L‑14 or ViT‑B‑32 checkpoints, the DFN5B‑CLIP‑ViT‑H‑14‑378 shows a noticeable jump in high‑resolution tasks (e.g., ImageNet‑R, Food‑101) while maintaining competitive performance on classic datasets like CIFAR‑10. The improvement is largely attributed to the larger vision transformer and the high‑quality, filtered training data.

Hardware Requirements

Running the ViT‑H‑14 backbone at 384 px resolution is memory‑intensive. Typical inference requirements are:

  • VRAM: 12 GB minimum for a single image batch (FP16) and 16 GB+ for larger batches or FP32.
  • GPU: NVIDIA RTX 3080/3090, A6000, or any GPU with ≥12 GB of VRAM and CUDA 11.8+ support. For production‑scale serving, a multi‑GPU node (e.g., A100 40 GB) is recommended.
  • CPU: Modern x86‑64 CPU with ≥8 cores; the model is primarily GPU‑bound, but a decent CPU helps with data loading and preprocessing.
  • Storage: The checkpoint (≈2.5 GB) plus tokenizer files and a small OpenCLIP wrapper, total < 5 GB. SSD storage is advised for fast loading.
  • Performance: On an RTX 3090 (FP16), a single 384 px image can be encoded in ~12 ms, yielding ~80 FPS for batch‑size 1 inference.

Use Cases

Because DFN5B‑CLIP‑ViT‑H‑14‑378 excels at zero‑shot classification and image‑text similarity, it is well‑suited for:

  • Content moderation: Detecting prohibited or unsafe visual content without a curated dataset.
  • E‑commerce search: Matching product images to textual queries on‑the‑fly.
  • Digital asset management: Tagging large image libraries with semantic labels instantly.
  • Multimodal research prototypes: Rapidly testing new vision‑language tasks (e.g., captioning, visual QA) using the pre‑trained embeddings.
  • Cross‑modal retrieval: Finding images that match a textual description or vice‑versa in media archives.

Training Details

The model was trained on the DFN‑5B corpus, a filtered subset of 5 billion image‑text pairs drawn from:

  • CommonPool‑12.8B (12.8 B pairs)
  • 30 B additional public image‑text pairs

Key training characteristics:

  • Pre‑processing: Images were resized to 384 × 384 and center‑cropped; text was tokenized with the ViT‑H‑14 tokenizer (context length 378).
  • Optimization: Standard CLIP contrastive loss with a learnable logit‑scale and bias; AdamW optimizer with cosine learning‑rate decay.
  • Compute: Trained on Apple’s AxLearn framework (JAX) using large‑scale TPU/ GPU clusters; exact FLOPs not disclosed but comparable to other 5‑B‑scale CLIP models (≈10 k GPU‑hours).
  • Fine‑tuning: The checkpoint can be loaded in OpenCLIP and fine‑tuned on downstream tasks by freezing the text encoder or jointly updating both encoders.

Licensing Information

The repository lists the apple‑amlr license and references the apple‑sample‑code‑license. While the exact legal text is not reproduced here, the “sample‑code” license typically permits:

  • Free non‑commercial use and research.
  • Modification and redistribution of the model weights for academic purposes.
  • Attribution to Apple and the original authors (Fang et al., 2023).

Commercial usage is not explicitly granted under the “sample‑code” license, so organizations should treat the model as non‑commercial unless otherwise permitted. Before deploying in a product, consult the LICENSE file and, if needed, request a commercial license from Apple.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives