rwightman HF staff commited on
Commit
798970d
·
1 Parent(s): 4925cf0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +37 -7
README.md CHANGED
@@ -11,18 +11,18 @@ license: mit
11
  4. [Evaluation](#evaluation)
12
  5. [Acknowledgements](#acknowledgements)
13
  6. [Citation](#citation)
14
- 7. [How To Get Started With the Model](#how-to-get-started-with-the-model)
15
-
16
 
17
  # Model Details
18
 
19
  ## Model Description
20
 
21
- A series of CLIP ConvNeXt-Base (w/ wide embed dim) models trained on subsets LAION-5B (https://laion.ai/blog/laion-5b/) using OpenCLIP (https://github.com/mlfoundations/open_clip).
 
 
22
 
23
- The models utilize the [timm](https://github.com/rwightman/pytorch-image-models) [ConvNeXt-Base](https://arxiv.org/abs/2201.03545) model (`convnext_base`) as the image tower, and the same text tower as the RN50x4 (depth 12, embed dim 640) model from OpenAI CLIP. The base models are trained at 256x256 image resolution and roughly match the RN50x4 models on FLOPs and activation counts. The models with `320` in the name are trained at 320x320.
24
 
25
- | Model | Dataset | Resolution | AugReg | Top-1 ImageNet Zero-Shot |
26
  | ----- | ------- | ---------- | ------------ | --------- |
27
  | [convnext_base_w.laion2b_s13b_b82k](https://huggingface.co/laion/CLIP-convnext_base_w-laion2B-s13B-b82K) | LAION-2B | 256x256 | RRC (0.9, 1.0) | 70.8 |
28
  | [convnext_base_w.laion2b_s13b_b82k_augreg](https://huggingface.co/laion/CLIP-convnext_base_w-laion2B-s13B-b82K-augreg) | LAION-2B | 256x256 | RRC (0.33, 1.0), RE (0.35), SD (0.1) | 71.5 |
@@ -66,13 +66,43 @@ Further the above notice, the LAION-5B dataset used in training of these models
66
 
67
  ## Training Data
68
 
69
- This model was trained with the 2 Billion sample English subset of LAION-5B (https://laion.ai/blog/laion-5b/).
 
 
70
 
71
  **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.
72
 
73
  ## Training Procedure
74
 
75
- TODO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  # Evaluation
78
 
 
11
  4. [Evaluation](#evaluation)
12
  5. [Acknowledgements](#acknowledgements)
13
  6. [Citation](#citation)
 
 
14
 
15
  # Model Details
16
 
17
  ## Model Description
18
 
19
+ A series of CLIP [ConvNeXt-Base](https://arxiv.org/abs/2201.03545) (w/ wide embed dim) models trained on subsets LAION-5B (https://laion.ai/blog/laion-5b/) using OpenCLIP (https://github.com/mlfoundations/open_clip).
20
+
21
+ The models utilize the [timm](https://github.com/rwightman/pytorch-image-models) ConvNeXt-Base model (`convnext_base`) as the image tower, and the same text tower as the RN50x4 (depth 12, embed dim 640) model from OpenAI CLIP. The base models are trained at 256x256 image resolution and roughly match the RN50x4 models on FLOPs and activation counts. The models with `320` in the name are trained at 320x320.
22
 
23
+ All models in this series were trained for 13B samples and have ImageNet Zero-Shot top-1 of >= 70.8%. Comparing to ViT-B/16 at 34B SS with zero-shot of 70.2% (68.1% for 13B SS) this suggests the ConvNeXt architecture may be more sample efficient in this range of model scale. More experiments needed to confirm.
24
 
25
+ | Model | Dataset | Resolution | AugReg | Top-1 ImageNet Zero-Shot (%) |
26
  | ----- | ------- | ---------- | ------------ | --------- |
27
  | [convnext_base_w.laion2b_s13b_b82k](https://huggingface.co/laion/CLIP-convnext_base_w-laion2B-s13B-b82K) | LAION-2B | 256x256 | RRC (0.9, 1.0) | 70.8 |
28
  | [convnext_base_w.laion2b_s13b_b82k_augreg](https://huggingface.co/laion/CLIP-convnext_base_w-laion2B-s13B-b82K-augreg) | LAION-2B | 256x256 | RRC (0.33, 1.0), RE (0.35), SD (0.1) | 71.5 |
 
66
 
67
  ## Training Data
68
 
69
+ This model was trained with one of (see table in intro):
70
+ * LAION-2B - A 2 billion sample English subset of LAION-5B (https://laion.ai/blog/laion-5b/).
71
+ * LAION-Aesthetic - A 900M sample subset of LAION-2B with pHash dedupe and asthetic score filtering
72
 
73
  **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.
74
 
75
  ## Training Procedure
76
 
77
+ All models were trained with a global batch size of 81920 for 64 checkpoint intervals of 203.7M samples for a total of ~13B samples seen over training.
78
+
79
+ For 256x256 models, a slurm script w/ srun below was used on 20 8-GPU nodes (Stability), switching to 40 4-GPU nodes for time on JUWELS.
80
+
81
+ ```
82
+ /opt/slurm/sbin/srun --comment laion --cpu_bind=v --accel-bind=gn python -m training.main \
83
+ --save-frequency 1 \
84
+ --name "convnext_256" \
85
+ --resume 'latest' \
86
+ --train-data="pipe:aws s3 cp s3://mybucket/path/{laion{00000..xxxxx}.tar -" \
87
+ --train-num-samples 203666042 \
88
+ --dataset-type webdataset \
89
+ --precision amp_bfloat16 \
90
+ --warmup 10000 \
91
+ --batch-size=512 \
92
+ --epochs=64 \
93
+ --dataset-resampled \
94
+ --clip-grad-norm 5.0 \
95
+ --lr 1e-3 \
96
+ --workers=6 \
97
+ --model "convnext_base_w" \
98
+ --seed 0 \
99
+ --ddp-static-graph \
100
+ --local-loss \
101
+ --gather-with-grad \
102
+ --grad-checkpointing
103
+ ```
104
+
105
+ For 320x320 models, same as above but w/ 32 8-GPU nodes, local batch size 320, or 64 4-GPU nodes on JUWELs.
106
 
107
  # Evaluation
108