Run this model with HF Jobs

Run teng-pan/Agent-R2-4B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/teng-pan/Agent-R2-4B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/teng-pan/Agent-R2-4B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/teng-pan/Agent-R2-4B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/teng-pan/Agent-R2-4B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

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
912
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
(278)
this model
Quantizations
2 models