Learning Transferable Visual Models From Natural Language Supervision
Paper • 2103.00020 • Published • 22
Lucid port of https://huggingface.co/openai/clip-vit-large-patch14-336,
converted to Lucid-native safetensors.
| Tag | Params | GFLOPs | Size | Source |
|---|---|---|---|---|
OPENAI_WIT400M (default) |
— | — | 1632.53 MB | https: |
import lucid
import lucid.models as models
from lucid.models.weights import ClipWeights
# default tag
model = models.clip_vit_large_14_336(pretrained=True)
# explicit tag (enum or string)
model = models.clip_vit_large_14_336(weights=ClipWeights.OPENAI_WIT400M)
model = models.clip_vit_large_14_336(pretrained="OPENAI_WIT400M")
# feed token ids (tokenize with the matching lucid.utils.tokenizer)
input_ids = lucid.tensor([[101, 7592, 2088, 102]], dtype=lucid.int64)
out = model(input_ids)
hidden = out.last_hidden_state # (B, T, hidden_size)
Converted from https://huggingface.co/openai/clip-vit-large-patch14-336 via
python -m tools.convert_weights CLIP --tag OPENAI_WIT400M.
Key mapping + numerical parity verified against the source.
mit — inherited from the original weights.
@inproceedings{radford2021learning,
title={Learning Transferable Visual Models From Natural Language Supervision},
author={Radford, Alec and Kim, Jong Wook and Hallacy, Chris and Ramesh, Aditya and Goh, Gabriel and Agarwal, Sandhini and Sastry, Girish and Askell, Amanda and Mishkin, Pamela and Clark, Jack and Krueger, Gretchen and Sutskever, Ilya},
booktitle={ICML},
pages={8748--8763},
year={2021}
}