You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The base vision encoder in Llama3.2 is a variant of OpenAI CLIP. So we implement the generic model and then in the Llama3.2 encoder builder use the hyperparameters used by the Llama team and not the original CLIP model. The Llama CLIP is pre-trained in the same way as OpenAI CLIP and then further post trained with end to end with the encoder head and decoder.
The diagram looks good where I'm assuming that "t Transformer" is the transformer inside of Llama3VisionProjectionHead. Also the cross attention with the decoder only happens on certain layers of the decoder. If you want to dig even deeper into how it works you can look at how images get broken into tiles which CLIP converts into patches so that you end up with a encoder sequence length of num_imagesxnum_tilesx(num_patches**2 + 1)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
2 questions really:
In the [source code] (https://github.com/pytorch/torchtune/blob/main/torchtune/models/llama3_2_vision/_model_builders.py) for Llama 3.2 vision, there's a component called
clip_vision_encoder
. I assume this is not referencing OpenAI CLIP?Is this a correct representation of the Llama 3.2 vision architecture? I read the paper + browsed the source code, and this is what I came up with:
Beta Was this translation helpful? Give feedback.
All reactions