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
UHR-BAT2
Hugging Face · ModelScope · Evaluation details
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, 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 and 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 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.
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."
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:
pip install modelscope
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.
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, following the base model's license. See 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.
- Downloads last month
- 19
Model tree for FelixKAI/UHR-BAT2
Base model
Qwen/Qwen3-VL-8B-InstructEvaluation results
- Accuracy (%) on RSHR-Bench (all 1932 QA records)self-reported50.725
- Accuracy (%) on XLRS-Bench-lite (strict option-set matching)self-reported52.273
- Accuracy (%) on MME-RealWorld (full Remote Sensing subset)self-reported56.795