/ Модель

Характеристики

Контекст
77 токенов
Лицензия
MIT
Архитектура
clip · dense
Библиотека
open_clip
Опубликована
14 сен 2022

CLIP-ViT-L-14-laion2B-s32B-b82K

Классификация изображений без дообученияИзображение, текст → label8 профессий

Мультимодальная CLIP ViT-L/14 от LAION сопоставляет изображения с английскими текстовыми метками для zero-shot классификации и поиска.

2 млнскачиваний за 30 дней70лайковвеса обновлены16 янв 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки31

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

  • STS17MultilingualVisualSTS

    main_score

    Результат

    0,2071

    Общий результат 0,6189Общий результат 0,1949Общий результат 0,1938
    MTEB

    Публичная таблицаревизия совпадает

  • VisualSTS-b-Multilingual

    main_score

    Результат

    0,2974

    MTEB

    Публичная таблицаревизия совпадает

  • VidoreInfoVQARetrieval

    main_score

    Результат

    0,5246

    MTEB

    Публичная таблицаревизия совпадает

  • RParisEasyI2IRetrieval

    main_score

    Результат

    0,1077

    MTEB

    Публичная таблицаревизия совпадает

  • VidoreSyntheticDocQAGovernmentReportsRetrieval

    main_score

    Результат

    0,4929

    MTEB

    Публичная таблицаревизия совпадает

  • XFlickr30kCoT2IRetrieval

    main_score

    Результат

    0,8204

    Общий результат 0,547Общий результат 0,0749Общий результат 0,029
    MTEB

    Публичная таблицаревизия совпадает

  • XM3600T2IRetrieval

    main_score

    Результат

    0,0081

    Общий результат 0,6907Общий результат 0,3051Общий результат 0,135
    MTEB

    Публичная таблицаревизия совпадает

  • VidoreShiftProjectRetrieval

    main_score

    Результат

    0,131

    MTEB

    Публичная таблицаревизия совпадает

  • TinyImageNetClustering

    main_score

    Результат

    0,7162

    MTEB

    Публичная таблицаревизия совпадает

  • SOPI2IRetrieval

    main_score

    Результат

    0,6142

    MTEB

    Публичная таблицаревизия совпадает

  • CIFAR10ZeroShot

    main_score

    Результат

    0,9692

    MTEB

    Публичная таблицаревизия совпадает

  • VidoreSyntheticDocQAHealthcareIndustryRetrieval

    main_score

    Результат

    0,5315

    MTEB

    Публичная таблицаревизия совпадает

  • ImageCoDeT2IRetrieval

    main_score

    Результат

    0,106

    MTEB

    Публичная таблицаревизия совпадает

  • STSBenchmarkMultilingualVisualSTS

    main_score

    Результат

    0,4511

    Общий результат 0,4069Общий результат 0,3948Общий результат 0,2849
    MTEB

    Публичная таблицаревизия совпадает

  • STS13VisualSTS

    main_score

    Результат

    0,6275

    MTEB

    Публичная таблицаревизия совпадает

  • AROVisualAttribution

    main_score

    Результат

    0,5894

    MTEB

    Публичная таблицаревизия совпадает

  • MemotionI2TRetrieval

    main_score

    Результат

    0,8735

    MTEB

    Публичная таблицаревизия совпадает

  • STS12VisualSTS

    main_score

    Результат

    0,5752

    MTEB

    Публичная таблицаревизия совпадает

  • GTSRBZeroShot

    main_score

    Результат

    0,5827

    MTEB

    Публичная таблицаревизия совпадает

  • WITT2IRetrieval

    main_score

    Результат

    0,0869

    MTEB

    Публичная таблицаревизия совпадает

  • GLDv2I2IRetrieval

    main_score

    Результат

    0,2528

    MTEB

    Публичная таблицаревизия совпадает

  • AROCocoOrder

    main_score

    Результат

    0,3107

    MTEB

    Публичная таблицаревизия совпадает

  • DTDZeroShot

    main_score

    Результат

    0,5888

    MTEB

    Публичная таблицаревизия совпадает

  • Imagenet1kZeroShot

    main_score

    Результат

    0,7323

    MTEB

    Публичная таблицаревизия совпадает

  • Food101ZeroShot

    main_score

    Результат

    0,9041

    MTEB

    Публичная таблицаревизия совпадает

  • FashionIQIT2IRetrieval

    main_score

    Результат

    0,0413

    MTEB

    Публичная таблицаревизия совпадает

  • HatefulMemesI2TRetrieval

    main_score

    Результат

    0,6362

    MTEB

    Публичная таблицаревизия совпадает

  • SciMMIR

    main_score

    Результат

    0,5802

    MTEB

    Публичная таблицаревизия совпадает

  • Caltech101ZeroShot

    main_score

    Результат

    0,8376

    MTEB

    Публичная таблицаревизия совпадает

  • VQA2IT2TRetrieval

    main_score

    Результат

    0,0167

    MTEB

    Публичная таблицаревизия совпадает

  • RParisHardI2IRetrieval

    main_score

    Результат

    0,0483

    MTEB

    Публичная таблицаревизия совпадает

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

