-
I just wanted to compare CLIP and open-CLIP as I noticed a difference in the text-transformer architectures between CLIP and open-CLIP as shown in the figure. Is there something I'm missing? One can compare the architectures between these two models by themselves using: import clip import open_clip |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 3 replies
-
Also, how has the modified open-CLIP architecture been trained on the proprietary openAI dataset? |
Beta Was this translation helpful? Give feedback.
-
Not sure about this additional layer norm, will let other people answer
Regarding the dataset, we're using laion400m and laion5B. Prioritary
datasets can't be used outside of their respective companies
…On Wed, Jan 4, 2023, 22:52 Patrick Koller ***@***.***> wrote:
Also, how has the modified open-CLIP architecture been trained on the
proprietary openAI dataset?
—
Reply to this email directly, view it on GitHub
<#337 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAR437Q55UWVFA2LII4N7FLWQXWJVANCNFSM6AAAAAATRH5NEY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Hi @rom1504 Thanks a lot for your thoughts. Hopefully, somebody will be able to answer the question about the additional layer norm and how it's mean and variance parameter has been trained. Yes, open-CLIP models can be loaded with pre-trained weights from the LAION datasets. In this case, we loaded a modified ResNet-50 model (Additional layers) with pre-trained weights from OpenAI: (Focus on the "pretrained" argument) open_clip.create_model_and_transforms('RN50', pretrained='openai') How does this work? If the ResNet-50 model is modified, it needs to be trained from scratch or fine-tuned and to my knowledge you can't do this if you don't have access to OpenAI's custom dataset. |
Beta Was this translation helpful? Give feedback.
-
@PatCH0816 they are the same
open_clip/src/open_clip/transformer.py Lines 214 to 236 in aebead1 https://github.com/openai/CLIP/blob/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1/clip/model.py#L175-L192 |
Beta Was this translation helpful? Give feedback.
-
@PatCH0816 FYI, OpenCLIP was intended to be use used under AMP autocast context for mixed-precision where as CLIP is using a 'manual' mixed precision of sorts and float16 weights. |
Beta Was this translation helpful? Give feedback.
-
In order to ensure the outputs from CLIP and open CLIP the same, model and open_model should be set to evaluation mode, so that the models behave consistently during inference.
|
Beta Was this translation helpful? Give feedback.
@PatCH0816 FYI, OpenCLIP was intended to be use used under AMP autocast context for mixed-precision where as CLIP is using a 'manual' mixed precision of sorts and float16 weights.