Discover and explore top open-source AI tools and projects—updated daily.
CLIP training with near-infinite batch size scaling
Top 95.9% on SourcePulse
This repository provides the official training codebase for Inf-CLIP, a novel contrastive learning scheme designed to overcome memory limitations and enable near-infinite batch size scaling. It is targeted at researchers and practitioners working with large-scale multimodal models, offering significant memory efficiency benefits for contrastive loss computations.
How It Works
Inf-CLIP implements the Inf-CL loss, which leverages techniques like Ring-CL and gradient accumulation/caching to drastically reduce memory footprint. This approach allows for training with effectively massive batch sizes, which is crucial for achieving state-of-the-art performance in contrastive learning tasks like CLIP training, without requiring prohibitive hardware resources.
Quick Start & Requirements
pip install inf_cl
(remote) or pip install -e .
(local).bash scripts/cc3m/lit_vit-b-32_bs16k.sh
. Evaluation scripts for ImageNet and CLIP benchmarks are also available.Highlighted Details
Maintenance & Community
The project is actively maintained by DAMO-NLP-SG. Links to relevant social media (Twitter) and community discussions (Zhihu) are provided.
Licensing & Compatibility
Released under the Apache 2.0 license. However, the service is intended for non-commercial use ONLY, subject to the model licenses of CLIP, OpenAI's data terms, and Laion.
Limitations & Caveats
The project's usage is restricted to non-commercial purposes due to underlying data and model licenses. Specific hardware requirements (CUDA >= 11.8) and Python versions must be met.
8 months ago
Inactive