Instructions to use DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B") model = AutoModelForMultimodalLM.from_pretrained("DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DAGroup-PKU/PyRUA-Lean-Coder-v0.1-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": "DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B
- SGLang
How to use DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B 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 "DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B" \ --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": "DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B" \ --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": "DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B with Docker Model Runner:
docker model run hf.co/DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B
PyRUA-Lean Coder v0.1-4B
Paper | Code | Docs | Project page
PyRUA-Lean Coder v0.1-4B is Qwen3.5-4B trained with GRPO in the
PyRUA-Lean framework, in which a robot agent acts by writing Python cells
against a robot object robo instead of making one tool call per step. It was trained on 45 LIBERO-PRO task instances
only.
Results
Success rate (%) in the PyRUA-Lean framework, one episode per task instance:
| Planner | Trained on (45) | LIBERO-PRO other tasks (155) | RoboTwin 2.0 (250) | RoboCasa365 atomic (90) | RoboCasa365 composite (160) | All unseen (655) | All (700) |
|---|---|---|---|---|---|---|---|
| Qwen3.5-4B | 37.8 | 13.5 | 14.0 | 52.2 | 12.5 | 18.8 | 20.0 |
| Qwen3.5-27B | 64.4 | 38.1 | 20.8 | 65.6 | 13.1 | 29.2 | 31.4 |
| PyRUA-Lean Coder v0.1-4B | 71.1 | 37.4 | 52.4 | 76.7 | 19.4 | 44.1 | 45.9 |
RoboTwin 2.0 and both RoboCasa365 sets are benchmarks the model was not trained on at all.
Usage
The model is served by any OpenAI-compatible server and driven by PyRUA-Lean's openai runtime. With SGLang:
python -m sglang.launch_server --model-path DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B --port 30000 \
--context-length 65536 --tool-call-parser qwen3_coder --reasoning-parser qwen3 \
--constrained-json-disable-any-whitespace
Then one LIBERO-PRO episode, on a task the model never saw in training (RPent's LIBERO-PRO stack installed as the Quick Start describes):
export RPENT_ROOT=/path/to/rpent OPENAI_API_KEY=none
pyrualean play --robot libero --arm cells --suite libero_goal_swap --task 3 --seed 0 \
--runtime openai --base-url http://127.0.0.1:30000/v1 --api-key-env OPENAI_API_KEY \
--model DAGroup-PKU/PyRUA-Lean-Coder-v0.1-4B \
--openai-max-tokens 8192 --openai-tool-choice required --openai-temperature 1.0 \
--openai-extra-body '{"top_p": 0.95, "top_k": 20}' \
--images on-demand --feedback pure --guides --max-turns 40 --budget-s 5400 \
--out runs/coder-demo --cuda-device 0
pyrualean summarize runs/coder-demo
These are the settings of the paper's evaluation. The model is trained for the PyRUA-Lean prompt and tools; outside them it behaves like a general 4B chat model.
Training
GRPO from Qwen3.5-4B in the PyRUA-Lean framework, on 45 LIBERO-PRO task instances; Section 5 of the paper describes it.
Citation
@article{si2026fewer,
title={Fewer tokens, better action: GPT-6 Astra robot agents with 14\% higher success rate but 65\% fewer tokens},
author={Si, Ruiyang and Bi, Jianxin and Yang, Shunyu and Ni, Rui and Huang, Wenbo and Wang, Qiang and Jiang, Shulong and Zhang, Yintianrun and Ruan, Feixiang and Zhang, Kewei and Wang, Duomin and Li, Xiuyu and Feng, Haiwen and Dong, Zhen and Zhou, Daquan},
journal={arXiv preprint arXiv:2610.01939},
year={2026}
}
The model inherits the Apache 2.0 license of Qwen3.5-4B.
- Downloads last month
- 91