Instructions to use sgraham/met_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sgraham/met_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="sgraham/met_model") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("sgraham/met_model") model = AutoModelForZeroShotImageClassification.from_pretrained("sgraham/met_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.f7be417
-
Upload 7 files
b0f7648 -
Upload embeddings.db
embeddings created by dropping 300 more MET images through the retrained model.cd76bf7 -
met images 30 epochs
{'loss': 0.4739, 'learning_rate': 2.0286396181384247e-05, 'epoch': 17.86} {'train_runtime': 4074.7723, 'train_samples_per_second': 10.19, 'train_steps_per_second': 0.206, 'train_loss': 0.3362658455258324, 'epoch': 30.0} 100% 840/840 [1:07:54<00:00, 4.85s/it] ***** train metrics ***** epoch = 30.0 train_loss = 0.3363 train_runtime = 1:07:54.77 train_samples_per_second = 10.19 train_steps_per_second = 0.206c95fe37 -
Create readme.md
918d492 -
trained on 1371 images from the Met for 10 epochs
***** train metrics ***** epoch = 10.0 train_loss = 0.8552 train_runtime = 1:11:30.94 train_samples_per_second = 3.225 train_steps_per_second = 0.0332e27bbb -
initial commit
a0611cd