Instructions to use timm/MobileCLIP2-S4-OpenCLIP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- OpenCLIP
How to use timm/MobileCLIP2-S4-OpenCLIP with OpenCLIP:
import open_clip model, preprocess_train, preprocess_val = open_clip.create_model_and_transforms('hf-hub:timm/MobileCLIP2-S4-OpenCLIP') tokenizer = open_clip.get_tokenizer('hf-hub:timm/MobileCLIP2-S4-OpenCLIP') - Notebooks
- Google Colab
- Kaggle
Add model
Browse filesFiles changed (9)
- README.mdAdded+8
- merges.txtAdded
- open_clip_config.jsonAdded+38
- open_clip_model.safetensorsAdded+3
- open_clip_pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+30
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+31
- vocab.jsonAdded
12345678---tags:- cliplibrary_name: open_clippipeline_tag: zero-shot-image-classificationlicense: mit---# Model card for MobileCLIP2-S4-OpenCLIP1234567891011121314151617181920212223242526272829303132333435363738{ "model_cfg": { "embed_dim": 768, "vision_cfg": { "timm_model_name": "fastvit_mci4", "timm_model_pretrained": false, "timm_pool": "avg", "timm_proj": null, "timm_drop": 0.0, "timm_drop_path": 0.0, "image_size": 256 }, "text_cfg": { "context_length": 77, "vocab_size": 49408, "width": 768, "heads": 12, "layers": 12, "no_causal_mask": true, "hf_tokenizer_name": "timm/MobileCLIP2-S4-OpenCLIP" }, "custom_text": true }, "preprocess_cfg": { "mean": [ 0.48145466, 0.4578275, 0.40821073 ], "std": [ 0.26862954, 0.26130258, 0.27577711 ], "interpolation": "bilinear", "resize_mode": "shortest" }}123version https://git-lfs.github.com/spec/v1oid sha256:62296b162c7963190e03414d7755d4c39c3c5fae380540b25b246885e236ce73size 1782880796123version https://git-lfs.github.com/spec/v1oid sha256:f25c203a6c982e91e6f55da0427cc736594ea701e5afd62049cdae8d48223af2size 1783387316123456789101112131415161718192021222324252627282930{ "bos_token": { "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }, "eos_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}12345678910111213141516171819202122232425262728293031{ "add_prefix_space": false, "added_tokens_decoder": { "49406": { "content": "<|startoftext|>", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true }, "49407": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "<|startoftext|>", "clean_up_tokenization_spaces": false, "do_lower_case": true, "eos_token": "<|endoftext|>", "errors": "replace", "extra_special_tokens": {}, "model_max_length": 77, "pad_token": "<|endoftext|>", "tokenizer_class": "CLIPTokenizer", "unk_token": "<|endoftext|>"}README.mdAdded+8
merges.txtAdded
open_clip_config.jsonAdded+38
open_clip_model.safetensorsAdded+3
open_clip_pytorch_model.binAdded+3
special_tokens_map.jsonAdded+30
tokenizer.jsonAdded
tokenizer_config.jsonAdded+31
vocab.jsonAdded