bulk-cc12m-features / README.md
AbstractPhil's picture
card: consensus_gpa as an 11th config (derived target, construction recipe, frame caveat); forms table qualified
657776f verified
|
Raw
History Blame Contribute Delete
10.2 kB
metadata
license: other
license_name: cc12m-derived
license_link: https://github.com/google-research-datasets/conceptual-12m
pretty_name: bulk-cc12m-features (10 teacher towers + consensus target)
tags:
  - clip
  - siglip
  - dinov3
  - features
  - embeddings
  - cc12m
  - knowledge-distillation
size_categories:
  - 100M<n<1B
configs:
  - config_name: clip_b16_laion2b
    data_files:
      - split: train
        path: clip_b16_laion2b/train-*.parquet
  - config_name: clip_b16_openai
    data_files:
      - split: train
        path: clip_b16_openai/train-*.parquet
  - config_name: clip_b32_openai
    data_files:
      - split: train
        path: clip_b32_openai/train-*.parquet
  - config_name: clip_b32_laion2b
    data_files:
      - split: train
        path: clip_b32_laion2b/train-*.parquet
  - config_name: clip_b32_datacomp
    data_files:
      - split: train
        path: clip_b32_datacomp/train-*.parquet
  - config_name: clip_l14_openai
    data_files:
      - split: train
        path: clip_l14_openai/train-*.parquet
  - config_name: clip_l14_laion2b
    data_files:
      - split: train
        path: clip_l14_laion2b/train-*.parquet
  - config_name: clip_l14_datacomp
    data_files:
      - split: train
        path: clip_l14_datacomp/train-*.parquet
  - config_name: dinov3_l16
    data_files:
      - split: train
        path: dinov3_l16/train-*.parquet
  - config_name: siglip_b16_384
    data_files:
      - split: train
        path: siglip_b16_384/train-*.parquet
  - config_name: consensus_gpa
    data_files:
      - split: train
        path: consensus_gpa/train-*.parquet

bulk-cc12m-features — ten teacher towers over CC12M, plus their consensus

Precomputed image-tower features for 10,968,539 CC12M images (all 2,176 shards of pixparse/cc12m-wds) from ten independent teacher extractions — eight CLIP variants across three pretraining corpora and two model scales, SigLIP, and DINOv3 — plus one derived consensus target. About 110 million feature vectors, roughly 130 GPU-hours of extraction, so that a student can be distilled against any of these teachers (or a consensus of them) with zero teacher inference at training time.

Captions are included with the clip_b16_laion2b config and join to every other tower by key.

The towers

config teacher dim space mean ‖v‖
clip_b16_laion2b CLIP ViT-B/16 LAION-2B 512 CLIP projection 12.77
clip_b16_openai CLIP ViT-B/16 512 CLIP projection 10.61
clip_b32_openai CLIP ViT-B/32 512 CLIP projection 10.52
clip_b32_laion2b CLIP ViT-B/32 LAION-2B 512 CLIP projection 10.60
clip_b32_datacomp CLIP ViT-B/32 DataComp-XL 512 CLIP projection 14.63
clip_l14_openai CLIP ViT-L/14 768 CLIP projection 18.80
clip_l14_laion2b CLIP ViT-L/14 LAION-2B 768 CLIP projection 19.45
clip_l14_datacomp CLIP ViT-L/14 DataComp-XL 768 CLIP projection 21.49
siglip_b16_384 SigLIP base-384 768 SigLIP projection
dinov3_l16 DINOv3 ViT-L/16 1024 CLS hidden state 14.74
consensus_gpa derived — GPA mean of the five B-tier CLIP towers 512 consensus (own frame) 1.00 (pre-normalized)

consensus_gpa is a derived target, not an extraction. It is the generalized-Procrustes mean shape of the five B-tier CLIP towers (clip_b16_laion2b, clip_b32_openai, clip_b32_laion2b, clip_b32_datacomp, clip_b16_openai): each tower L2-normalized, then five iterations of {orthogonally align every tower to the running mean on a fixed 10,000-row subsample via fp64 SVD, rotate the full tower, re-mean, renormalize}, converging at mean alignment ≈ 0.91. Rows are already unit norm. This is the exact tensor the published consensus-distilled students were trained against — see clip-vitb-mini-distilled. Note that the mean has no privileged frame: a student trained on it lands in the consensus frame, not any teacher's, which is why that model ships a fitted rotation alongside its weights.

