Update README.md
Browse files
README.md
CHANGED
|
@@ -1,197 +1,116 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 9 |
|
| 10 |
-
[Flex-Judge
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
|
| 14 |
-
### Model Description
|
| 15 |
-
|
| 16 |
-
<!-- Provide a longer summary of what this model is. -->
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
- **
|
| 21 |
-
-
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
|
| 28 |
-
### Model Sources
|
| 29 |
|
| 30 |
<!-- Provide the basic links for the model. -->
|
| 31 |
-
|
| 32 |
-
- **
|
| 33 |
-
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
|
|
|
| 39 |
|
| 40 |
-
###
|
| 41 |
|
| 42 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 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 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
- **Hardware Type:** [More Information Needed]
|
| 146 |
-
- **Hours used:** [More Information Needed]
|
| 147 |
-
- **Cloud Provider:** [More Information Needed]
|
| 148 |
-
- **Compute Region:** [More Information Needed]
|
| 149 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 150 |
-
|
| 151 |
-
## Technical Specifications [optional]
|
| 152 |
-
|
| 153 |
-
### Model Architecture and Objective
|
| 154 |
-
|
| 155 |
-
[More Information Needed]
|
| 156 |
-
|
| 157 |
-
### Compute Infrastructure
|
| 158 |
-
|
| 159 |
-
[More Information Needed]
|
| 160 |
-
|
| 161 |
-
#### Hardware
|
| 162 |
-
|
| 163 |
-
[More Information Needed]
|
| 164 |
-
|
| 165 |
-
#### Software
|
| 166 |
-
|
| 167 |
-
[More Information Needed]
|
| 168 |
-
|
| 169 |
-
## Citation [optional]
|
| 170 |
|
| 171 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 172 |
|
| 173 |
**BibTeX:**
|
| 174 |
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 184 |
-
|
| 185 |
-
[More Information Needed]
|
| 186 |
-
|
| 187 |
-
## More Information [optional]
|
| 188 |
-
|
| 189 |
-
[More Information Needed]
|
| 190 |
-
|
| 191 |
-
## Model Card Authors [optional]
|
| 192 |
-
|
| 193 |
-
[More Information Needed]
|
| 194 |
-
|
| 195 |
-
## Model Card Contact
|
| 196 |
-
|
| 197 |
-
[More Information Needed]
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
base_model:
|
| 4 |
+
- Qwen/Qwen2.5-Omni-7B
|
| 5 |
---
|
| 6 |
|
| 7 |
# Model Card for Model ID
|
| 8 |
|
| 9 |
<!-- Provide a quick summary of what the model is/does. -->
|
| 10 |
|
| 11 |
+
[Flex-Judge: Text-Only Reasoning Unleashes Zero-Shot Multimodal Evaluators
|
| 12 |
+
](https://arxiv.org/abs/2505.18601)
|
| 13 |
|
| 14 |
+
**Flex‑Omni‑7B** is an 11B-parameter multimodal evaluator capable of handling not only vision-language tasks but also audio-based evaluations—something traditional VL models cannot do. It inherits the reasoning-by-text paradigm from Flex‑Judge, enabling strong performance across modalities, and even outperforms models like Gemini‑2.0‑Flash on audio benchmarks such as MOS and speech scoring. Unlike vision-language models, Flex‑Omni‑7B unifies vision, language, and audio reasoning within a single framework.
|
| 15 |
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
+
### Model Description
|
| 18 |
|
| 19 |
+
- We propose **Flex-Judge**, a reasoning-guided multimodal evaluator that leverages minimal textual reasoning data to robustly generalize across multiple modalities and evaluation formats.
|
| 20 |
+
- Our framework highlights reasoning-based text supervision as a powerful, cost-effective alternative to traditional annotation-intensive approaches, substantially advancing scalable, multimodal model-as-a-judge.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
### Model Sources
|
| 23 |
|
| 24 |
<!-- Provide the basic links for the model. -->
|
| 25 |
+
- **Repository:** https://github.com/jongwooko/flex-judge
|
| 26 |
+
- **Paper:** [Flex-Judge: Text-Only Reasoning Unleashes Zero-Shot Multimodal Evaluators
|
| 27 |
+
](https://arxiv.org/abs/2505.18601)
|
|
|
|
| 28 |
|
| 29 |
## Uses
|
| 30 |
|
| 31 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 32 |
+
For more comprehensive usage examples and implementation details, please refer to our official repository.
|
| 33 |
|
| 34 |
+
### Requirements
|
| 35 |
|
| 36 |
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 37 |
|
| 38 |
+
```
|
| 39 |
+
pip install git+https://github.com/huggingface/[email protected]
|
| 40 |
+
pip accelerate
|
| 41 |
+
pip install qwen-omni-utils[decord] -U
|
| 42 |
+
pip install vllm
|
| 43 |
+
pip install datasets
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
### Using vLLM
|
| 47 |
+
|
| 48 |
+
Here, we recommend using `vllm` instead of `transformers` to improve inference speed. The results in our papers are based on the `vllm` library.
|
| 49 |
+
|
| 50 |
+
```
|
| 51 |
+
from datasets import load_dataset
|
| 52 |
+
from vllm import LLM, SamplingParams
|
| 53 |
+
|
| 54 |
+
# default: Load the model on the available device(s)
|
| 55 |
+
llm = LLM(
|
| 56 |
+
"jongwooko/Flex-Omni-7B",
|
| 57 |
+
tensor_parallel_size=4,
|
| 58 |
+
limit_mm_per_prompt={"image": 1}, # The maximum number to accept
|
| 59 |
+
)
|
| 60 |
+
sampling_params = SamplingParams(
|
| 61 |
+
max_tokens=4096,
|
| 62 |
+
temperature=0.2,
|
| 63 |
+
top_p=0.95,
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
# Example
|
| 67 |
+
example = load_dataset('MMInstruction/VL-RewardBench', split='test')[0]
|
| 68 |
+
question, image = example["query"], example["image"]
|
| 69 |
+
answer1, answer2 = example["response"]
|
| 70 |
+
|
| 71 |
+
# System prompt for Flex-Judge
|
| 72 |
+
SYSTEM_PROMPT = (
|
| 73 |
+
"You are a helpful assistant. The assistant first performs a detailed, "
|
| 74 |
+
"step-by-step reasoning process in its mind and then provides the user with"
|
| 75 |
+
"the answer. The reasoning process and answer are enclosed within <think> "
|
| 76 |
+
"reasoning process here, explaining each step of your evaluation for both "
|
| 77 |
+
"assistants </think><answer> answer here </answer>. Now the user asks you "
|
| 78 |
+
"to judge the performance of two AI assistants in response to the question. "
|
| 79 |
+
"Score assistants 1-10 (higher=better). Criteria includes helpfulness, "
|
| 80 |
+
"relevance, accuracy, and level of detail. Avoid order, length, style or "
|
| 81 |
+
"other bias. After thinking, when you finally reach a conclusion, clearly "
|
| 82 |
+
"provide your evaluation scores within <answer> </answer> tags, i.e., for "
|
| 83 |
+
"example, <answer>3</answer><answer>5</answer>"
|
| 84 |
+
)
|
| 85 |
+
|
| 86 |
+
instruction = (
|
| 87 |
+
f"<|vision_start|><|IMAGE|><|vision_end|>\n\n[Question]\n{question}\n\n"
|
| 88 |
+
"[Assistant 1's Answer]\n{answer1}\n\n[Assistant 2's Answer]\n{answer2}"
|
| 89 |
+
)
|
| 90 |
+
prompt = (
|
| 91 |
+
f"<|im_start|>system\n{SYSTEM_PROMPT}<|im_end|>\n"
|
| 92 |
+
f"<|im_start|>user\n{instruction}<|im_end|>\n"
|
| 93 |
+
"<|im_start|>assistant\n<think>\n\n"
|
| 94 |
+
)
|
| 95 |
+
inputs = {"prompt": prompt, "multi_modal_data": {"image": [image]}}
|
| 96 |
+
|
| 97 |
+
# Inference: Generation of the output
|
| 98 |
+
outputs = llm.generate([inputs], sampling_params=sampling_params)
|
| 99 |
+
output_text = outputs[0].outputs[0].text
|
| 100 |
+
print (output_text)
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
## Citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 106 |
|
| 107 |
**BibTeX:**
|
| 108 |
|
| 109 |
+
```
|
| 110 |
+
@article{ko2025flex,
|
| 111 |
+
title={Flex-Judge: Text-Only Reasoning Unleashes Zero-Shot Multimodal Evaluators},
|
| 112 |
+
author={Ko, Jongwoo and Kim, Sungnyun and Cho, Sungwoo and Yun, Se-Young},
|
| 113 |
+
journal={arXiv preprint arXiv:2505.18601},
|
| 114 |
+
year={2025}
|
| 115 |
+
}
|
| 116 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|