Instructions to use DriveFusion/DriveFusionQA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DriveFusion/DriveFusionQA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DriveFusion/DriveFusionQA") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("DriveFusion/DriveFusionQA") model = AutoModelForImageTextToText.from_pretrained("DriveFusion/DriveFusionQA") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DriveFusion/DriveFusionQA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DriveFusion/DriveFusionQA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DriveFusion/DriveFusionQA", "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/DriveFusion/DriveFusionQA
- SGLang
How to use DriveFusion/DriveFusionQA 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 "DriveFusion/DriveFusionQA" \ --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": "DriveFusion/DriveFusionQA", "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 "DriveFusion/DriveFusionQA" \ --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": "DriveFusion/DriveFusionQA", "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 DriveFusion/DriveFusionQA with Docker Model Runner:
docker model run hf.co/DriveFusion/DriveFusionQA
DriveFusionQA
DriveFusionQA
An Autonomous Driving Vision-Language Model for Scenario Understanding & Decision Reasoning.
๐ Model Description
DriveFusionQA is a specialized Vision-Language Model (VLM) fine-tuned to interpret complex driving scenes and explain vehicle decision-making. Built on the Qwen2.5-VL architecture, it bridges the gap between raw sensor data and human-understandable reasoning.
Unlike general-purpose models, DriveFusionQA is specifically optimized to answer the "why" behind driving maneuvers, making it an essential tool for safety analysis, simulation, and interactive driving support.
๐ GitHub Repository
Find the full implementation, training scripts, and preprocessing logic here:
- Main Model Code: DriveFusion/drivefusion
- Data Pipeline: DriveFusion/data-preprocessing
Core Capabilities
- Scenario Explanation: Identifies traffic participants, road signs, and environmental hazards.
- Decision Reasoning: Justifies driving actions (e.g., "Braking due to a pedestrian entering the crosswalk").
- Multi-Dataset Expertise: Leverages a unified pipeline of world-class driving benchmarks.
- Interactive Dialogue: Supports multi-turn conversations regarding road safety and navigation.
๐ Model Performance
DriveFusionQA demonstrates significant improvements over the base model across all key driving-related language metrics. The substantial increase in Lingo-Judge scores reflects its superior ability to generate human-aligned driving reasoning.
| Model | Lingo-Judge | METEOR | CIDEr | BLEU |
|---|---|---|---|---|
| DriveFusion QA | 53.2 | 0.3327 | 0.1602 | 0.0853 |
| Qwen2.5-VL Base | 38.1 | 0.2577 | 0.1024 | 0.0259 |
๐ Training & Data
The model was trained using the DriveFusion Data Preprocessing pipeline, which standardizes diverse autonomous driving datasets into a unified format.
Key Datasets Included:
- LingoQA: Action-focused scenery and decision components.
- DriveGPT4 + BDD-X: Human-like driving explanations and logic.
- DriveLM: Graph-based reasoning for autonomous driving.
๐ Quick Start
Ensure you have the latest transformers library installed to support the Qwen2.5-VL architecture.
Installation
pip install transformers accelerate pillow torch
Inference Example
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from PIL import Image
import torch
model_id = "DriveFusion/DriveFusionQA"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
model_id, torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
# Load driving scene
image = Image.open("driving_sample.jpg")
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": image},
{"type": "text", "text": "Describe the current driving scenario and any potential risks."},
],
}
]
# Generate Response
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], images=[image], return_tensors="pt").to("cuda")
output_ids = model.generate(**inputs, max_new_tokens=256)
response = processor.batch_decode(output_ids, skip_special_tokens=True)
print(response[0])
๐ Intended Use
- Safety Analysis: Generating natural language reports for dashcam footage and near-miss events.
- Training & Simulation: Providing ground-truth explanations for AI driver training.
- Interactive Assistants: Assisting human operators or passengers with scene descriptions.
โ ๏ธ Limitations
- Hallucination: Like all VLMs, it may occasionally misinterpret distant objects or complex social traffic cues.
- Geographical Bias: Performance may vary in regions or weather conditions not heavily represented in the training data.
- Non-Control: This model is for reasoning and explanation, not for direct vehicle control.
Citation
@misc{drivefusionqa2026,
title={DriveFusionQA: A Vision Language Language Model for Autonomous Driving},
author={Samir, Omar and DriveFusion Team},
year={2026},
url={https://huggingface.co/DriveFusion/DriveFusionQA}
}
- Downloads last month
- 63
Model tree for DriveFusion/DriveFusionQA
Base model
Qwen/Qwen2.5-VL-3B-Instruct