Instructions to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m", filename="LFM2.5-VL-450M-methane-expert-f16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M # Run inference directly in the terminal: llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M # Run inference directly in the terminal: llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Use Docker
docker model run hf.co/5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with Ollama:
ollama run hf.co/5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
- Unsloth Studio
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m to start chatting
- Pi
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with Docker Model Runner:
docker model run hf.co/5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
- Lemonade
How to use 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Q4_K_M
Run and chat with the model
lemonade run user.lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m-Q4_K_M
List all available models
lemonade list
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:# Run inference directly in the terminal:
llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:# Run inference directly in the terminal:
./llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:# Run inference directly in the terminal:
./build/bin/llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:Use Docker
docker model run hf.co/5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:LFM2.5-VL-450M VRSBench + MethaneS2CM Expert
Model Description
This is a fine-tuned version of LiquidAI's LFM2.5-VL-450M vision-language model, specialized for methane plume detection in satellite imagery. The model was trained in two stages:
- VRSBench Training: Base training on VRSBench dataset
- MethaneS2CM Fine-tuning: Additional training on MethaneS2CM dataset for methane detection
The model can detect methane plumes in Sentinel-2 satellite images and provide bounding box coordinates for the plume location.
Training Details
Stage 1: VRSBench Pre-training
- Base Model: LFM2.5-VL-450M
- Dataset: VRSBench (Vision Reasoning and Scene Understanding Benchmark)
- Epochs: 1
- Method: LoRA (r=16, alpha=32)
Stage 2: Methane Detection Fine-tuning
- Base Model: VRSBench-trained model (
5ch4um1/lfm2.5-vrsbench-lora-450m) - Dataset: MethaneS2CM (Methane Sentinel-2 Community Model)
- Source: H1deaki/MethaneS2CM on Hugging Face
- 257,096 training samples, 60,567 test samples
- Hand-annotated plume masks for bounding box extraction
- Sentinel-2 bands: SWIR22 (Band 12) → Red, NIR08 (Band 8) → Green, Red (Band 4) → Blue
- Training Samples: 20,000 (10k positive with plumes, 10k negative)
- Epochs: 2
- Method: LoRA (r=16, alpha=32)
- Hardware: Local GPU training (no Ray/distributed)
Evaluation Results
Methane Detection (500 test samples)
| Metric | BASE VRSBench | METHANE EXPERT (this model) | Improvement |
|---|---|---|---|
| Accuracy | 49.80% | 51.00% | +1.20% |
| Precision | 0.00% | 50.79% | +50.79% |
| Recall | 0.00% | 88.89% | +88.89% |
| F1 Score | 0.00% | 64.65% | +64.65% |
| Mean IoU (bbox) | 0.0000 | 0.5879 | +0.5879 |
Key Results:
- The base VRSBench model cannot predict methane plumes or bounding boxes (0% recall, 0 IoU)
- The Methane Expert model achieves 88.89% recall - excellent at detecting plumes
- Bounding box predictions have 0.5879 mean IoU (good localization)
- Precision is 50.79% - the model tends to over-predict plumes (217 false positives vs 31 true negatives)
- 113 out of 224 predicted bounding boxes have IoU > 0.5 (good localization)
Usage
With llama.cpp
# Download Q4_K_M quantized version (recommended)
wget https://huggingface.co/5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m/resolve/main/lfm2.5-vrsbench-methane-450m-q4_k_m.gguf
# Run inference
./llama-cli -m lfm2.5-vrsbench-methane-450m-q4_k_m.gguf \
--image satellite_methane_image.png \
-p "Is there a methane plume in this satellite image? If yes, provide the bounding box as [x1,y1,x2,y2] normalized to 0-1."
With Transformers
from transformers import AutoModelForVision2Seq, AutoProcessor
from PIL import Image
import json
model = AutoModelForVision2Seq.from_pretrained(
"5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m",
torch_dtype="auto",
device_map="auto"
)
processor = AutoProcessor.from_pretrained("5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m")
image = Image.open("satellite_methane_image.png")
prompt = "Is there a methane plume in this satellite image? If yes, provide the bounding box as [x1,y1,x2,y2] normalized to 0-1."
conversation = [
{"role": "user", "content": [
{"type": "image", "image": image},
{"type": "text", "text": prompt}
]}
]
text = processor.apply_chat_template(conversation, add_generation_prompt=True)
inputs = processor(text=text, images=image, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
pred_text = processor.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True)
print(json.loads(pred_text))
GGUF Quantizations
| Version | Size | Description |
|---|---|---|
| F16 | 679 MB | Full precision (16-bit) |
| Q8_0 | 362 MB | 8-bit quantization |
| Q4_K_M | 219 MB | 4-bit quantization (recommended for most use cases) |
Training Dataset: MethaneS2CM
The model was trained on the MethaneS2CM (Methane Sentinel-2 Community Model) dataset:
- Dataset: H1deaki/MethaneS2CM
- Paper: "MethaneS2CM: A Dataset for Multispectral Deep Methane Emission Detection" (Liu et al., 2025)
- Data: 257k+ samples from Sentinel-2 imagery (2016-2024)
- Annotations: Hand-annotated plume masks for bounding box extraction
- Bands used: False color composite (SWIR22→R, NIR08→G, Red→B)
- Task: Methane plume detection with bounding box regression
Model Sources
- Base Model: LiquidAI/LFM2.5-VL-450M
- VRSBench Model: 5ch4um1/lfm2.5-vrsbench-lora-450m
- Methane Expert Model: 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m
- MethaneS2CM Dataset: H1deaki/MethaneS2CM
Limitations
- Model trained on 32x32 Sentinel-2 patches - may not generalize to other resolutions
- Performance depends on quality of false color composite (SWIR22/NIR08/Red)
- Hand-annotated masks may contain annotation errors
- Best performance on methane plumes similar to training distribution
Training Environment
- Framework: Transformers + PEFT (LoRA) + leap-finetune
- Hardware: Local GPU (CUDA)
- Training Scripts: Available in the cookbook repository
- Downloads last month
- 59
Model tree for 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m
Base model
LiquidAI/LFM2.5-350M-Base
Install from brew
# Start a local OpenAI-compatible server with a web UI: llama-server -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m:# Run inference directly in the terminal: llama-cli -hf 5ch4um1/lfm2.5-vrsbench-MethaneS2CM-methane-lora-450m: