Instructions to use johnny711/argus-lfm-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use johnny711/argus-lfm-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="johnny711/argus-lfm-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)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("johnny711/argus-lfm-lora", dtype="auto") - PEFT
How to use johnny711/argus-lfm-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use johnny711/argus-lfm-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "johnny711/argus-lfm-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": "johnny711/argus-lfm-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/johnny711/argus-lfm-lora
- SGLang
How to use johnny711/argus-lfm-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 "johnny711/argus-lfm-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": "johnny711/argus-lfm-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 "johnny711/argus-lfm-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": "johnny711/argus-lfm-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" } } ] } ] }' - Unsloth Studio new
How to use johnny711/argus-lfm-lora 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 johnny711/argus-lfm-lora 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 johnny711/argus-lfm-lora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for johnny711/argus-lfm-lora to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="johnny711/argus-lfm-lora", max_seq_length=2048, ) - Docker Model Runner
How to use johnny711/argus-lfm-lora with Docker Model Runner:
docker model run hf.co/johnny711/argus-lfm-lora
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("johnny711/argus-lfm-lora", dtype="auto")Project ARGUS — LFM2.5-VL Military Satellite Detection Adapter
Autonomous Reconnaissance & Ground Understanding System Hackathon: Liquid AI x DPhi Space "AI in Space"
Overview
This is a LoRA adapter fine-tuned on top of LiquidAI/LFM2.5-VL-450M for military object detection in satellite imagery. It enables the base VLM to output structured JSON tactical reports directly from overhead reconnaissance images — replacing traditional multi-stage YOLO detection pipelines with a single unified inference pass.
Key Capabilities
| Capability | Description |
|---|---|
| Military Vehicle Detection | Tanks, APCs, trucks, artillery, civilian vehicles |
| Aerial Asset Detection | Aircraft, helicopters, UAVs at airfields |
| Naval Detection | Ships, submarines, harbor installations |
| Infrastructure Analysis | Bridges, storage tanks, port cranes, helipads |
| Threat Assessment | LOW / MEDIUM / HIGH classification per target |
| Tactical Reasoning | Natural language assessment for each detection |
Training Details
- Base Model: LiquidAI/LFM2.5-VL-450M
- Method: QLoRA (4-bit) via Unsloth
- LoRA Config: r=16, alpha=32, all linear layers
- Trainable Parameters: 1,376,256 / 450,095,104 (0.31%)
- Training Data: 3,512 samples (MVRSD military vehicles + DOTA aerial objects)
- Epochs: 3 (1,317 steps)
- Final Loss: 0.4017
- Hardware: NVIDIA T4 GPU
- Training Time: ~60 minutes
Datasets
| Dataset | Samples | Source |
|---|---|---|
| MVRSD | 12 (demo) | Military Vehicle Remote Sensing Dataset |
| DOTA | 3,500 | Large-scale aerial object detection |
Usage
With PEFT (recommended)
from transformers import AutoProcessor, AutoModelForImageTextToText
from peft import PeftModel
from PIL import Image
# Load base + adapter
base = AutoModelForImageTextToText.from_pretrained(
"LiquidAI/LFM2.5-VL-450M",
device_map="auto",
torch_dtype="auto",
)
model = PeftModel.from_pretrained(base, "johnny711/argus-lfm-lora")
model = model.merge_and_unload() # merge for faster inference
processor = AutoProcessor.from_pretrained("LiquidAI/LFM2.5-VL-450M")
# Run detection
image = Image.open("satellite_image.jpg")
prompt = """You are an orbital intelligence analyst examining satellite imagery \
from a defense reconnaissance satellite at ~800 km altitude.
Detect ALL military-relevant objects visible in this image. For each object, provide:
- "label": specific type of object
- "bbox": normalized bounding box [x1, y1, x2, y2] in [0,1]
- "threat_level": "LOW", "MEDIUM", or "HIGH"
- "confidence": 0.0 to 1.0
- "reasoning": brief tactical assessment
Return a JSON array. If no targets visible, return: []"""
messages = [{"role": "user", "content": [
{"type": "image", "image": image},
{"type": "text", "text": prompt},
]}]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True,
return_tensors="pt", return_dict=True, tokenize=True,
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1)
new_tokens = outputs[:, inputs["input_ids"].shape[1]:]
result = processor.batch_decode(new_tokens, skip_special_tokens=True)[0]
print(result)
Example Output
[
{
"label": "Small Military Vehicle",
"bbox": [0.0, 0.3438, 0.0645, 0.0664],
"threat_level": "LOW",
"confidence": 0.85,
"reasoning": "Small Military Vehicle detected near tree cover, likely concealed staging area"
},
{
"label": "Naval Vessel",
"bbox": [0.0547, 0.5625, 0.0664, 0.0527],
"threat_level": "HIGH",
"confidence": 0.82,
"reasoning": "Naval Vessel visible in desert terrain, limited concealment"
}
]
Project ARGUS Architecture
Satellite Image (GigaPixel)
|
[Phase 1] LFM2.5-VL + LoRA --> JSON detections (this model)
|
[Phase 2] Depth Anything 3 --> 3D reality check (decoy filtering)
|
[Phase 3] Report Assembly --> Tactical JSON downlink (bytes, not GB)
The Problem: Military satellites capture massive images but have limited downlink bandwidth. Sending gigabytes of raw imagery to ground stations wastes hours.
Our Solution: Run AI at the edge (in orbit). This adapter enables a 450M-parameter VLM to perform unified detection, classification, and tactical reasoning in a single inference pass — producing a tiny JSON report instead of raw imagery.
Developed by
- johnny711 — GitHub
- Hackathon: Liquid AI x DPhi Space "AI in Space"
License
Apache 2.0
This lfm2_vl model was trained 2x faster with Unsloth
Model tree for johnny711/argus-lfm-lora
Base model
LiquidAI/LFM2.5-350M-Base
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="johnny711/argus-lfm-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)