Image-Text-to-Text
Transformers
Safetensors
English
Chinese
qwen3_vl
vision-language
remote-sensing
visual-question-answering
geospatial
uhr-bat2
conversational
Eval Results (legacy)
Instructions to use FelixKAI/UHR-BAT2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FelixKAI/UHR-BAT2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="FelixKAI/UHR-BAT2") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("FelixKAI/UHR-BAT2") model = AutoModelForMultimodalLM.from_pretrained("FelixKAI/UHR-BAT2", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FelixKAI/UHR-BAT2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FelixKAI/UHR-BAT2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FelixKAI/UHR-BAT2", "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/FelixKAI/UHR-BAT2
- SGLang
How to use FelixKAI/UHR-BAT2 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 "FelixKAI/UHR-BAT2" \ --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": "FelixKAI/UHR-BAT2", "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 "FelixKAI/UHR-BAT2" \ --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": "FelixKAI/UHR-BAT2", "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 FelixKAI/UHR-BAT2 with Docker Model Runner:
docker model run hf.co/FelixKAI/UHR-BAT2
File size: 7,003 Bytes
94c9578 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | ---
license: apache-2.0
language:
- en
- zh
library_name: transformers
pipeline_tag: image-text-to-text
base_model: Qwen/Qwen3-VL-8B-Instruct
base_model_relation: finetune
tags:
- qwen3_vl
- vision-language
- remote-sensing
- visual-question-answering
- geospatial
- uhr-bat2
model-index:
- name: UHR-BAT2
results:
- task:
type: visual-question-answering
dataset:
type: RSHR-Bench
name: RSHR-Bench (all 1932 QA records)
metrics:
- type: accuracy
name: Accuracy (%)
value: 50.72463768115942
- task:
type: visual-question-answering
dataset:
type: XLRS-Bench-lite
name: XLRS-Bench-lite (strict option-set matching)
metrics:
- type: accuracy
name: Accuracy (%)
value: 52.27272727272727
- task:
type: visual-question-answering
dataset:
type: MME-RealWorld
name: MME-RealWorld (full Remote Sensing subset)
metrics:
- type: accuracy
name: Accuracy (%)
value: 56.79507758159444
---
# UHR-BAT2
[English](README.md) | [简体中文](README_zh.md)
[Hugging Face](https://huggingface.co/RL-MIND/UHR-BAT2) · [ModelScope](https://www.modelscope.cn/models/KAIWANG/UHR-BAT2) · [Evaluation details](EVALUATION.md)
**A Qwen3-VL-8B model fine-tuned for remote-sensing visual question answering.**
UHR-BAT2 is a full-weight fine-tune of [Qwen3-VL-8B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct), trained on a selected 10,000-example GeoLLaVA manifest. It keeps the native Qwen3-VL architecture and can be loaded with Transformers. The released checkpoint is `qwen3vl-8b-geollava-ft3-selected-10k`.
## Main results
These are complete, unpruned model evaluations, audited against existing prediction records on **2026-10-13**. The reported results use the corrected option-scoring protocol.
| Dataset | Accuracy | Correct / Total | Metric |
|---|---:|---:|---|
| **RSHR-Bench** | **50.72%** | 980 / 1,932 | All-QA option accuracy |
| **XLRS-Bench-lite** | **52.27%** | 1,610 / 3,080 | Strict option-set accuracy |
| **MME-RealWorld Remote Sensing** | **56.80%** | 2,123 / 3,738 | Full remote-sensing subset accuracy |
RSHR's single-turn subset is **45.66% (726/1,590)**. XLRS includes **52.45% (1,563/2,980)** on single-choice questions and **47.00% (47/100)** on multi-select tasks. MME uses the full 3,738-record remote-sensing subset, not its 150-record Lite subset.
The evaluated image budget is `min_pixels=784`, `max_pixels=1,310,720` per image. Images are resized within this budget. Single-choice evaluation uses FP32 candidate-option logits; XLRS multi-select evaluation uses constrained decoding and exact option-set matching. Ordinary free generation is not the same scoring procedure. See [EVALUATION.md](EVALUATION.md) and [evaluation_results.json](evaluation_results.json) for categories, denominators and protocol details.
## Model and training
| Item | Value |
|---|---|
| Base model | Qwen/Qwen3-VL-8B-Instruct |
| Architecture | Qwen3VLForConditionalGeneration |
| Training data | GeoLLaVA, selected 10K examples |
| Fine-tuning | Frozen vision encoder; train merger and LLM |
| Checkpoint format | Full BF16 safetensors, 4 shards |
| Training completion | 1 epoch, 625 optimizer steps |
| Launch configuration | Adafactor; learning rate 1e-5; global batch 16; maximum sequence length 8,192 |
| Release scope | Dense checkpoint and inference example |
The checkpoint's trainer state confirms one completed epoch and 625 steps. Other training settings above are recorded launcher defaults. This is the final training checkpoint; no validation-selected best checkpoint was recorded. The original [UHR-BAT](https://huggingface.co/RL-MIND/UHR-BAT) uses a different architecture; its custom compression modules and results are not part of this Qwen3-VL weight release.
## Quick start
Use Python 3.10 or later and a CUDA-enabled PyTorch installation. A single image can be processed with the standard Qwen3-VL implementation; custom remote code is not required. GPU memory requirements depend on image size and output length.
```bash
pip install -r requirements.txt
python inference.py --model RL-MIND/UHR-BAT2 \
--image /path/to/remote_sensing_image.jpg \
--question "Describe the land use and visible objects in this image."
```
```python
import torch
from PIL import Image
from transformers import AutoProcessor, Qwen3VLForConditionalGeneration
model_id = "RL-MIND/UHR-BAT2"
processor = AutoProcessor.from_pretrained(model_id)
model = Qwen3VLForConditionalGeneration.from_pretrained(
model_id, dtype="auto", device_map="auto", attn_implementation="sdpa"
).eval()
image = Image.open("remote_sensing_image.jpg").convert("RGB")
messages = [{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": "Describe this remote-sensing image."},
]}]
prompt = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
inputs = processor(text=[prompt], images=[image], return_tensors="pt")
inputs.pop("token_type_ids", None)
inputs = inputs.to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs, max_new_tokens=128, do_sample=False,
temperature=None, top_p=None, top_k=None, use_cache=True,
)
answer = output[:, inputs["input_ids"].shape[1]:]
print(processor.batch_decode(answer, skip_special_tokens=True)[0])
```
For ModelScope, download the same package and pass the local directory to the example above:
```bash
pip install modelscope
```
```python
from modelscope import snapshot_download
model_id = snapshot_download("KAIWANG/UHR-BAT2")
# Use model_id with AutoProcessor and Qwen3VLForConditionalGeneration above.
```
The example demonstrates image-conditioned generation. It does not reproduce the option-scoring evaluation table by itself.
The release passed a native loading and short image-generation smoke test with Python 3.11.0, PyTorch 2.5.1+cu121, Transformers 4.57.0.dev0 and Accelerate 1.13.0. The test checks package loading and generation, not benchmark accuracy or inference speed. File hashes and tensor metadata are in [release_manifest.json](release_manifest.json).
## Limitations
Counting and small-object localization remain challenging. These resized-input evaluations do not establish native full-resolution ultra-high-resolution performance. A matched evaluation of the unfine-tuned base model is not included, so this release makes no controlled fine-tuning improvement claim. A training-data audit found candidate scene-name/tile matches with RSHR; pixel-level and question-level overlap have not been resolved, so geographic-disjoint generalization is not established.
## License and acknowledgments
Released under [Apache-2.0](LICENSE), following the base model's license. See [NOTICE](NOTICE) for the upstream attribution and modifications. Training and benchmark datasets are not redistributed; their own terms apply. We acknowledge the Qwen team, GeoLLaVA contributors and the benchmark authors.
|