Instructions to use Luigi/edge-fall-vlm-2.2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Luigi/edge-fall-vlm-2.2b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Luigi/edge-fall-vlm-2.2b") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Luigi/edge-fall-vlm-2.2b") model = AutoModelForMultimodalLM.from_pretrained("Luigi/edge-fall-vlm-2.2b", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use Luigi/edge-fall-vlm-2.2b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Luigi/edge-fall-vlm-2.2b", filename="mmproj-f16.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Luigi/edge-fall-vlm-2.2b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/edge-fall-vlm-2.2b:F16 # Run inference directly in the terminal: llama cli -hf Luigi/edge-fall-vlm-2.2b:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Luigi/edge-fall-vlm-2.2b:F16 # Run inference directly in the terminal: llama cli -hf Luigi/edge-fall-vlm-2.2b:F16
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 Luigi/edge-fall-vlm-2.2b:F16 # Run inference directly in the terminal: ./llama-cli -hf Luigi/edge-fall-vlm-2.2b:F16
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 Luigi/edge-fall-vlm-2.2b:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Luigi/edge-fall-vlm-2.2b:F16
Use Docker
docker model run hf.co/Luigi/edge-fall-vlm-2.2b:F16
- LM Studio
- Jan
- vLLM
How to use Luigi/edge-fall-vlm-2.2b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Luigi/edge-fall-vlm-2.2b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Luigi/edge-fall-vlm-2.2b", "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/Luigi/edge-fall-vlm-2.2b:F16
- SGLang
How to use Luigi/edge-fall-vlm-2.2b 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 "Luigi/edge-fall-vlm-2.2b" \ --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": "Luigi/edge-fall-vlm-2.2b", "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 "Luigi/edge-fall-vlm-2.2b" \ --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": "Luigi/edge-fall-vlm-2.2b", "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" } } ] } ] }' - Ollama
How to use Luigi/edge-fall-vlm-2.2b with Ollama:
ollama run hf.co/Luigi/edge-fall-vlm-2.2b:F16
- Unsloth Studio
How to use Luigi/edge-fall-vlm-2.2b 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 Luigi/edge-fall-vlm-2.2b 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 Luigi/edge-fall-vlm-2.2b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Luigi/edge-fall-vlm-2.2b to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Luigi/edge-fall-vlm-2.2b with Docker Model Runner:
docker model run hf.co/Luigi/edge-fall-vlm-2.2b:F16
- Lemonade
How to use Luigi/edge-fall-vlm-2.2b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Luigi/edge-fall-vlm-2.2b:F16
Run and chat with the model
lemonade run user.edge-fall-vlm-2.2b-F16
List all available models
lemonade list
edge-fall-vlm-2.2b โ single-stage VLM for fall / danger detection
A fine-tune of SmolVLM2-2.2B-Instruct that detects human falls, being down, and distress from a short strip of consecutive video frames, designed to run on a Raspberry Pi 5 (4 GB) at Q6_K GGUF. Trained almost entirely on synthetic 3D renders plus a small real-negative set.
Code & full write-up: https://github.com/vieenrose/edge-fall-vlm
What it does
Input: a few consecutive frames (oldestโnewest). Output: JSON, e.g.
{"posture":"horizontal-on-floor","status":"down","confidence":0.9,"person_down":true,"n_people":1}
where status โ {down, distress, normal} (3-class down3 scheme).
Results
| Test | Metric |
|---|---|
| In-the-wild falls (OOPS) | 0.83 recall โ vs VideoMAE 0.21, frozen-I3D 0.68 baselines |
| Real overhead falls (URFD held-out) | 0.90 recall / 1.0 specificity |
| Synthetic-only โ real transfer | 0.95 recall before any real data |
| On-device | Q6_K GGUF โ 2.2 GB, ~1.8 GB RAM, ~4โ6 s/inference projected on RPi5 |
Files
model.safetensors+ config/processor โ transformers (bf16).- GGUF for llama.cpp / edge:
model-Q6_K.gguf(recommended, fits RPi5 4 GB) andmodel-Q8_0.gguf, plusmmproj-f16.gguf(vision projector). Note: Q4 breaks this fine-tune โ use Q6_K or higher.
Usage (transformers)
from transformers import AutoModelForImageTextToText, AutoProcessor
import torch
proc = AutoProcessor.from_pretrained("Luigi/edge-fall-vlm-2.2b", do_image_splitting=False,
size={"longest_edge": 384})
model = AutoModelForImageTextToText.from_pretrained("Luigi/edge-fall-vlm-2.2b",
dtype=torch.bfloat16).to("cuda").eval()
prompt = ("You are a safety monitor. These are consecutive video frames (oldest first), "
"possibly with more than one person. Report whether ANYONE has fallen, fainted, "
"is lying immobile, or is in distress; else normal. Answer with JSON only.")
frames = [...] # list of PIL images, ~6 frames spanning ~3.5s
msgs = [{"role":"user","content":[{"type":"image"} for _ in frames]+[{"type":"text","text":prompt}]}]
text = proc.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
batch = proc(text=[text], images=[frames], return_tensors="pt").to("cuda")
print(proc.batch_decode(model.generate(**batch, max_new_tokens=64, do_sample=False)[:, batch["input_ids"].shape[1]:], skip_special_tokens=True)[0])
Usage (llama.cpp, edge)
llama-mtmd-cli -m model-Q6_K.gguf --mmproj mmproj-f16.gguf \
--image f0.png --image f1.png ... -t 4 -n 64 --temp 0 -p "<prompt above>"
Training data & recipe
- Synthetic: 3D humans (Blender skin-mesh mannequin) rendered from many viewpoints and lens models incl. native fisheye, with exact labels; hard-negative normals (crouch/sit/kneel/bend). Camera pose is a free parameter โ perspective robustness.
- Real negatives: a small set of real clips (UR Fall Detection, research-use) added to fix specificity โ synthetic falls transfer, but synthetic "normal" does not.
Limitations (read before use)
- Research prototype, NOT a medical or safety-certified device. Do not rely on it for actual safety monitoring without a verification layer and real-site validation.
- Validated on small test sets (40โ300 clips). Cross-view generalization on real data is partial (0.55 on an untrained frontal view vs 0.90 overhead).
- Raw specificity is far below the commercial false-alarm bar โ needs the verification stack (motion gate โ temporal confirm โ persistence timer โ human review) in the repo.
- Trained on synthetic + young-actor real falls; not validated on elderly falls.
License
Apache-2.0 (inherits SmolVLM2). Evaluation datasets (URFD, OmniFall/OOPS) are not redistributed; see their sources for terms.
- Downloads last month
- 102
Model tree for Luigi/edge-fall-vlm-2.2b
Base model
HuggingFaceTB/SmolLM2-1.7B