Image-Text-to-Text
PEFT
Safetensors
English
lora
cvpd
self-distillation
multimodal
vision-language
lmm
ocr
qwen3-vl
unsupervised
conversational
Instructions to use shravvvv/CVPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use shravvvv/CVPD with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-VL-8B-Instruct") model = PeftModel.from_pretrained(base_model, "shravvvv/CVPD") - Notebooks
- Google Colab
- Kaggle
Match VISE model card tone
Browse files
README.md
CHANGED
|
@@ -19,25 +19,29 @@ tags:
|
|
| 19 |
- unsupervised
|
| 20 |
---
|
| 21 |
|
| 22 |
-
# CVPD
|
| 23 |
-
|
| 24 |
-
This is the CVPD LoRA adapter for `Qwen/Qwen3-VL-4B-Instruct`, from our
|
| 25 |
-
[Perception Before Supervision: Self-Contained Visual Distillation from Counterfactual Blind Spots](https://github.com/mbzuai-oryx/CVPD)
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## Usage
|
| 43 |
|
|
@@ -72,13 +76,16 @@ print(processor.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special
|
|
| 72 |
|
| 73 |
## Training
|
| 74 |
|
| 75 |
-
- Base
|
| 76 |
-
- LoRA: `r=32`, `alpha=64`, `dropout=0.05`
|
| 77 |
-
|
| 78 |
-
- AdamW,
|
| 79 |
-
-
|
| 80 |
-
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
## License
|
| 84 |
|
|
|
|
| 19 |
- unsupervised
|
| 20 |
---
|
| 21 |
|
| 22 |
+
# CVPD: Contrastive Counterfactual Visual Process Distillation
|
| 23 |
+
|
| 24 |
+
This is the CVPD LoRA adapter for `Qwen/Qwen3-VL-4B-Instruct`, from our paper
|
| 25 |
+
[Perception Before Supervision: Self-Contained Visual Distillation from Counterfactual Blind Spots](https://github.com/mbzuai-oryx/CVPD),
|
| 26 |
+
accepted to BMVC 2026.
|
| 27 |
+
|
| 28 |
+
CVPD is a fully self-contained framework for dense, token-level visual self-distillation.
|
| 29 |
+
Where prior visual distillation builds its privileged context from outside the model, using
|
| 30 |
+
segmentation systems, region proposals, or a stronger annotator, CVPD recovers that context
|
| 31 |
+
from the model's own counterfactual behavior. We train on raw, unlabeled images with no
|
| 32 |
+
captions, bounding boxes, labels, reward models, or teacher models, by locating **visual blind
|
| 33 |
+
spots**, regions the model can perceive but fails to exploit under full-image conditioning:
|
| 34 |
+
|
| 35 |
+
- **Discovery:** the model writes its own question and probe answer per image and proposes
|
| 36 |
+
candidate regions by self-grounding and by 3x3 and 2x2 partitions. A region is kept when
|
| 37 |
+
cropping to it moves and sharpens the answer distribution while blurring ("ghosting") it
|
| 38 |
+
leaves the full-image behavior unchanged.
|
| 39 |
+
- **Contrastive self-distillation:** each retained region instantiates four policies from the
|
| 40 |
+
same backbone. The online student learns from a crop-conditioned positive teacher, is pushed
|
| 41 |
+
away from a ghost-conditioned negative teacher, and is anchored to a frozen reference policy.
|
| 42 |
+
|
| 43 |
+
We combine these as latent transfer plus contrastive ranking (`lambda_rank=0.5`, margin
|
| 44 |
+
`m=0.1`) and optimize under a KL anchor adapted online to a target divergence of `0.03`.
|
| 45 |
|
| 46 |
## Usage
|
| 47 |
|
|
|
|
| 76 |
|
| 77 |
## Training
|
| 78 |
|
| 79 |
+
- Base: `Qwen/Qwen3-VL-4B-Instruct`, vision encoder frozen.
|
| 80 |
+
- LoRA: `r=32`, `alpha=64`, `dropout=0.05` on the attention and MLP projections of the
|
| 81 |
+
language model backbone.
|
| 82 |
+
- Optimizer: AdamW, `lr=2e-5`, weight decay `0.01`, gradient clipping `1.0`, bfloat16.
|
| 83 |
+
- Objective: latent transfer + contrastive ranking (`lambda_rank=0.5`, margin `m=0.1`) +
|
| 84 |
+
KL anchor, initialized at `1e-3` and adapted online to a target KL of `0.03`.
|
| 85 |
+
- Teachers: momentum pair maintained as an EMA of the LoRA parameters (`alpha=0.05`).
|
| 86 |
+
- Discovery: thresholds `tau_crop = tau_ghost = 0.05`, all views resized to 448x448.
|
| 87 |
+
- Data: 15,000 raw, unlabeled images yielding ~2,590 curated blind-spot tuples. No captions,
|
| 88 |
+
bounding boxes, labels, answers, or reward signals.
|
| 89 |
|
| 90 |
## License
|
| 91 |
|