Instructions to use google/vit-hybrid-base-bit-384 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/vit-hybrid-base-bit-384 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="google/vit-hybrid-base-bit-384") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("google/vit-hybrid-base-bit-384", dtype="auto") - Notebooks
- Google Colab
- Kaggle
cannot load model with AutoModel.from_pretrained
#4
by PedroT - opened
python version : 3.10
transformers version: 4.37.2
from transformers import AutoModel
model_name = 'google/vit-hybrid-base-bit-384'
model = AutoModel.from_pretrained(model_name)
ValueError: The checkpoint you are trying to load has model type vit-hybrid but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
Thanks for reporting, also reported here: https://github.com/huggingface/transformers/issues/29862.
Will be fixed soon.