We propose a simple pairwise Sigmoid loss for Language-Image Pre-training (SigLIP). Unlike standard contrastive learning with softmax normalization, the sigmoid loss operates solely on image-text pairs and does not require a global view of the pairwise similarities for normalization. The sigmoid loss simultaneously allows further scaling up the batch size, while also performing better at smaller batch sizes. Combined with Locked-image Tuning, with only four TPUv4 chips, we train a SigLiT model that achieves 84.5% ImageNet zero-shot accuracy in two days. The disentanglement of the batch size from the loss further allows us to study the impact of examples vs pairs and negative to positive ratio. Finally, we push the batch size to the extreme, up to one million, and find that the benefits of growing batch size quickly diminish, with a more reasonable batch size of 32k being sufficient. We release our models at this https URL and hope our research motivates further explorations in improving the quality and efficiency of language-image pre-training.
Notes: Operation Counting: 6ND = 6 FLOP / token / parameter*400*10^6 parameters * 6705000000000 tokens [see Dataset size notes] = 1.6092e+22 FLOP Hardware: 275000000000000 FLOP/s/GPU * 32 GPUs * 120 hours * 3600 sec / hour * 0.4 = 1.52064e+21 FLOPs geometric mean (1.6092e+22, 1.52064e+21) = 4.9467301e+21
Size Notes: "B/16 ViT for image embeddings and B-sized transformer for text embeddings. The input images are resized to 224×224 resolution." "SigLIP performs best at batch size 32 k [image-text pairs]" 729 patches (table 3) "a maximum of 16 text tokens are kept" 9B examples * (16 text tokens + 729 image tokens) = 6.705e+12 total training tokens
Notes: Table 3