Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
decision-model
chain-of-thought
reasoning
calibration
lora
conversational
Instructions to use vinroger/OpenVerdict-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vinroger/OpenVerdict-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="vinroger/OpenVerdict-4B") 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("vinroger/OpenVerdict-4B") model = AutoModelForMultimodalLM.from_pretrained("vinroger/OpenVerdict-4B", 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 vinroger/OpenVerdict-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vinroger/OpenVerdict-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vinroger/OpenVerdict-4B", "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/vinroger/OpenVerdict-4B
- SGLang
How to use vinroger/OpenVerdict-4B 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 "vinroger/OpenVerdict-4B" \ --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": "vinroger/OpenVerdict-4B", "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 "vinroger/OpenVerdict-4B" \ --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": "vinroger/OpenVerdict-4B", "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 vinroger/OpenVerdict-4B with Docker Model Runner:
docker model run hf.co/vinroger/OpenVerdict-4B
Model card: correct / incorrect instead of right / wrong, matching the technical report; updated diagram
Browse files- README.md +4 -4
- assets/two_modes.png +2 -2
README.md
CHANGED
|
@@ -103,7 +103,7 @@ cot, probs = decide("Leda tells the truth. Shalonda says Leda lies. Shenna says
|
|
| 103 |
"Does Crista tell the truth?", ["No", "Yes"])
|
| 104 |
# cot = 'Leda=T. Shalonda=F. Shenna=F. Christie=T. Crista=T. Crista tells truth.\nAnswer: B.'
|
| 105 |
# probs = {'No': 0.14, 'Yes': 0.86}
|
| 106 |
-
# thinking=False gives {'No': 0.95, 'Yes': 0.05}, which is
|
| 107 |
```
|
| 108 |
|
| 109 |
The full input format (yes / no and rating-scale questions, images) is in the
|
|
@@ -118,7 +118,7 @@ the next-token probabilities of the option letters give the answer. In thinking
|
|
| 118 |
thinking or reaches the **thinking budget** of 80 tokens; an answer-extraction pass then scores the options in the same way. The budget
|
| 119 |
comes from a latency target of about half a second per answer. Finally, calibration of the thinking mode (temperature scaling for choice
|
| 120 |
questions, 4.55, and rating-scale questions, 4.35, and a cap of 0.86 on the top probability of yes / no questions) makes the
|
| 121 |
-
probabilities match how often the model is
|
| 122 |
|
| 123 |
## Results
|
| 124 |
|
|
@@ -156,7 +156,7 @@ formats). **Bold**: the best open model up to 9B parameters; Kev-27B and Jev are
|
|
| 156 |
¹ JevBench public served as our development set. ² The screenshot alone; with optional close-up crops of the marked elements the
|
| 157 |
thinking mode scores 82.5. ³ Jev 1.14.0 on this set (1.13.0 scored 85.7). ⁴ Yes / no questions use the default 0.5 threshold; on
|
| 158 |
ToxicChat this threshold decides the lead over Kev-27B and Jev, which rank the messages about as well as OpenVerdict does.
|
| 159 |
-
⁵ Imajev-4B declines RewardBench 2 questions with very long options; they count as
|
| 160 |
JevK5, Decision 4B) are in the technical report; none of them is ahead of OpenVerdict on any set.
|
| 161 |
|
| 162 |
The lead over the open models is clear (95% confidence interval above zero) on four sets: BIG-Bench Hard, the BBH + ProofWriter sample,
|
|
@@ -170,7 +170,7 @@ JevBench and the decision datasets. Both stay ahead on BIG-Bench Hard, where man
|
|
| 170 |
| --- | --- | ---: | ---: | --- |
|
| 171 |
| 1. Supervised fine-tuning | the decision format, direct answers only (LoRA rank 16) | 52,869 | 6,609 | 5e-5 |
|
| 172 |
| 2. Rejection-sampling fine-tuning, 2 rounds | train on the model's own shortest correct CoT (budget 64; LoRA widened to rank 32) | 5,353 / 7,413 | 670 / 927 | 2e-5 |
|
| 173 |
-
| 3. Reinforcement learning (RLOO), 2 rounds | reward for a
|
| 174 |
| Short final round on images | one epoch for two image tasks that were still weak (anomaly detection, GUI grounding); 46% of the questions with a CoT | 2,780 | 348 | 1e-5 |
|
| 175 |
| Calibration | temperature scaling for choice and rating questions and a cap for yes / no, fitted on a validation set (thinking mode) | 902 | – | – |
|
| 176 |
|
|
|
|
| 103 |
"Does Crista tell the truth?", ["No", "Yes"])
|
| 104 |
# cot = 'Leda=T. Shalonda=F. Shenna=F. Christie=T. Crista=T. Crista tells truth.\nAnswer: B.'
|
| 105 |
# probs = {'No': 0.14, 'Yes': 0.86}
|
| 106 |
+
# thinking=False gives {'No': 0.95, 'Yes': 0.05}, which is incorrect: the answer depends on four steps of reasoning.
|
| 107 |
```
|
| 108 |
|
| 109 |
The full input format (yes / no and rating-scale questions, images) is in the
|
|
|
|
| 118 |
thinking or reaches the **thinking budget** of 80 tokens; an answer-extraction pass then scores the options in the same way. The budget
|
| 119 |
comes from a latency target of about half a second per answer. Finally, calibration of the thinking mode (temperature scaling for choice
|
| 120 |
questions, 4.55, and rating-scale questions, 4.35, and a cap of 0.86 on the top probability of yes / no questions) makes the
|
| 121 |
+
probabilities match how often the model is correct, without changing any answer.
|
| 122 |
|
| 123 |
## Results
|
| 124 |
|
|
|
|
| 156 |
¹ JevBench public served as our development set. ² The screenshot alone; with optional close-up crops of the marked elements the
|
| 157 |
thinking mode scores 82.5. ³ Jev 1.14.0 on this set (1.13.0 scored 85.7). ⁴ Yes / no questions use the default 0.5 threshold; on
|
| 158 |
ToxicChat this threshold decides the lead over Kev-27B and Jev, which rank the messages about as well as OpenVerdict does.
|
| 159 |
+
⁵ Imajev-4B declines RewardBench 2 questions with very long options; they count as incorrect. The other open 4B models we tested (Kev-4B,
|
| 160 |
JevK5, Decision 4B) are in the technical report; none of them is ahead of OpenVerdict on any set.
|
| 161 |
|
| 162 |
The lead over the open models is clear (95% confidence interval above zero) on four sets: BIG-Bench Hard, the BBH + ProofWriter sample,
|
|
|
|
| 170 |
| --- | --- | ---: | ---: | --- |
|
| 171 |
| 1. Supervised fine-tuning | the decision format, direct answers only (LoRA rank 16) | 52,869 | 6,609 | 5e-5 |
|
| 172 |
| 2. Rejection-sampling fine-tuning, 2 rounds | train on the model's own shortest correct CoT (budget 64; LoRA widened to rank 32) | 5,353 / 7,413 | 670 / 927 | 2e-5 |
|
| 173 |
+
| 3. Reinforcement learning (RLOO), 2 rounds | reward for a correct answer; round 2 adds a 0.25 completion bonus for a CoT that finishes (budget 64, then 80) | 3,013 / 803 | 160 / 80 | 5e-6 |
|
| 174 |
| Short final round on images | one epoch for two image tasks that were still weak (anomaly detection, GUI grounding); 46% of the questions with a CoT | 2,780 | 348 | 1e-5 |
|
| 175 |
| Calibration | temperature scaling for choice and rating questions and a cap for yes / no, fitted on a validation set (thinking mode) | 902 | – | – |
|
| 176 |
|
assets/two_modes.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|