Back to directory

vit-trainer

A small, educational Python package for fine-tuning Vision Transformer models with PyTorch, reaching 97.65% accuracy on CIFAR-10 with a simpler API than general model-zoo libraries.

vit-trainer

vit-trainer focuses specifically on fine-tuning ViT models rather than covering the full range of architectures that libraries such as timm or transformers support, trading breadth for a simple, readable, production-usable API.

It supports mixed-precision training with the AdamW optimizer and cosine annealing with warmup, attention visualization for interpretability, and ONNX export for deployment, usable either from a command-line interface (vit-train) or a Python API for training, evaluation, prediction and metric computation.

It installs with pip, with optional extras for a Gradio demo or ONNX export, and can also be installed from source.

More in Models

See all 405
  • mini-AGI

    github.com

    A continual learning language model that trains from scratch on a single 8 GB VRAM GPU, assembling its own architecture and adapting its size to the hardware and data available rather than shipping as a fixed pretrained model.

  • An open-source contrastive-embedding pipeline that maps technical CVE vulnerability descriptions to formal cybersecurity compliance controls in NIST SP 800-53 and CMMC, published with its model generation, fine-tuning and evaluation code.

  • peekaboolean

    github.com

    A small vision-language model, fine-tuned with LoRA on a 500-million-parameter backbone, that answers typed multiple-choice, ordinal-score and yes/no questions about an image with calibrated probabilities, in about 400 milliseconds on a laptop.