CLIP ViT-L/14 — мультимодальная модель семейства CLIP, обученная LAION с помощью OpenCLIP на англоязычной подвыборке из 2 млрд пар данных LAION-5B. В карточке указано, что обучение проводил Росс Уайтман на суперкомпьютере JUWELS Booster. Модель принимает изображения и текстовые описания и сопоставляет их в общем пространстве признаков; основная задача в каталоге — классификация изображений без примеров обучения по текстовым меткам. Её также применяют для поиска изображений по тексту и текста по изображению, линейной классификации и как компонент конвейеров генерации изображений.

Для ImageNet-1k заявлена точность zero-shot top-1 75,3%. Модель обучалась на английских данных и не предназначена для сценариев на других языках. Авторы рекомендуют ограничивать применение исследованиями; развёрнутые сценарии и использование без тщательной проверки на фиксированной таксономии не рекомендуются. Применение для наблюдения и распознавания лиц исключено из допустимых сценариев. Лицензия — MIT.

Сценарии применения

  • классификация изображений по текстовым описаниям без дообучения
  • поиск изображений по текстовому запросу
  • поиск подходящего текста для изображения
  • извлечение признаков изображений для линейной классификации
  • использование визуальных оценок для управления генерацией изображений

Ограничения

Модель обучена и оценивалась для английского языка; для других языков её применять не рекомендуется. Авторы не рекомендуют развёртывание без тщательной проверки на конкретной фиксированной таксономии и исключают сценарии наблюдения и распознавания лиц.

Для каких профессий подходит8

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Card for CLIP ViT-L/14 - LAION-2B

Table of Contents

  1. Model Details
  2. Uses
  3. Training Details
  4. Evaluation
  5. Acknowledgements
  6. Citation
  7. How To Get Started With the Model

Model Details

Model Description

