How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "teng-pan/Agent-R2-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": "teng-pan/Agent-R2-4B",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/teng-pan/Agent-R2-4B
Quick Links

Agent-Rยฒ-4B

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.

It is the model introduced in Agent-Rยฒ: Scaling Agents for Realistic Productivity Work via Real-Source Data Synthesis.

Results

Benchmark Qwen3-4B-Thinking-2507 (base) Agent-Rยฒ-4B Qwen3-235B-A22B-Thinking-2507
GDPval 32.4 51.0 48.0
OfficeQA 2.2 14.8 13.8

Scores are as reported in the paper. All benchmarks evaluate end-to-end task completion on realistic occupational tasks.

Model Details

  • Base model: Qwen3-4B-Thinking-2507
  • Parameters: 4B
  • Training stages: SFT โ†’ rubric-based RL

How to Use

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "teng-pan/Agent-R2-4B"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype="bfloat16",
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are a careful productivity agent. Ground every claim in the provided files and verify your deliverable before finishing."},
    {"role": "user", "content": "Using the files in ./workspace, produce quarterly_summary.xlsx ..."},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

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.

Links

Downloads last month
283
Safetensors
Model size
4B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for teng-pan/Agent-R2-4B

Finetuned
(277)
this model
Quantizations
2 models