Instructions to use HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA") 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("HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA") model = AutoModelForMultimodalLM.from_pretrained("HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA", "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/HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA
- SGLang
How to use HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA 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 "HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA" \ --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": "HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA", "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 "HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA" \ --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": "HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA", "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 HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA with Docker Model Runner:
docker model run hf.co/HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA
Qwen3-VL-2B — nuScenes Driving QA + Counterfactual (LoRA, merged)
LoRA adaptation of Qwen3-VL-2B-Instruct for front-camera driving visual question answering on nuScenes, combining NuScenes-QA (perception: existence / count / status / position) and OmniDrive reasoning + counterfactual QA ("if you follow trajectory X, what happens?"). Vision encoder frozen; LoRA on the LLM + aligner, then merged into a standalone checkpoint. Trained on driving data only (no general-domain replay).
Results (front camera, greedy decoding, vs stock Qwen3-VL-2B)
| Task | Stock 2B | This model | Δ |
|---|---|---|---|
| NuScenes-QA (exact-match, n=2000) | 27.55% | 52.10% | +24.5 |
| Counterfactual (reason-hit) | 50.3% | 58.7% | +8.4 |
General-ability retention: MMStar 43.2→44.8, AI2D 72.2→73.2, ScienceQA 74.4→80.0, ChartQA 80.4→76.8, RealWorldQA 68.2→63.2 (largely preserved; several improve).
Usage
from transformers import AutoModelForImageTextToText, AutoProcessor
m = AutoModelForImageTextToText.from_pretrained("HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA", torch_dtype="auto", device_map="auto")
p = AutoProcessor.from_pretrained("HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA")
Training: Qwen3-VL-2B-Instruct · ViT frozen · LoRA r64/α128 (all-linear) · bf16 · 3×A100 · ms-swift · 50k samples (NuScenes-QA 28k + OmniDrive 22k) · 2 epochs. Non-commercial research use (nuScenes / OmniDrive terms).
- Downloads last month
- 20
Model tree for HqH1111/Qwen3-VL-2B-NuScenes-DrivingQA
Base model
Qwen/Qwen3-VL-2B-Instruct