File size: 3,820 Bytes
a392d4a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
---
license: apache-2.0
language:
- en
library_name: transformers
pipeline_tag: image-text-to-text
tags:
- agent
- tool-use
- mcp
- reinforcement-learning
- grpo
- qwen3_5
---

# AgentMercury-Qwen3.5-4B

**AgentMercury-Qwen3.5-4B** is a Qwen3.5-4B (multimodal, `Qwen3_5ForConditionalGeneration`)
checkpoint post-trained with **agentic reinforcement learning** on MCP (Model-Context-Protocol)
tool-use environments. The RL objective rewards *completing real multi-turn agent tasks*
(correct tool calls, correct final database/environment state), not just producing text.

This checkpoint is the **clean-minimum** of the run: the step at which reward peaks while
**degenerate-generation rate and truncation rate are both exactly 0** — before later steps
regress into verbosity / reward-hacking.

## Highlights

- **Base:** Qwen3.5-4B (text + vision).
- **Method:** on-policy GRPO, 200-step MCP agentic RL (slime trainer + sglang rollout, 8×A100).
- **Reward:** final environment-state verifiers on real agent tasks (tool correctness + DB checks),
  with penalties for degeneration/truncation.
- **Training-set diversity:** ~2.3k agent environments spanning **63% of industries** and
  **76% of tools** in the source corpus.

## Benchmark results (improvement over the base model)

Only benchmarks where AgentMercury **improves over the Qwen3.5-4B base** are listed,
with the absolute gain (**Δ**) over base. Evaluated with an OpenAI-compatible endpoint
(sglang, 32k context), N repeats per cell.

### Agentic / tool-use
| Benchmark | Base | AgentMercury | Δ |
|---|---|---|---|
| BFCL | 30.35 | **31.93** | **+1.58** |
| τ³-bench | 0.706 | **0.747** | **+0.041** |
| τ²-bench | 0.448 | **0.457** | **+0.009** |

### Math & reasoning
| Benchmark | Base | AgentMercury | Δ |
|---|---|---|---|
| AIME 2026 | 0.459 | **0.553** | **+0.094** |
| HMMT 2026-02 | 0.285 | **0.356** | **+0.071** |
| GPQA-Diamond | 0.765 | **0.770** | **+0.005** |
| Finance-Reasoning | 0.563 | **0.571** | **+0.008** |
| AA-Omniscience | −52.17 | **−51.67** | **+0.50** |

### Code
| Benchmark | Base | AgentMercury | Δ |
|---|---|---|---|
| LiveCodeBench (v5+v6) | 0.366 | **0.435** | **+0.069** |
| SciCode | 0.226 | **0.260** | **+0.034** |

### Writing
| Benchmark | Base | AgentMercury | Δ |
|---|---|---|---|
| WritingBench | 6.232 | **6.307** | **+0.075** |

> Metrics use each benchmark's native scale (fractions 0–1, or the benchmark's own points).
> The largest, most consistent gains are on **agentic tool-use (BFCL, τ-bench)** and
> **competition math / code (AIME, HMMT, LiveCodeBench)**.

## Usage

### Serving (sglang, recommended — matches evaluation)
```bash
python3 -m sglang.launch_server \
  --model-path Minbyul/AgentMercury-Qwen3.5-4B \
  --served-model-name agentmercury-qwen3.5-4b \
  --host 0.0.0.0 --port 30000 --tp 1 \
  --context-length 32768 \
  --reasoning-parser qwen3 --tool-call-parser qwen3_coder \
  --trust-remote-code
```
Then call the OpenAI-compatible endpoint at `http://localhost:30000/v1` (supports tool calls).

### transformers
```python
from transformers import AutoModelForCausalLM, AutoProcessor
model = AutoModelForCausalLM.from_pretrained(
    "Minbyul/AgentMercury-Qwen3.5-4B",
    torch_dtype="bfloat16", device_map="auto", trust_remote_code=True,
)
processor = AutoProcessor.from_pretrained(
    "Minbyul/AgentMercury-Qwen3.5-4B", trust_remote_code=True,
)
```

## Training notes

The reward peaks around this checkpoint while the model stays **clean**
(no repetition collapse, no context truncation). Continuing RL past this point raised
response length and reintroduced degeneration/truncation **without adding capability** —
so this clean-minimum checkpoint is released as the recommended weights.

## License

Released under the **Apache-2.0** license (see `LICENSE`).