Run this model with HF Jobs
Run parlange/twins_pcpvt-gravit-c2 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:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/parlange/twins_pcpvt-gravit-c2. 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.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/parlange/twins_pcpvt-gravit-c2 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.
Instructions to use parlange/twins_pcpvt-gravit-c2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use parlange/twins_pcpvt-gravit-c2 with timm:
import timm model = timm.create_model("hf-hub:parlange/twins_pcpvt-gravit-c2", pretrained=True) - Notebooks
- Google Colab
- Kaggle
π twins_pcpvt-gravit-c2
π This model is part of GraViT: Transfer Learning with Vision Transformers and MLP-Mixer for Strong Gravitational Lens Discovery
π GitHub Repository: https://github.com/parlange/gravit
π°οΈ Model Details
- π€ Model Type: Twins_PCPVT
- π§ͺ Experiment: C2 - C21+J24-half
- π Dataset: C21+J24
- πͺ Fine-tuning Strategy: half
π» Quick Start
import torch
import timm
# Load the model directly from the Hub
model = timm.create_model(
'hf-hub:parlange/twins_pcpvt-gravit-c2',
pretrained=True
)
model.eval()
# Example inference
dummy_input = torch.randn(1, 3, 224, 224)
with torch.no_grad():
output = model(dummy_input)
predictions = torch.softmax(output, dim=1)
print(f"Lens probability: {predictions[0][1]:.4f}")
β‘οΈ Training Configuration
Training Dataset: C21+J24 (CaΓ±ameras et al. 2021 + Jaelani et al. 2024)
Fine-tuning Strategy: half
| π§ Parameter | π Value |
|---|---|
| Batch Size | 192 |
| Learning Rate | AdamW with ReduceLROnPlateau |
| Epochs | 100 |
| Patience | 10 |
| Optimizer | AdamW |
| Scheduler | ReduceLROnPlateau |
| Image Size | 224x224 |
| Fine Tune Mode | half |
| Stochastic Depth Probability | 0.1 |
π Training Curves
π Final Epoch Training Metrics
| Metric | Training | Validation |
|---|---|---|
| π Loss | 0.3317 | 0.3298 |
| π― Accuracy | 0.8590 | 0.8761 |
| π AUC-ROC | 0.9340 | 0.9396 |
| βοΈ F1 Score | 0.8585 | 0.8779 |
βοΈ Evaluation Results
ROC Curves and Confusion Matrices
Performance across all test datasets (a through l) in the Common Test Sample (More et al. 2024):
π Performance Summary
Average performance across 12 test datasets from the Common Test Sample (More et al. 2024):
| Metric | Value |
|---|---|
| π― Average Accuracy | 0.8122 |
| π Average AUC-ROC | 0.8739 |
| βοΈ Average F1-Score | 0.5744 |
π Citation
If you use this model in your research, please cite:
@misc{parlange2025gravit,
title={GraViT: Transfer Learning with Vision Transformers and MLP-Mixer for Strong Gravitational Lens Discovery},
author={RenΓ© Parlange and Juan C. Cuevas-Tello and Octavio Valenzuela and Omar de J. Cabrera-Rosas and TomΓ‘s Verdugo and Anupreeta More and Anton T. Jaelani},
year={2025},
eprint={2509.00226},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2509.00226},
}
Model Card Contact
For questions about this model, please contact the author through: https://github.com/parlange/
- Downloads last month
- 42
Collection including parlange/twins_pcpvt-gravit-c2
Paper for parlange/twins_pcpvt-gravit-c2
Evaluation results
- Average Accuracy on Common Test Sample (More et al. 2024)self-reported0.812
- Average AUC-ROC on Common Test Sample (More et al. 2024)self-reported0.874
- Average F1-Score on Common Test Sample (More et al. 2024)self-reported0.574












