Instructions to use danvinci/lfm25vl_mosaic_change_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use danvinci/lfm25vl_mosaic_change_detection with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/models/LiquidAI/LFM2.5-VL-1.6B") model = PeftModel.from_pretrained(base_model, "danvinci/lfm25vl_mosaic_change_detection") - Notebooks
- Google Colab
- Kaggle
danvinci/lfm25vl_mosaic_change_detection
LoRA adapter for LiquidAI/LFM2.5-VL-1.6B, fine-tuned for satellite change detection across 7 event schemas (construction, flood, ice, thermal, urban, vegetation, wetland).
Eval
On v2_val (700 rows, 33 positives + 67 nulls per schema):
| metric | value |
|---|---|
| F1 | 0.95 |
| accuracy | 0.969 |
| precision | 0.98 |
| recall | 0.92 |
Per-schema F1: IceExtent 1.00, ThermalHotspot 0.97, VegetationStress 0.97, UrbanChange 0.95, WetlandChange 0.95, FloodExtent 0.91, ConstructionProgress 0.90.
Null-baseline accuracy on this set is 0.670.
Recipe
- Base:
LiquidAI/LFM2.5-VL-1.6B(bf16) - LoRA: r=16, alpha=16, dropout=0, targets
q_proj k_proj v_proj out_proj in_proj w1 w2 w3 - Vision frozen (
finetune_vision_layers=False); language tower only - 4 epochs × 29,281 rows (full MOSAIC TRAIN split, natural class distribution), effective batch 8, lr 2e-4 linear, weight_decay 0.001
- H100 80GB, ~5h wall
Inference
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoProcessor
import torch
base = AutoModelForCausalLM.from_pretrained(
"LiquidAI/LFM2.5-VL-1.6B",
torch_dtype=torch.bfloat16,
trust_remote_code=True,
).eval()
model = PeftModel.from_pretrained(base, "danvinci/lfm25vl_mosaic_change_detection")
processor = AutoProcessor.from_pretrained("LiquidAI/LFM2.5-VL-1.6B", trust_remote_code=True)
Generation defaults: do_sample=True, temperature=0.1, min_p=0.15, repetition_penalty=1.05 (Liquid's published values). Greedy decoding underperforms.
Prompt contract
Per-schema predicate prompt of the form "did <schema> happen?" with two image inputs (before, after). The model returns either a JSON object matching the schema's field spec or the literal string null. See training/prompts.py for predicate_prompt() and parse_output().
Source
- Downloads last month
- 21