Text Generation
Transformers
Safetensors
English
qwen2
fact-verification
claim-verification
reasoning
grpo
lora
decomposition
conversational
text-generation-inference
Instructions to use dipta007/decomposeRL-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dipta007/decomposeRL-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dipta007/decomposeRL-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dipta007/decomposeRL-7b") model = AutoModelForCausalLM.from_pretrained("dipta007/decomposeRL-7b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dipta007/decomposeRL-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dipta007/decomposeRL-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dipta007/decomposeRL-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dipta007/decomposeRL-7b
- SGLang
How to use dipta007/decomposeRL-7b 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 "dipta007/decomposeRL-7b" \ --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": "dipta007/decomposeRL-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "dipta007/decomposeRL-7b" \ --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": "dipta007/decomposeRL-7b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dipta007/decomposeRL-7b with Docker Model Runner:
docker model run hf.co/dipta007/decomposeRL-7b
Trim example to 2 iterations with per-iter think blocks
Browse files
README.md
CHANGED
|
@@ -17,13 +17,25 @@ tags:
|
|
| 17 |
|
| 18 |
# DecomposeRL-7B
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
**DecomposeRL-7B** is a fact-verification model that learns to *decompose* a claim into atomic sub-questions, iteratively answer them from an evidence document, and produce a final `Supported` / `Refuted` judgment. It is trained from `Qwen2.5-7B-Instruct` with **GRPO + LoRA** under a stack of **seven complementary rewards** that shape the reward landscape around three axes: structural correctness, per-question quality, and set-level sufficiency.
|
| 21 |
|
| 22 |
## Highlights
|
| 23 |
|
| 24 |
- **84.5% micro-average balanced accuracy** across 9 in-domain claim-verification benchmarks (sample-weighted)
|
| 25 |
- **84.6% macro-average balanced accuracy** across the same 9 benchmarks
|
| 26 |
-
- **60.2% balanced accuracy on Coverbench**
|
| 27 |
- Strong on long-form evidence: 87% on Ex-FEVER, 92% on FEVEROUS, 76% on HoVer
|
| 28 |
- Reasoning is **fully transparent** β the model emits its sub-claim checklist, every question it asked, every quote from evidence, and a final label
|
| 29 |
|
|
@@ -50,30 +62,26 @@ DecomposeRL trains the policy to follow a **decompose-question-answer-verify** l
|
|
| 50 |
|
| 51 |
### Reward Stack β seven complementary signals
|
| 52 |
|
| 53 |
-
GRPO is supervised with a sum of seven rewards
|
| 54 |
|
| 55 |
**Programmatic anchors** (no judge call)
|
| 56 |
|
| 57 |
-
1. **Format**
|
| 58 |
-
2. **Question count**
|
| 59 |
-
3. **Diversity**
|
| 60 |
|
| 61 |
**Set-level signals**
|
| 62 |
|
| 63 |
-
4. **Coverage**
|
| 64 |
-
5. **Verification**
|
| 65 |
|
| 66 |
**Leave-one-out and per-question composites**
|
| 67 |
|
| 68 |
-
6. **Necessity
|
| 69 |
-
7. **Joint multiplicative quality**
|
| 70 |
-
- **(7a) Answerability**
|
| 71 |
-
- **(7b) Atomicity**
|
| 72 |
-
- **(7c) Answer correctness**
|
| 73 |
-
|
| 74 |
-
$$R_\text{joint} = \tfrac{1}{n}\sum_{i=1}^{n} R_\text{ans}^{(i)} \cdot R_\text{atom}^{(i)} \cdot R_\text{corr}^{(i)}$$
|
| 75 |
-
|
| 76 |
-
A failure on any single axis drives that question's term to zero. For honest abstentions (`a_i = "I don't know"`) the undefined $R_\text{corr}$ factor is dropped so a calibrated abstention is rewarded by question quality alone.
|
| 77 |
|
| 78 |
## Quickstart
|
| 79 |
|
|
@@ -132,8 +140,6 @@ response = tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tok
|
|
| 132 |
print(response)
|
| 133 |
```
|
| 134 |
|
| 135 |
-
The full training-time prompt template (with extended instructions, a worked example, and sub-claim classification guidance) lives in `decomposer/prompts.py` of the source repo and is what gives the strongest performance.
|
| 136 |
-
|
| 137 |
### Pretty-print the trace
|
| 138 |
|
| 139 |
The model produces an iterative `<think>` / `<question>` / `<answer>` / `<verification>` trace. The helper below parses it into a structured form and prints it as a readable conversation:
|
|
@@ -170,7 +176,6 @@ def pretty_print(text: str) -> None:
|
|
| 170 |
print(f"β
VERIFICATION: {body}")
|
| 171 |
print("=" * 78)
|
| 172 |
|
| 173 |
-
# usage:
|
| 174 |
pretty_print(response)
|
| 175 |
|
| 176 |
# extract just the final label:
|
|
@@ -179,29 +184,44 @@ label = label_match.group(1) if label_match else None
|
|
| 179 |
print("Label:", label)
|
| 180 |
```
|
| 181 |
|
| 182 |
-
**Example output:**
|
| 183 |
|
| 184 |
```
|
| 185 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 186 |
π§ THINK
|
| 187 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 188 |
-
The claim
|
| 189 |
-
|
| 190 |
-
|
|
|
|
|
|
|
| 191 |
I will verify each in turn against the evidence document.
|
| 192 |
|
| 193 |
-
πΈ Q1:
|
| 194 |
-
π¬ A1: The evidence states
|
| 195 |
-
|
|
|
|
|
|
|
| 196 |
|
| 197 |
-
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
|
| 200 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 201 |
π§ THINK
|
| 202 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 203 |
-
|
| 204 |
-
|
|
|
|
| 205 |
|
| 206 |
==============================================================================
|
| 207 |
β
VERIFICATION: Refuted
|
|
@@ -234,13 +254,12 @@ The `--max-model-len` matches the training-time `max_seq_length=16016` (with `ma
|
|
| 234 |
| **Micro-average** (sample-weighted) | 14,503 | **0.8445** |
|
| 235 |
| **Macro-average** | β | **0.8417** |
|
| 236 |
|
| 237 |
-
### Out-of-domain
|
| 238 |
|
| 239 |
| Dataset | # Examples | Balanced Acc | Accuracy | F1 |
|
| 240 |
|---|---:|---:|---:|---:|
|
| 241 |
-
| Coverbench
|
| 242 |
-
|
| 243 |
-
Coverbench evaluates claims paired with substantially longer evidence than the training distribution, so it is a stress test of how well the decomposition behavior transfers when the document grows.
|
| 244 |
|
| 245 |
## Intended Use
|
| 246 |
|
|
@@ -249,6 +268,12 @@ Coverbench evaluates claims paired with substantially longer evidence than the t
|
|
| 249 |
|
| 250 |
The model is trained to say *"I don't know"* when the evidence document is silent β please respect that signal in downstream systems instead of forcing a label.
|
| 251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 252 |
## License
|
| 253 |
|
| 254 |
Released under the Apache 2.0 License.
|
|
|
|
| 17 |
|
| 18 |
# DecomposeRL-7B
|
| 19 |
|
| 20 |
+
<p align="center">
|
| 21 |
+
<a href="https://arxiv.org/abs/0000.00000">
|
| 22 |
+
<img src="https://img.shields.io/badge/%F0%9F%93%84_Paper-Coming_Soon-b12a00?style=for-the-badge&labelColor=ffb300" alt="Paper Coming Soon">
|
| 23 |
+
</a>
|
| 24 |
+
</p>
|
| 25 |
+
|
| 26 |
+
[](https://arxiv.org/abs/0000.00000)
|
| 27 |
+
[](https://dipta007.github.io/DecomposeRL/)
|
| 28 |
+
[](https://huggingface.co/datasets/dipta007/decomposeRL)
|
| 29 |
+
[](https://huggingface.co/collections/dipta007/decomposerl)
|
| 30 |
+
[](https://github.com/dipta007/DecomposeRL)
|
| 31 |
+
|
| 32 |
**DecomposeRL-7B** is a fact-verification model that learns to *decompose* a claim into atomic sub-questions, iteratively answer them from an evidence document, and produce a final `Supported` / `Refuted` judgment. It is trained from `Qwen2.5-7B-Instruct` with **GRPO + LoRA** under a stack of **seven complementary rewards** that shape the reward landscape around three axes: structural correctness, per-question quality, and set-level sufficiency.
|
| 33 |
|
| 34 |
## Highlights
|
| 35 |
|
| 36 |
- **84.5% micro-average balanced accuracy** across 9 in-domain claim-verification benchmarks (sample-weighted)
|
| 37 |
- **84.6% macro-average balanced accuracy** across the same 9 benchmarks
|
| 38 |
+
- Out-of-domain: **60.2% balanced accuracy on Coverbench**, **77.0% on LLM-AggreFact**
|
| 39 |
- Strong on long-form evidence: 87% on Ex-FEVER, 92% on FEVEROUS, 76% on HoVer
|
| 40 |
- Reasoning is **fully transparent** β the model emits its sub-claim checklist, every question it asked, every quote from evidence, and a final label
|
| 41 |
|
|
|
|
| 62 |
|
| 63 |
### Reward Stack β seven complementary signals
|
| 64 |
|
| 65 |
+
GRPO is supervised with a sum of seven rewards, grouped into three families:
|
| 66 |
|
| 67 |
**Programmatic anchors** (no judge call)
|
| 68 |
|
| 69 |
+
1. **Format** β ensures the trace is parseable; a gating prerequisite without which no other reward can be computed.
|
| 70 |
+
2. **Question count** β discourages collapsing the decomposition into one mega-question or padding it with filler.
|
| 71 |
+
3. **Diversity** β penalizes redundant questions so the policy covers distinct sub-claims instead of rewording the same one.
|
| 72 |
|
| 73 |
**Set-level signals**
|
| 74 |
|
| 75 |
+
4. **Coverage** β checks whether the verdict can be recovered from the answers alone; tests if the decomposition is *collectively sufficient*.
|
| 76 |
+
5. **Verification** β direct outcome anchor: did the final label match the gold label?
|
| 77 |
|
| 78 |
**Leave-one-out and per-question composites**
|
| 79 |
|
| 80 |
+
6. **Necessity (leave-one-out)** β the only signal that can push the policy to *remove* misleading questions; a question is necessary iff its removal would change the verdict.
|
| 81 |
+
7. **Joint multiplicative quality** β composes three per-question sub-signals so a question must clear *all* of them simultaneously rather than scoring partial credit:
|
| 82 |
+
- **(7a) Answerability** β is the question answerable from the evidence?
|
| 83 |
+
- **(7b) Atomicity** β is it a single-focus, verifiable question grounded in the claim?
|
| 84 |
+
- **(7c) Answer correctness** β is the answer faithful to the document (no contradictions, no extrinsic info)?
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
|
| 86 |
## Quickstart
|
| 87 |
|
|
|
|
| 140 |
print(response)
|
| 141 |
```
|
| 142 |
|
|
|
|
|
|
|
| 143 |
### Pretty-print the trace
|
| 144 |
|
| 145 |
The model produces an iterative `<think>` / `<question>` / `<answer>` / `<verification>` trace. The helper below parses it into a structured form and prints it as a readable conversation:
|
|
|
|
| 176 |
print(f"β
VERIFICATION: {body}")
|
| 177 |
print("=" * 78)
|
| 178 |
|
|
|
|
| 179 |
pretty_print(response)
|
| 180 |
|
| 181 |
# extract just the final label:
|
|
|
|
| 184 |
print("Label:", label)
|
| 185 |
```
|
| 186 |
|
| 187 |
+
**Example output on a real trace** (claim: *"New reports show Kevin Nicholson made over \$1 million advising companies that shut down Wisconsin plants and laid off 1,900 people."*):
|
| 188 |
|
| 189 |
```
|
| 190 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 191 |
π§ THINK
|
| 192 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 193 |
+
The claim can be broken down into several sub-claims:
|
| 194 |
+
1. Nicholson made over $1 million
|
| 195 |
+
2. The companies were in Wisconsin
|
| 196 |
+
3. The companies shut down plants and laid off 1,900 people
|
| 197 |
+
4. Nicholson's work is causally tied to those layoffs and shutdowns
|
| 198 |
I will verify each in turn against the evidence document.
|
| 199 |
|
| 200 |
+
πΈ Q1: What does the evidence document say about Nicholson's earnings?
|
| 201 |
+
π¬ A1: The evidence document states that Nicholson received more than $1 million
|
| 202 |
+
for his consulting work between January 2016 and November 2017. However,
|
| 203 |
+
it does not say how much he was paid for consulting for the companies
|
| 204 |
+
that did layoffs and shutdowns.
|
| 205 |
|
| 206 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 207 |
+
π§ THINK
|
| 208 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 209 |
+
Sub-claim 1 ($1 million) is partially supported, but the amount is not tied to
|
| 210 |
+
the specific companies. Next, verify the companies and the layoffs.
|
| 211 |
+
|
| 212 |
+
πΈ Q2: What does the evidence document say about the companies and layoffs?
|
| 213 |
+
π¬ A2: The evidence document states that Nicholson worked as a consultant for
|
| 214 |
+
companies that laid off nearly 1,900 people since 2015, shutting down
|
| 215 |
+
plants in Wisconsin and other states. But it also says Baldwin cites no
|
| 216 |
+
evidence that Nicholson's work caused the layoffs and shutdowns β only
|
| 217 |
+
some element of truth, our definition of Mostly False.
|
| 218 |
|
| 219 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 220 |
π§ THINK
|
| 221 |
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 222 |
+
The causal link between Nicholson's consulting and the layoffs is unsupported.
|
| 223 |
+
The document explicitly rates the claim Mostly False, so the overall claim is
|
| 224 |
+
refuted.
|
| 225 |
|
| 226 |
==============================================================================
|
| 227 |
β
VERIFICATION: Refuted
|
|
|
|
| 254 |
| **Micro-average** (sample-weighted) | 14,503 | **0.8445** |
|
| 255 |
| **Macro-average** | β | **0.8417** |
|
| 256 |
|
| 257 |
+
### Out-of-domain
|
| 258 |
|
| 259 |
| Dataset | # Examples | Balanced Acc | Accuracy | F1 |
|
| 260 |
|---|---:|---:|---:|---:|
|
| 261 |
+
| Coverbench | 728 | **0.6021** | 0.5989 | 0.6086 |
|
| 262 |
+
| LLM-AggreFact | 29,320 | **0.7695** | 0.8510 | 0.9054 |
|
|
|
|
| 263 |
|
| 264 |
## Intended Use
|
| 265 |
|
|
|
|
| 268 |
|
| 269 |
The model is trained to say *"I don't know"* when the evidence document is silent β please respect that signal in downstream systems instead of forcing a label.
|
| 270 |
|
| 271 |
+
## Citation
|
| 272 |
+
|
| 273 |
+
```bibtex
|
| 274 |
+
|
| 275 |
+
```
|
| 276 |
+
|
| 277 |
## License
|
| 278 |
|
| 279 |
Released under the Apache 2.0 License.
|