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)# pip install -U transformers accelerate # 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=256) 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
Rename release to Nicesse-RARA-3B and refresh integrated model card
Browse files- MERGE_MANIFEST.json +0 -6
- NOTICE +3 -2
- README.md +52 -51
- RELEASE_MANIFEST.json +9 -0
MERGE_MANIFEST.json
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"base_model": "Qwen/Qwen2.5-VL-3B-Instruct",
|
| 3 |
-
"adapter_sha256": "0ab67e21378a358dbd9acc9bdb11dc981db18c54d74b37b773d2c47c19d3d91c",
|
| 4 |
-
"merge": "PEFT merge_and_unload(safe_merge=True)",
|
| 5 |
-
"serialization": "safetensors, max_shard_size=4GB"
|
| 6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTICE
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
| 1 |
+
Nicesse-RARA-3B is improved using Qwen.
|
| 2 |
|
| 3 |
+
This complete model checkpoint is distributed under the Qwen Research License Agreement included in this repository.
|
| 4 |
+
Please review and follow all license terms before use or redistribution.
|
README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: Qwen/Qwen2.5-VL-3B-Instruct
|
| 3 |
library_name: transformers
|
| 4 |
pipeline_tag: image-text-to-text
|
| 5 |
license: other
|
|
@@ -7,72 +6,74 @@ tags:
|
|
| 7 |
- chart-vqa
|
| 8 |
- visual-question-answering
|
| 9 |
- qwen2.5-vl
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
## Intended use
|
| 21 |
-
|
| 22 |
-
Plot-RARA-3B is intended for research on chart visual question answering, including numerical lookup, comparison, arithmetic, and concise answer generation from chart images. It is not intended for safety-critical or high-stakes decision making.
|
| 23 |
-
|
| 24 |
-
## Model details
|
| 25 |
|
| 26 |
| Item | Value |
|
| 27 |
|---|---|
|
| 28 |
-
|
|
| 29 |
-
|
|
| 30 |
-
|
|
| 31 |
-
|
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
|
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
| 43 |
-
|--
|
| 44 |
-
|
|
| 45 |
-
|
|
| 46 |
-
|
|
| 47 |
-
|
|
| 48 |
-
| Qwen2.5-VL-
|
| 49 |
-
| Qwen2.5-VL-
|
| 50 |
-
|
|
| 51 |
-
|
|
| 52 |
-
|
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
## Loading the model
|
| 59 |
|
| 60 |
```python
|
| 61 |
-
from transformers import
|
| 62 |
|
| 63 |
-
model_id = "Junlaii/
|
| 64 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 65 |
model_id, torch_dtype="auto", device_map="auto"
|
| 66 |
)
|
| 67 |
processor = AutoProcessor.from_pretrained(model_id)
|
| 68 |
-
```
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
-
## Limitations
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
## License and
|
| 77 |
|
| 78 |
-
This model is distributed under the included **Qwen Research License Agreement**
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
pipeline_tag: image-text-to-text
|
| 4 |
license: other
|
|
|
|
| 6 |
- chart-vqa
|
| 7 |
- visual-question-answering
|
| 8 |
- qwen2.5-vl
|
| 9 |
+
- multimodal
|
| 10 |
+
- numerical-reasoning
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Nicesse-RARA-3B
|
| 14 |
|
| 15 |
+
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`.
|
| 16 |
|
| 17 |
+
## Model Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
| Item | Value |
|
| 20 |
|---|---|
|
| 21 |
+
| Model family | Qwen2.5-VL-3B |
|
| 22 |
+
| Parameter scale | 3B |
|
| 23 |
+
| Architecture | Vision-language generation model |
|
| 24 |
+
| Training objective | Challenge-aware sampling with answer-restricted supervision |
|
| 25 |
+
| Primary use | Chart visual question answering and numerical reasoning |
|
| 26 |
+
| Inputs | Chart image and natural-language question |
|
| 27 |
+
| Outputs | Short free-form answer |
|
| 28 |
+
|
| 29 |
+
## Benchmark Results
|
| 30 |
+
|
| 31 |
+
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.
|
| 32 |
+
|
| 33 |
+
| Method | ChartQA | PlotQA | EvoChart | ChartQAPro | Average |
|
| 34 |
+
|---|---:|---:|---:|---:|---:|
|
| 35 |
+
| Qwen2.5-VL-3B (direct prompting) | 82.00 | 80.50 | 48.72 | 25.70 | 59.23 |
|
| 36 |
+
| Qwen2.5-VL-3B (CoT) | 73.12 | 52.72 | 29.60 | 15.80 | 42.81 |
|
| 37 |
+
| ChartGemma | 76.44 | 33.28 | 36.96 | 10.93 | 39.40 |
|
| 38 |
+
| SketchVL-3B | 77.20 | 48.32 | 47.28 | 44.15 | 54.24 |
|
| 39 |
+
| Qwen2.5-VL-3B SFT | 83.08 | 74.18 | 46.08 | 23.56 | 56.73 |
|
| 40 |
+
| Qwen2.5-VL-3B DPO | 75.42 | 53.86 | 34.80 | 15.95 | 45.01 |
|
| 41 |
+
| Qwen2.5-VL-3B (A+F+L) | 76.72 | 56.22 | 38.88 | 17.55 | 47.34 |
|
| 42 |
+
| Qwen2.5-VL-3B (A+F+L+Tasks) | 81.80 | 76.24 | 51.68 | 27.66 | 59.35 |
|
| 43 |
+
| Chart-RVR-3B | **84.56** | 78.68 | 53.36 | 28.38 | 61.25 |
|
| 44 |
+
| Chart-RVR-3B-Hard | **85.76** | 77.90 | 54.24 | 28.64 | 61.64 |
|
| 45 |
+
| **Qwen2.5-VL + Nicesse-RARA-3B** | 83.76 | **89.42** | **54.32** | **37.94** | **66.36** |
|
| 46 |
+
|
| 47 |
+
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.
|
| 48 |
+
|
| 49 |
+
## Quick Start
|
|
|
|
|
|
|
| 50 |
|
| 51 |
```python
|
| 52 |
+
from transformers import AutoProcessor, Qwen2_5_VLForConditionalGeneration
|
| 53 |
|
| 54 |
+
model_id = "Junlaii/Nicesse-RARA-3B"
|
| 55 |
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 56 |
model_id, torch_dtype="auto", device_map="auto"
|
| 57 |
)
|
| 58 |
processor = AutoProcessor.from_pretrained(model_id)
|
|
|
|
| 59 |
|
| 60 |
+
messages = [{
|
| 61 |
+
"role": "user",
|
| 62 |
+
"content": [
|
| 63 |
+
{"type": "image", "image": "path/to/chart.png"},
|
| 64 |
+
{"type": "text", "text": "What is the value of the blue bar in 2010?"},
|
| 65 |
+
],
|
| 66 |
+
}]
|
| 67 |
+
prompt = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 68 |
+
inputs = processor(text=[prompt], images=["path/to/chart.png"], return_tensors="pt").to(model.device)
|
| 69 |
+
generated_ids = model.generate(**inputs, max_new_tokens=768)
|
| 70 |
+
print(processor.batch_decode(generated_ids, skip_special_tokens=True)[0])
|
| 71 |
+
```
|
| 72 |
|
| 73 |
+
## Intended Use and Limitations
|
| 74 |
|
| 75 |
+
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.
|
| 76 |
|
| 77 |
+
## License and Attribution
|
| 78 |
|
| 79 |
+
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.
|
RELEASE_MANIFEST.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_name": "Nicesse-RARA-3B",
|
| 3 |
+
"model_family": "Qwen2.5-VL-3B",
|
| 4 |
+
"parameter_scale": "3B",
|
| 5 |
+
"release_format": "complete model checkpoint",
|
| 6 |
+
"serialization": "safetensors",
|
| 7 |
+
"weight_shards": 2,
|
| 8 |
+
"includes_processor_configuration": true
|
| 9 |
+
}
|