Image-Text-to-Text
Transformers
Safetensors
qwen2_5_vl
chart-vqa
visual-question-answering
qwen2.5-vl
multimodal
numerical-reasoning
conversational
text-generation-inference
Instructions to use Junlaii/Nicesse-RARA-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Junlaii/Nicesse-RARA-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Junlaii/Nicesse-RARA-3B") 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("Junlaii/Nicesse-RARA-3B") model = AutoModelForMultimodalLM.from_pretrained("Junlaii/Nicesse-RARA-3B", 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 Junlaii/Nicesse-RARA-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Junlaii/Nicesse-RARA-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Junlaii/Nicesse-RARA-3B", "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/Junlaii/Nicesse-RARA-3B
- SGLang
How to use Junlaii/Nicesse-RARA-3B 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 "Junlaii/Nicesse-RARA-3B" \ --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": "Junlaii/Nicesse-RARA-3B", "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 "Junlaii/Nicesse-RARA-3B" \ --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": "Junlaii/Nicesse-RARA-3B", "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 Junlaii/Nicesse-RARA-3B with Docker Model Runner:
docker model run hf.co/Junlaii/Nicesse-RARA-3B
File size: 3,840 Bytes
7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 7fddcf6 176f2a6 | 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 | ---
library_name: transformers
pipeline_tag: image-text-to-text
license: other
tags:
- chart-vqa
- visual-question-answering
- qwen2.5-vl
- multimodal
- numerical-reasoning
---
# Nicesse-RARA-3B
Nicesse-RARA-3B is a complete 3B chart visual question answering model in the Qwen2.5-VL family. It is trained with **Reweighted Answer-Restricted Adaptation (RARA)**, which combines challenge-aware example exposure with answer-focused supervision for numerical and comparative chart reasoning. The repository contains the complete model checkpoint and the matching processor configuration for direct use with `transformers`.
## Model Details
| Item | Value |
|---|---|
| Model family | Qwen2.5-VL-3B |
| Parameter scale | 3B |
| Architecture | Vision-language generation model |
| Training objective | Challenge-aware sampling with answer-restricted supervision |
| Primary use | Chart visual question answering and numerical reasoning |
| Inputs | Chart image and natural-language question |
| Outputs | Short free-form answer |
## Benchmark Results
The table reports publicly available results on four chart VQA benchmarks. Scores are dataset-level accuracy in percent; higher is better. ChartQAPro additionally has a strict-audit score of 22.28.
| Method | ChartQA | PlotQA | EvoChart | ChartQAPro | Average |
|---|---:|---:|---:|---:|---:|
| Qwen2.5-VL-3B (direct prompting) | 82.00 | 80.50 | 48.72 | 25.70 | 59.23 |
| Qwen2.5-VL-3B (CoT) | 73.12 | 52.72 | 29.60 | 15.80 | 42.81 |
| ChartGemma | 76.44 | 33.28 | 36.96 | 10.93 | 39.40 |
| SketchVL-3B | 77.20 | 48.32 | 47.28 | 44.15 | 54.24 |
| Qwen2.5-VL-3B SFT | 83.08 | 74.18 | 46.08 | 23.56 | 56.73 |
| Qwen2.5-VL-3B DPO | 75.42 | 53.86 | 34.80 | 15.95 | 45.01 |
| Qwen2.5-VL-3B (A+F+L) | 76.72 | 56.22 | 38.88 | 17.55 | 47.34 |
| Qwen2.5-VL-3B (A+F+L+Tasks) | 81.80 | 76.24 | 51.68 | 27.66 | 59.35 |
| Chart-RVR-3B | **84.56** | 78.68 | 53.36 | 28.38 | 61.25 |
| Chart-RVR-3B-Hard | **85.76** | 77.90 | 54.24 | 28.64 | 61.64 |
| **Qwen2.5-VL + Nicesse-RARA-3B** | 83.76 | **89.42** | **54.32** | **37.94** | **66.36** |
The Nicesse-RARA-3B configuration was selected using a frozen development split. It was then evaluated once on four frozen benchmark manifests. The result is strongest on PlotQA among the listed comparable public 3B models; its ChartQAPro result follows the published-code-compatible evaluation protocol.
## Quick Start
```python
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
model_id = "Junlaii/Nicesse-RARA-3B"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
model_id, torch_dtype="auto", device_map="auto"
)
processor = AutoProcessor.from_pretrained(model_id)
messages = [{
"role": "user",
"content": [
{"type": "image", "image": "path/to/chart.png"},
{"type": "text", "text": "What is the value of the blue bar in 2010?"},
],
}]
prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[prompt], images=["path/to/chart.png"], return_tensors="pt").to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=768)
print(processor.batch_decode(generated_ids, skip_special_tokens=True)[0])
```
## Intended Use and Limitations
Nicesse-RARA-3B is intended for research on chart understanding, visual question answering, and numerical reasoning. It can make visual-reading, arithmetic, formatting, and ambiguous-question errors. Benchmark results do not establish reliability for high-stakes decisions; validate outputs independently in any downstream deployment.
## License and Attribution
This model is distributed under the included **Qwen Research License Agreement**. It is improved using Qwen. Please follow the license terms and cite the relevant Qwen2.5-VL and RARA work when appropriate.
|