Run this model with HF Jobs
Run MolAlexandre/masar-clip-lora-banks 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/MolAlexandre/masar-clip-lora-banks. 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/MolAlexandre/masar-clip-lora-banks 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 MolAlexandre/masar-clip-lora-banks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use MolAlexandre/masar-clip-lora-banks with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
MASAR CLIP LoRA banks
The twelve banks of LoRA experts trained for the paper Let Expert Confidence Guide LoRA Merging: Margin-Aware Spectral Adaptation (MASAR). Code: https://github.com/Harvard-AI-and-Robotics-Lab/masar-merging
Each bank holds eight experts, one per task (Cars, DTD, EuroSAT, GTSRB, MNIST, RESISC45, SUN397, SVHN), as PEFT
adapters: <backbone>/<bank>/<task>/adapter_model.safetensors, adapter_config.json, and training.json (training
record). LoRA of rank 16, alpha 16, on the query, key, value and output projections of every block of the CLIP image
encoder. The experts were trained with the recipe of the paper (Supp. B.1), and only the loss changes between banks.
| Folder | Backbone | Loss | Logit scale s | CosFace margin |
|---|---|---|---|---|
| ViT-B-32/CE-0.004 | ViT-B/32 | cross-entropy | 10,000 | - |
| ViT-B-32/CE-0.008 | ViT-B/32 | cross-entropy | 3,000 | - |
| ViT-B-32/CE-0.014 | ViT-B/32 | cross-entropy | 1,000 | - |
| ViT-B-32/CE-0.043 | ViT-B/32 | cross-entropy | 300 | - |
| ViT-B-32/CE-0.084 | ViT-B/32 | cross-entropy | 100 | - |
| ViT-B-32/CF-0.084 | ViT-B/32 | CosFace | 10,000 | 0.05 |
| ViT-B-32/CF-0.116 | ViT-B/32 | CosFace | 10,000 | 0.10, capped at 0.8 gamma(y) |
| ViT-B-32/CF-0.188 | ViT-B/32 | CosFace | 10,000 | 0.20, capped at 0.8 gamma(y) |
| ViT-L-14/CE-0.007 | ViT-L/14 | cross-entropy | 10,000 | - |
| ViT-L-14/CE-0.097 | ViT-L/14 | cross-entropy | 100 | - |
| ViT-L-14/CF-0.100 | ViT-L/14 | CosFace | 10,000 | 0.05 |
| ViT-L-14/CF-0.231 | ViT-L/14 | CosFace | 10,000 | 0.20, capped at 0.8 gamma(y) |
A bank is named by the median margin m of its experts on one unlabeled image of their task. The heads are the frozen
zero-shot CLIP heads (prompt templates of KnOTS); masar/clip.py of the code repository builds them.
The two public KnOTS banks of the paper are the adapters hoffman-lab/KnOTS-ViT-B-32_lora_R16_* and
hoffman-lab/KnOTS-ViT-L-14_lora_R16_*.
- Downloads last month
- -
Model tree for MolAlexandre/masar-clip-lora-banks
Base model
openai/clip-vit-base-patch32