ViTP-Transformers-Collections
Collection
huggingface/transformers implemtation โข 6 items โข Updated โข 1
Run BiliSakura/ViTP-Vit-L-300M-RS on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/BiliSakura/ViTP-Vit-L-300M-RS. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/BiliSakura/ViTP-Vit-L-300M-RS on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use BiliSakura/ViTP-Vit-L-300M-RS with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-feature-extraction", model="BiliSakura/ViTP-Vit-L-300M-RS", trust_remote_code=True) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("BiliSakura/ViTP-Vit-L-300M-RS", trust_remote_code=True, device_map="auto")ViTP (Visual Instruction Pretraining) vision backbone โ ViT-L 300M variant pretrained on remote sensing domain visual instruction data. Compatible with InternVisionModel from InternVL.
The model repo includes the modeling code. Load with transformers (no ViTP repo needed):
from transformers import AutoModel, AutoImageProcessor
import torch
device = "cuda"
model = AutoModel.from_pretrained(
"BiliSakura/ViTP-ViT-L-300M-RS",
trust_remote_code=True,
torch_dtype=torch.bfloat16,
device_map=device,
).eval()
processor = AutoImageProcessor.from_pretrained("BiliSakura/ViTP-ViT-L-300M-RS")
pixel_values = processor(images="image.jpg", return_tensors="pt").pixel_values.to(device, model.dtype)
with torch.no_grad():
outputs = model(pixel_values=pixel_values)
# Pooled CLS token: (1, 1024)
features = outputs.pooler_output
# Or full sequence: outputs.last_hidden_state
@article{Li_2025_ViTP,
title={Visual Instruction Pretraining for Domain-Specific Foundation Models},
author={Li, Yuxuan and Zhang, Yicheng and Tang, Wenhao and Dai, Yimian and Cheng, Ming-Ming and Li, Xiang and Yang, Jian},
journal={arXiv},
year={2025}
}
Base model
GreatBird/ViTP