Instructions to use HuggingFaceM4/tiny-random-siglip with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceM4/tiny-random-siglip with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="HuggingFaceM4/tiny-random-siglip", trust_remote_code=True) pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("HuggingFaceM4/tiny-random-siglip", trust_remote_code=True) model = AutoModelForZeroShotImageClassification.from_pretrained("HuggingFaceM4/tiny-random-siglip", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
align implementation on transformers + include navit style changes (these changes are backward compatible)
e06a98d | { | |
| "_name_or_path": "HuggingFaceM4/tiny-random-siglip", | |
| "architectures": [ | |
| "SiglipModel" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "HuggingFaceM4/tiny-random-siglip--configuration_siglip.SiglipConfig", | |
| "AutoModel": "HuggingFaceM4/tiny-random-siglip--modeling_siglip.SiglipModel" | |
| }, | |
| "initializer_factor": 1.0, | |
| "logit_scale_init_value": 2.6592, | |
| "model_type": "siglip", | |
| "projection_dim": 512, | |
| "text_config": { | |
| "hidden_size": 144, | |
| "intermediate_size": 538, | |
| "model_type": "siglip_text_model", | |
| "num_attention_heads": 2, | |
| "num_hidden_layers": 3, | |
| "projection_dim": 64, | |
| "vocab_size": 32000 | |
| }, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.37.0.dev0", | |
| "vision_config": { | |
| "hidden_size": 144, | |
| "image_size": 30, | |
| "intermediate_size": 538, | |
| "model_type": "siglip_vision_model", | |
| "num_attention_heads": 2, | |
| "num_hidden_layers": 3, | |
| "patch_size": 2, | |
| "projection_dim": 64 | |
| } | |
| } | |