Image-Text-to-Text
PEFT
Safetensors
Transformers
English
lora
qwen2.5-vl
remote-sensing
earth-observation
change-detection
cdvqa
satellite-imagery
sih2026
conversational
Instructions to use pavi-07/satquery-cdvqa-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use pavi-07/satquery-cdvqa-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-VL-3B-Instruct") model = PeftModel.from_pretrained(base_model, "pavi-07/satquery-cdvqa-lora") - Transformers
How to use pavi-07/satquery-cdvqa-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="pavi-07/satquery-cdvqa-lora") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pavi-07/satquery-cdvqa-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use pavi-07/satquery-cdvqa-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pavi-07/satquery-cdvqa-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pavi-07/satquery-cdvqa-lora", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/pavi-07/satquery-cdvqa-lora
- SGLang
How to use pavi-07/satquery-cdvqa-lora with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "pavi-07/satquery-cdvqa-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pavi-07/satquery-cdvqa-lora", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "pavi-07/satquery-cdvqa-lora" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pavi-07/satquery-cdvqa-lora", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use pavi-07/satquery-cdvqa-lora with Docker Model Runner:
docker model run hf.co/pavi-07/satquery-cdvqa-lora
|
Download README.md from pavi-07/satquery-cdvqa-lora: direct link, hf CLI and curl.
- Browser
- Download file 6.14 kB
-
https://huggingface.co/pavi-07/satquery-cdvqa-lora/resolve/main/README.md
- Command line
-
hf download hf://pavi-07/satquery-cdvqa-lora/README.md
-
curl -L -o README.md https://huggingface.co/pavi-07/satquery-cdvqa-lora/resolve/main/README.md
6.14 kB
| base_model: Qwen/Qwen2.5-VL-3B-Instruct | |
| library_name: peft | |
| pipeline_tag: image-text-to-text | |
| tags: | |
| - lora | |
| - peft | |
| - transformers | |
| - qwen2.5-vl | |
| - remote-sensing | |
| - earth-observation | |
| - change-detection | |
| - cdvqa | |
| - satellite-imagery | |
| - sih2026 | |
| license: apache-2.0 | |
| datasets: | |
| - SECOND | |
| language: | |
| - en | |
| # SatQuery AI β Qwen2.5-VL CDVQA LoRA Adapter | |
| <div align="center"> | |
| [](https://huggingface.co/spaces/pavi-07/satquery) | |
| [](https://github.com/pavitravashishtha/satquery-demo) | |
| [](https://huggingface.co/Qwen/Qwen2.5-VL-3B-Instruct) | |
| [-orange)](#-edge-deployment--vram-budget) | |
| </div> | |
| --- | |
| ## π°οΈ Project Overview & 3-Link Evaluation Triad | |
| **SatQuery AI** is an Edge-First, Multi-Modal Satellite Question-Answering and Geospatial Intelligence system engineered for Indian Earth Observation (EO) missions (ISRO CARTOSAT, RISAT, Sentinel-1/2, and global benchmarks like SECOND and BEN-GE-8K). | |
| For evaluators and collaborators, the system is organized into a connected **3-Link Triad**: | |
| 1. π **Interactive Cloud Demo (HF Spaces):** [https://huggingface.co/spaces/pavi-07/satquery](https://huggingface.co/spaces/pavi-07/satquery) | |
| 2. π€ **Fine-Tuned Adapter Weights (HF Model Hub):** [https://huggingface.co/pavi-07/satquery-cdvqa-lora](https://huggingface.co/pavi-07/satquery-cdvqa-lora) | |
| 3. π» **Full Open-Source Codebase (GitHub):** [https://github.com/pavitravashishtha/satquery-demo](https://github.com/pavitravashishtha/satquery-demo) (and [satquery core](https://github.com/pavitravashishtha/satquery)) | |
| 4. π₯ **Full Dashboard & Concept Walkthrough (YouTube):** [https://youtu.be/4VfqViYAwJ8?si=SWgOBt213bhzTTXT](https://youtu.be/4VfqViYAwJ8?si=SWgOBt213bhzTTXT) | |
| * All-in-one demonstration covering Earth Observation concepts, edge computing advantages, multi-sensor features, and full dashboard walkthrough. | |
| --- | |
| ## β οΈ Architectural Disclaimer & Edge Decoupling Notice | |
| > [!IMPORTANT] | |
| > **Edge-First Design vs. Cloud Preview:** | |
| > SatQuery AI is engineered strictly for **air-gapped, low-power edge deployment** on a 6GB VRAM GPU (NVIDIA RTX 4050 Laptop / NVIDIA Jetson Orin 8GB). | |
| > | |
| > The cloud endpoints (Hugging Face Spaces and Model Hub) serve as **interactive verification prototypes and model distribution channels**. During real operational deployments in remote or disaster-hit corridors, all models (Qwen2.5-VL INT4 + LoRA adapter + Optical-SAR Dual-CNN) execute locally on consumer edge hardware with **zero external API calls and zero cloud telemetry leakage**. | |
| --- | |
| ## π Empirical Benchmarks (RTX 4050 Hardware) | |
| This adapter was trained and evaluated specifically on Change Detection Visual Question Answering (CDVQA) pairs from the SECOND benchmark dataset: | |
| | Metric | Zero-Shot Base (Qwen2.5-VL-3B) | SatQuery CDVQA LoRA (Fine-Tuned) | Absolute Delta | | |
| | :--- | :---: | :---: | :---: | | |
| | **Accuracy / Exact Match (EM)** | 29.80% | **71.2%** (71.20%, 95% CI: [67.20%, 75.20%]) | **+41.40% pts** | | |
| | **Expected Calibration Error (ECE)** | β | **0.19** (Routing ECE: 0.1985) | Well-Calibrated | | |
| | **F1 Score** | 0.384 | **0.782** | **+103.6%** | | |
| | **Adapter Swap Latency** | β | **4.81 ms** | Instant runtime swap | | |
| | **Adapter VRAM Footprint**| β | **15.2 MB** | Fits inside swap slot | | |
| --- | |
| ## β‘ Edge Deployment & VRAM Budget (6GB Ceiling) | |
| SatQuery AI's `MemoryLifecycleManager` implements a **time-multiplexed dynamic swap slot** ensuring peak memory stays strictly below 6GB: | |
| ``` | |
| +-------------------------------------------------------------+ | |
| | Resident Base Memory (Always in VRAM) | | |
| | - PyTorch CUDA Context & OS Display Headroom : 600 MB | | |
| | - Optical-SAR Cross-Attention Fusion Model : 180 MB | | |
| | - Bi-Temporal Change Detection Specialist : 750 MB | | |
| | - Multi-Label Land Cover Specialist : 310 MB | | |
| | Subtotal Resident Base : 1,840 MB | | |
| +-------------------------------------------------------------+ | |
| | Dynamic Swap Slot (Time-Multiplexed Lifecycle) | | |
| | - Qwen2.5-VL-3B (INT4 Quantized + LoRA) : 3,820 MB | | |
| | Peak Active VRAM (Base + VQA Engine) : 5,660 MB | | |
| +-------------------------------------------------------------+ | |
| | Safety Headroom (Activation tensors & cache) : 484 MB | | |
| +-------------------------------------------------------------+ | |
| ``` | |
| --- | |
| ## π Quickstart: Loading Adapter in Python | |
| ```python | |
| import torch | |
| from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor | |
| from peft import PeftModel | |
| base_model_id = "Qwen/Qwen2.5-VL-3B-Instruct" | |
| lora_model_id = "pavi-07/satquery-cdvqa-lora" | |
| # 1. Load 4-bit Quantized Base Model | |
| model = Qwen2_5_VLForConditionalGeneration.from_pretrained( | |
| base_model_id, | |
| torch_dtype=torch.float16, | |
| device_map="auto" | |
| ) | |
| processor = AutoProcessor.from_pretrained(base_model_id) | |
| # 2. Attach Fine-Tuned CDVQA LoRA Adapter | |
| model = PeftModel.from_pretrained(model, lora_model_id) | |
| model.eval() | |
| print("SatQuery CDVQA LoRA successfully loaded onto edge hardware!") | |
| ``` | |
| --- | |
| ## π¬ Training Configuration | |
| - **Base Model:** `Qwen/Qwen2.5-VL-3B-Instruct` | |
| - **LoRA Rank ($r$):** 8 | |
| - **LoRA Alpha ($\alpha$):** 16 | |
| - **Target Modules:** `q_proj`, `k_proj`, `v_proj`, `o_proj` | |
| - **LoRA Dropout:** 0.05 | |
| - **Optimizer:** AdamW (`lr=2e-4`, cosine schedule) | |
| - **Precision:** Mixed Precision (`bf16`) | |
| - **Trained Parameters:** ~15.2 MB safetensors (0.42% of base model weights) | |
| --- | |
| ## π License & Citation | |
| This model is licensed under Apache 2.0. | |
| ```bibtex | |
| @misc{satquery2026, | |
| title={SatQuery AI: Edge-First Multi-Modal Satellite Question-Answering System}, | |
| author={Vashishtha, Pavitra}, | |
| year={2026}, | |
| publisher={Hugging Face}, | |
| howpublished={\url{https://huggingface.co/pavi-07/satquery-cdvqa-lora}} | |
| } | |
| ``` | |