How to use apple/MobileCLIP-S2-OpenCLIP with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:apple/MobileCLIP-S2-OpenCLIP') tokenizer = open_clip.get_tokenizer('hf-hub:apple/MobileCLIP-S2-OpenCLIP')
Why doesn't the S1/S2 text encoder use attn_mask or key_padding_mask to deal with padding tokens? This seems to cause attention to be paid to the padding tokens instead of just the valid tokens.
· Sign up or log in to comment