dinov3_l16 is different in kind. DINOv3 has no projection head and no text tower: its 1024-d vector is the CLS hidden state, not a language-aligned projection. It is a full, valid extraction over the same images, but it is not a drop-in member of a CLIP consensus and has no text side to evaluate against. Fusing it with the CLIP towers needs an explicit cross-space alignment (learned projectors, or a whitened-Procrustes fit), not a plain average.

All extracted towers are stored fp16 and UNNORMALIZED — L2-normalize at load if you want unit vectors. (consensus_gpa is the exception: it is already unit norm by construction.)

Join by key, never by position

Every tower covers the identical key set, shard for shard (verified on first, middle and last shards). But row order differs between towers: extraction ran decode-completion-ordered, so shard n of two towers holds the same 5,041 images in different order.

# correct
order = {k: i for i, k in enumerate(tower_a["keys"])}
b_aligned = tower_b["emb"][[order[k] for k in tower_b["keys"]]]

# WRONG — silently misaligns every row
pairs = zip(tower_a["emb"], tower_b["emb"])

Forms

form path use
parquet {config}/train-*.parquet (64 files) dataset viewer, load_dataset, streaming
shards {config}/features_0000.pt … features_2175.pt 1:1 with the source wds shards; fp16, compact
concat {config}/all_concat.pt whole tower in one tensor — {keys, emb}

The ten extracted towers carry all three forms. consensus_gpa is derived rather than extracted, so it has no per-wds-shard form — parquet and concat only.

from datasets import load_dataset
ds = load_dataset("AbstractPhil/bulk-cc12m-features",
                  "clip_l14_laion2b", split="train", streaming=True)
row = next(iter(ds))          # {'key', 'features': [768 floats]}

Parquet stores features as fp32 lists carrying fp16 precision (the convention of the companion COCO bank). The .pt shards and concats load with weights_only=True.

Exact preprocessing (the part banks usually leave undocumented)

Feature parity requires bit-level preprocessing agreement, and it is per tower, not per family — every extraction was gated before spending compute: the fast decode path against the tower's reference processor, and reproduction of that tower's stored COCO features from the companion bank, both at cosine ≥ 0.9999.

tower geometry normalization
CLIP B/16, B/32, L/14 (OpenAI + DataComp) Resize(224, bicubic) shortest edge → CenterCrop(224) CLIP mean/std (0.48145466, 0.4578275, 0.40821073) / (0.26862954, 0.26130258, 0.27577711)
clip_l14_laion2b same as above mean/std 0.5 — its own open_clip_config declares it; using CLIP norm reads 0.935 instead of 0.999987
siglip_b16_384 Resize((384, 384), bicubic) warp, no crop mean/std 0.5
dinov3_l16 Resize((224, 224), bilinear) warp ImageNet mean/std (0.485, 0.456, 0.406) / (0.229, 0.224, 0.225)

Other constants that matter: plain GELU, not QuickGELU, for the CLIP towers (the open_clip default for some checkpoints differs, and the mismatch reads as cosine ≈ 0.975 against stored features — close enough to miss); fp32 compute; readout get_image_features (CLS → visual projection) for CLIP/SigLIP and CLS for DINOv3. Two checkpoints ship open_clip weights only (LAION B/16, DataComp B/32) and were converted deterministically to transformers format; hub-hosted conversions of open_clip checkpoints do not reproduce these banks — convert from the open_clip original.

Provenance and quality

  • Extracted 2026-07-27..31. The primary tower ran as a single 8.1-hour streaming pass (download → decode → embed → discard; the source imagery was never resident) at ~376 img/s; the remaining towers followed on rented A40s.
  • Zero decode errors and zero download failures across all 2,176 shards of the primary pass; per-shard counts in each tower's ledger.jsonl.
  • Full-bank integrity sweep on the primary: every file loads, key/caption/ embedding counts agree with the ledger, no non-finite values, feature norms stable across the run.
  • Shards hold 5,040–5,041 samples each.

Licensing note

These are derived features and captions, not images. CC12M imagery remains the property of its owners; captions and the underlying URL list come from Google's Conceptual 12M under its stated terms, and the image snapshot mirrored by pixparse/cc12m-wds. Intended for research use.

References