Downloads · 30 days
0
spidey1807/vit-small-cifar100-lora
vit-small-cifar100-lora is a image classification model from spidey1807. Use it when you need a label for an image. It is set up for peft. The card lists the license as mit.
This model is a vitsmallpatch16224 from timm, fine-tuned on CIFAR-100 using LoRA (Low-Rank Adaptation) via the PEFT library.
Downloads · 30 days
0
Access
Public
Updated Apr 3, 2026
Repo size
88.2 MB
Likes
0
Public
Click a slice to open those files.
.pt88.2 MB · 100%
From the Hugging Face model README
This model is a vit_small_patch16_224 from timm,
fine-tuned on CIFAR-100 using LoRA (Low-Rank Adaptation) via the
PEFT library.
vit_small_patch16_224 (ImageNet pretrained)qkv layersmlops-assignment5import torch
import timm
from peft import LoraConfig, get_peft_model
model = timm.create_model("vit_small_patch16_224", pretrained=False, num_classes=100)
lora_config = LoraConfig(r=RANK, lora_alpha=ALPHA, target_modules=["qkv"],
lora_dropout=0.1, bias="none", modules_to_save=["head"])
model = get_peft_model(model, lora_config)
ckpt = torch.load("pytorch_model.pt", map_location="cpu")
model.load_state_dict(ckpt["model_state_dict"])
model.eval()