Downloads · 30 days
8
13% of all-time downloads
heissanjay/vit-cifar10
vit-cifar10 is a machine learning model from heissanjay. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This is a Vision Transformer model trained on the CIFAR-10 dataset.
Downloads · 30 days
8
13% of all-time downloads
All-time downloads
64
Public
Parameters
6.4M
50.9 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin25.4 MB · 50%
From the Hugging Face model README
This is a Vision Transformer model trained on the CIFAR-10 dataset.
The model architecture is defined in model.py. The configuration is in config.json.
To use this model, you'll need to have model.py in your working directory.
from huggingface_hub import hf_hub_download
import torch
from model import VisionTransformer
import json
# Your repository ID
repo_id = "heissanjay/vit-cifar10"
# Download model files
config_path = hf_hub_download(repo_id=repo_id, filename="config.json")
model_path = hf_hub_download(repo_id=repo_id, filename="pytorch_model.bin")
# You also need to download model.py or have it locally
# hf_hub_download(repo_id=repo_id, filename="model.py")
# Load config
with open(config_path) as f:
config = json.load(f)
# Instantiate model
model = VisionTransformer(**config)
model.load_state_dict(torch.load(model_path))
# Now you can use the model for inference