teng-pan commited on
Commit
a625111
·
verified ·
1 Parent(s): 1c4e257

Add model card for Agent-R2-4B

Browse files
Files changed (1) hide show
  1. README.md +112 -0
README.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: apache-2.0
5
+ library_name: transformers
6
+ base_model: Qwen/Qwen3-4B-Thinking-2507
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - agent
10
+ - productivity
11
+ - long-horizon
12
+ - rubric-based-rl
13
+ - qwen3
14
+ ---
15
+
16
+ # Agent-R²-4B
17
+
18
+ **Agent-R²-4B** is a 4B-parameter language model agent trained for realistic productivity work: long-horizon professional workflows that involve heterogeneous files (documents, spreadsheets, slides, PDFs) and require producing a usable deliverable, not just an answer string.
19
+
20
+ It is the model introduced in *Agent-R²: Scaling Agents for Realistic Productivity Work via Real-Source Data Synthesis*.
21
+
22
+ ## Highlights
23
+
24
+ - Trained on **4,000 task instances** distilled from 10,000 web-corpus candidates. Every instance pairs **real, multi-format attachments** with **fine-grained, deliverable-level rubrics** — no LLM-generated files and no hand-specified workflows.
25
+ - Training recipe: **supervised fine-tuning (SFT)** followed by **rubric-based reinforcement learning**.
26
+ - Surpasses **Qwen3-235B-A22B-Thinking-2507** on both evaluation benchmarks despite being ~59x smaller.
27
+ - Reduces **shortcut behavior** — the tendency to emit a superficially plausible deliverable before grounding, constructing, or verifying it — and sustains longer exploration.
28
+
29
+ ## Results
30
+
31
+ | Benchmark | Agent-R²-4B | Qwen3-235B-A22B-Thinking-2507 |
32
+ |---|---|---|
33
+ | GDPval | **51.0** | 48.0 |
34
+ | OfficeQA | **14.8** | 13.8 |
35
+
36
+ Scores are as reported in the paper. Both benchmarks evaluate end-to-end task completion on realistic occupational tasks.
37
+
38
+ ## Model Details
39
+
40
+ - **Base model:** Qwen3-4B-Thinking-2507
41
+ - **Parameters:** 4B
42
+ - **Training stages:** SFT → rubric-based RL
43
+ - **Training data:** 4k real-source task instances; real occupational seeds, corpus-derived workflow evidence, and authentic web-sourced files
44
+ - **Context / turns:** multi-turn agentic rollouts with file-manipulation tools provided by the harness
45
+
46
+ ## Intended Use
47
+
48
+ Agent-R²-4B is intended to be used **inside an agent harness** that gives it tools for reading, writing, and inspecting files, and a working directory to operate on. It is designed for tasks such as:
49
+
50
+ - assembling a report or memo from a set of source documents
51
+ - cleaning, joining, and analyzing spreadsheet data and producing a summarized workbook
52
+ - building a slide deck or one-pager from raw inputs
53
+ - multi-step professional workflows that combine the above
54
+
55
+ **Out of scope:** open-ended chat, code generation as a standalone task, safety-critical decision making, and any use where an unverified deliverable could be acted on without human review.
56
+
57
+ ## How to Use
58
+
59
+ ```python
60
+ from transformers import AutoModelForCausalLM, AutoTokenizer
61
+
62
+ model_id = "teng-pan/Agent-R2-4B"
63
+
64
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
65
+ model = AutoModelForCausalLM.from_pretrained(
66
+ model_id,
67
+ torch_dtype="bfloat16",
68
+ device_map="auto",
69
+ )
70
+
71
+ messages = [
72
+ {"role": "system", "content": "You are a careful productivity agent. Ground every claim in the provided files and verify your deliverable before finishing."},
73
+ {"role": "user", "content": "Using the files in ./workspace, produce quarterly_summary.xlsx ..."},
74
+ ]
75
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
76
+ inputs = tokenizer(text, return_tensors="pt").to(model.device)
77
+ out = model.generate(**inputs, max_new_tokens=32768)
78
+ print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
79
+ ```
80
+
81
+ For best results, expose the file tools used during training and give the model an explicit, verifiable deliverable specification. The model benefits from being told what the final artifact must contain and how it will be checked.
82
+
83
+ ## Training Data
84
+
85
+ Task instances were synthesized by a real-source pipeline: occupational seeds and workflow evidence were drawn from a web corpus, candidate tasks were filtered from 10k down to 4k, and each retained task was paired with real web-sourced attachments and a deliverable-level rubric. Because the attachments are authentic web documents, they may contain personal names, contact details, or other information present in the original public sources.
86
+
87
+ ## Evaluation
88
+
89
+ Evaluated on GDPval (51.0) and OfficeQA (14.8) using the protocol described in the paper. See the paper for full setup, rubric definitions, and per-task breakdowns.
90
+
91
+ ## Limitations
92
+
93
+ - Trained and evaluated on English-language professional tasks; performance on other languages and domains is not established.
94
+ - Deliverable quality is judged by rubrics; a high rubric score does not guarantee factual correctness on every claim.
95
+ - The model can still hallucinate file contents or fabricate numbers when the grounding evidence is ambiguous — always review generated artifacts before use.
96
+ - Long rollouts on large file collections are compute-intensive.
97
+ - Web-sourced training attachments may carry imperfect OCR, stale data, or copyrighted content.
98
+
99
+ ## Citation
100
+
101
+ ```bibtex
102
+ @article{pan2026agentr2,
103
+ title = {Agent-R$^2$: Scaling Agents for Realistic Productivity Work via Real-Source Data Synthesis},
104
+ author = {Pan, Teng and Wang, Zixuan and Yan, Yuchen and Wu, Qifei and Chen, Yao and Qu, Yingqi and Zhang, Ruiqing and Shen, Yongliang},
105
+ journal = {arXiv preprint},
106
+ year = {2026}
107
+ }
108
+ ```
109
+
110
+ ## Links
111
+
112
+ - Code: https://github.com/ZJU-REAL/Agent-R2