A CLIP ViT L/14 model trained with the LAION-2B English subset of LAION-5B (https://laion.ai/blog/laion-5b/) using OpenCLIP (https://github.com/mlfoundations/open_clip).

Model training ('babysitting') done by Ross Wightman on the JUWELS Booster supercomputer. See acknowledgements below.

Uses

As per the original OpenAI CLIP model card, this model is intended as a research output for research communities. We hope that this model will enable researchers to better understand and explore zero-shot, arbitrary image classification. We also hope it can be used for interdisciplinary studies of the potential impact of such model.

The OpenAI CLIP paper includes a discussion of potential downstream impacts to provide an example for this sort of analysis. Additionally, the LAION-5B blog (https://laion.ai/blog/laion-5b/) and upcoming paper include additional discussion as it relates specifically to the training dataset.

Direct Use

Zero-shot image classification, image and text retrieval, among others.

Downstream Use

Image classification and other image task fine-tuning, linear probe image classification, image generation guiding and conditioning, among others.

Out-of-Scope Use

As per the OpenAI models,

Any deployed use case of the model - whether commercial or not - is currently out of scope. Non-deployed use cases such as image search in a constrained environment, are also not recommended unless there is thorough in-domain testing of the model with a specific, fixed class taxonomy. This is because our safety assessment demonstrated a high need for task specific testing especially given the variability of CLIP’s performance with different class taxonomies. This makes untested and unconstrained deployment of the model in any use case currently potentially harmful.

Certain use cases which would fall under the domain of surveillance and facial recognition are always out-of-scope regardless of performance of the model. This is because the use of artificial intelligence for tasks such as these can be premature currently given the lack of testing norms and checks to ensure its fair use.

Since the model has not been purposefully trained in or evaluated on any languages other than English, its use should be limited to English language use cases.

Further the above notice, the LAION-5B dataset used in training of these models has additional considerations, see below.

Training Details

Training Data

This model was trained with the 2 Billion sample English subset of LAION-5B (https://laion.ai/blog/laion-5b/).

IMPORTANT NOTE: The motivation behind dataset creation is to democratize research and experimentation around large-scale multi-modal model training and handling of uncurated, large-scale datasets crawled from publically available internet. Our recommendation is therefore to use the dataset for research purposes. Be aware that this large-scale dataset is uncurated. Keep in mind that the uncurated nature of the dataset means that collected links may lead to strongly discomforting and disturbing content for a human viewer. Therefore, please use the demo links with caution and at your own risk. It is possible to extract a “safe” subset by filtering out samples based on the safety tags (using a customized trained NSFW classifier that we built). While this strongly reduces the chance for encountering potentially harmful content when viewing, we cannot entirely exclude the possibility for harmful content being still present in safe mode, so that the warning holds also there. We think that providing the dataset openly to broad research and other interested communities will allow for transparent investigation of benefits that come along with training large-scale models as well as pitfalls and dangers that may stay unreported or unnoticed when working with closed large datasets that remain restricted to a small community. Providing our dataset openly, we however do not recommend using it for creating ready-to-go industrial products, as the basic research about general properties and safety of such large-scale models, which we would like to encourage with this release, is still in progress.

Training Procedure

The model was trained on 384 A100 GPUs using 200M sample 'virtual' epochs where dataset shards were sampled with replacement. The model was trained with 160 virtual epochs for a total of 32B samples seen.

The first 68 epochs were trained with float16 AMP, global batch size 79K (208 per GPU). Initially running to epoch 75, where the loss spiked and training failed with NaN.

Romain Beaumont was training H/14 and g/14 models at the same time on Stability cluster and hit similar instabilities. Collectively we tried restarts with,

None of the above ended up working. Most blew up within the same epoch as original, with the exception of architecture mods.

  • Normformer mods signifcantly altered the network such that resuming did not quickly converge to previous performance, this was abandoned but might be worth trying from start.
  • Scaled cosine attn initially looked promising and lasted until epoch 90 before loss suddenly increased and appeared to remain 'stuck'.

In the end, restarting at epoch 69 with float32 precision solved all instabilities and training continued from there with global batch size 86k (224 per GPU). On A100 GPUs, float32 had a minimal impact on the throughput once tf32 matmuls were enabled in PyTorch. Approximately 10% slower than float16 AMP. Romain similary changed the precision but ended up using bfloat16 AMP to resolve issues.

Slum Script

#SBATCH --nodes=96
#SBATCH --gres=gpu:4
#SBATCH --ntasks-per-node=4
#SBATCH --cpus-per-task=6
#SBATCH --wait-all-nodes=1
#SBATCH --job-name=open_clip_laion2b

# load low-level libraries
ml purge
source /conda/bin/activate pytorch-112

export NCCL_ASYNC_ERROR_HANDLING=1
export CUDA_VISIBLE_DEVICES=0,1,2,3
export MASTER_PORT=12802

### get the first node name as master address - customized for vgg slurm
### e.g. master(gnodee[2-5],gnoded1) == gnodee2
echo "NODELIST="${SLURM_NODELIST}
master_addr=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n 1)
export MASTER_ADDR=$master_addr"i"
echo "MASTER_ADDR="$MASTER_ADDR

cd /home/me/open_clip
export PYTHONPATH="$PYTHONPATH:$PWD/src"

srun --cpu_bind=none,v --accel-bind=gn python -u src/training/main.py \
    --save-frequency 1 \
    --zeroshot-frequency 1 \
    --train-data="/data/laion2B-en/{00000..23295}.tar" \
    --train-num-samples=200000000 \
    --warmup 10000 \
    --lr "1e-3" \
    --batch-size=224 \
    --epochs=160 \
    --workers=6 \
    --model ViT-L-14 \
    --name "L14-laion2B" \
    --report-to "tensorboard" \
    --seed 0 \
    --precision 'fp32' \
    --ddp-static-graph \
    --local-loss \
    --dataset-resampled \
    --gather-with-grad \
    --grad-checkpointing

Evaluation

Evaluation done with code in the LAION CLIP Benchmark suite.

Testing Data, Factors & Metrics

Testing Data

The testing is performed with VTAB+ (A combination of VTAB (https://arxiv.org/abs/1910.04867) w/ additional robustness datasets) for classification and COCO and Flickr for retrieval.

TODO - more detail

Results

The model achieves a 75.3 zero-shot top-1 accuracy on ImageNet-1k.

An initial round of benchmarks have been performed on a wider range of datasets, currently viewable at https://github.com/LAION-AI/CLIP_benchmark/blob/main/benchmark/results.ipynb

TODO - create table for just this model's metrics.

Acknowledgements

Acknowledging the Gauss Centre for Supercomputing e.V. (http://gauss-centre.eu) for funding this part of work by providing computing time through the John von Neumann Institute for Computing (NIC) on the GCS Supercomputer JUWELS Booster at Jülich Supercomputing Centre (JSC).

Citation

BibTeX:

LAION-5B

@inproceedings{schuhmann2022laionb,
  title={{LAION}-5B: An open large-scale dataset for training next generation image-text models},
  author={Christoph Schuhmann and
          Romain Beaumont and
          Richard Vencu and
          Cade W Gordon and
          Ross Wightman and
          Mehdi Cherti and
          Theo Coombes and
          Aarush Katta and
          Clayton Mullis and
          Mitchell Wortsman and
          Patrick Schramowski and
          Srivatsa R Kundurthy and
          Katherine Crowson and
          Ludwig Schmidt and
          Robert Kaczmarczyk and
          Jenia Jitsev},
  booktitle={Thirty-sixth Conference on Neural Information Processing Systems Datasets and Benchmarks Track},
  year={2022},
  url={https://openreview.net/forum?id=M3Y74vmsMcY}
}

OpenAI CLIP paper

@inproceedings{Radford2021LearningTV,
  title={Learning Transferable Visual Models From Natural Language Supervision},
  author={Alec Radford and Jong Wook Kim and Chris Hallacy and A. Ramesh and Gabriel Goh and Sandhini Agarwal and Girish Sastry and Amanda Askell and Pamela Mishkin and Jack Clark and Gretchen Krueger and Ilya Sutskever},
  booktitle={ICML},
  year={2021}
}

OpenCLIP software

@software{ilharco_gabriel_2021_5143773,
  author       = {Ilharco, Gabriel and
                  Wortsman, Mitchell and
                  Wightman, Ross and
                  Gordon, Cade and
                  Carlini, Nicholas and
                  Taori, Rohan and
                  Dave, Achal and
                  Shankar, Vaishaal and
                  Namkoong, Hongseok and
                  Miller, John and
                  Hajishirzi, Hannaneh and
                  Farhadi, Ali and
                  Schmidt, Ludwig},
  title        = {OpenCLIP},
  month        = jul,
  year         = 2021,
  note         = {If you use this software, please cite it as below.},
  publisher    = {Zenodo},
  version      = {0.1},
  doi          = {10.5281/zenodo.5143773},
  url          = {https://doi.org/10.5281/zenodo.5143773}
}

How to Get Started with the Model

Use the code below to get started with the model.

** TODO ** - Hugging Face transformers, OpenCLIP, and timm getting started snippets

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · open_clip

Нельзя запустить

Модели OpenCLIP требуют отдельного рантайма.

Класс архитектуры
CLIPModel
Ревизия весов
1627032

0 моделей