Instructions to use howdyaendra/xblock-large-patch1-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use howdyaendra/xblock-large-patch1-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="howdyaendra/xblock-large-patch1-224") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("howdyaendra/xblock-large-patch1-224") model = AutoModelForImageClassification.from_pretrained("howdyaendra/xblock-large-patch1-224", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from howdyaendra/xblock-large-patch1-224: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/howdyaendra/xblock-large-patch1-224/resolve/main/config.json
- Command line
-
hf download hf://howdyaendra/xblock-large-patch1-224/config.json
-
curl -L -o config.json https://huggingface.co/howdyaendra/xblock-large-patch1-224/resolve/main/config.json
1.09 kB
| { | |
| "_name_or_path": "google/vit-large-patch16-224", | |
| "_num_labels": 10, | |
| "architectures": [ | |
| "ViTForImageClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.0, | |
| "encoder_stride": 16, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 1024, | |
| "id2label": { | |
| "0": "altright", | |
| "1": "facebook", | |
| "2": "fediverse", | |
| "3": "instagram", | |
| "4": "irrelevant", | |
| "5": "ngl", | |
| "6": "reddit", | |
| "7": "threads", | |
| "8": "tumblr", | |
| "9": "unrecognised-screenshot" | |
| }, | |
| "image_size": 224, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "label2id": { | |
| "altright": 0, | |
| "facebook": 1, | |
| "fediverse": 2, | |
| "instagram": 3, | |
| "irrelevant": 4, | |
| "ngl": 5, | |
| "reddit": 6, | |
| "threads": 7, | |
| "tumblr": 8, | |
| "unrecognised-screenshot": 9 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "model_type": "vit", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 24, | |
| "patch_size": 16, | |
| "problem_type": "single_label_classification", | |
| "qkv_bias": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.39.3" | |
| } | |