#582 · Primary category: Education & Research

OpenAI-CLIP

bert clip-model dataset deep-learning nlp openai-clip paper pytorch

Simple implementation of OpenAI CLIP model in PyTorch.

Project last updated:10/18/25

GitHub Stars

726

Forks

105

Contributors

1

License

MIT

Why we included this project

CLIP is usually consumed as a pretrained checkpoint, but this repo shows how the model is actually built and trained. It implements the contrastive language-image setup from scratch in PyTorch, using a ResNet image encoder, a DistilBERT text encoder, and a projection head, then trains on Flickr-8k so you can watch text-to-image retrieval come together. The code is short enough to read in one sitting, and the notebook walks through each step. The author also fixed real training bugs that users reported, including targets leaking from the model outputs and missing cosine normalization, so the final loss is a faithful replica of the paper's objective. It has been cited in published papers, and it works well as a compact reference for students and researchers who want to study or adapt a CLIP implementation.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category