Instructions to use LEONW24/BEPA-7B-S2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LEONW24/BEPA-7B-S2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LEONW24/BEPA-7B-S2") 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)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("LEONW24/BEPA-7B-S2") model = AutoModelForImageTextToText.from_pretrained("LEONW24/BEPA-7B-S2") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LEONW24/BEPA-7B-S2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LEONW24/BEPA-7B-S2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LEONW24/BEPA-7B-S2", "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/LEONW24/BEPA-7B-S2
- SGLang
How to use LEONW24/BEPA-7B-S2 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 "LEONW24/BEPA-7B-S2" \ --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": "LEONW24/BEPA-7B-S2", "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 "LEONW24/BEPA-7B-S2" \ --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": "LEONW24/BEPA-7B-S2", "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 LEONW24/BEPA-7B-S2 with Docker Model Runner:
docker model run hf.co/LEONW24/BEPA-7B-S2
BEPA-7B-S2
From Off-Policy to On-Policy: Enhancing GUI Agents via Bi-level Expert-to-Policy Assimilation
🌐 Project Page | 📑 arXiv Paper | 💻 GitHub
🏆 #1 Open-Source End-to-End Model on OSWorld (15 steps): Achieves 32.13% success rate
📊 Extreme Data Efficiency: Matches GUI-OWL-7B performance using only 128 training tasks
Model Description
BEPA-7B-S2 is a GUI agent model fine-tuned from UI-TARS-1.5-7B using the BEPA (Bi-Level Expert-to-Policy Assimilation) framework. This model achieves state-of-the-art performance among open-source end-to-end models on the OSWorld benchmark.
Key Results
| Method | Dexpert_only | Dtrain | Dheld_out | Overall (%) |
|---|---|---|---|---|
| UITARS1.5-7B | 18.52 | 55.12 | 5.74 | 22.87 |
| GRPO | 11.11 | 58.02 | 5.32 | 23.60 |
| BEPA (ours) | 35.19 | 73.23 | 10.30 | 32.13 |
BEPA improves UI-TARS-1.5-7B from 22.87% to 32.13% on OSWorld-Verified (+9.26 points, +40.5% relative improvement).
BEPA Framework
BEPA addresses two key challenges when using expert trajectories for training end-to-end GUI policies:
- Structural Mismatch: Framework traces interleave multiple roles (planning, execution, grounding) that end-to-end policies cannot directly imitate.
- Distribution Gap: Even after format conversion, trajectories remain far from the base-policy manifold.
LEVEL-1: Self-Rolled Execution
Transforms alien expert traces into policy-compatible trajectories by abstracting expert trajectories into compact natural-language plans, then letting the base policy act in the environment with plan conditioning.
LEVEL-2: Self-Aligned Assimilation
Dynamically maintains a per-task cache, injecting guided trajectories into GRPO updates only upon total on-policy failure. The cache is continuously refreshed with the policy's own successful executions.
Citation
@misc{wang2026offpolicyonpolicyenhancinggui,
title={From Off-Policy to On-Policy: Enhancing GUI Agents via Bi-level Expert-to-Policy Assimilation},
author={Zezhou Wang and Ziyun Zhang and Xiaoyi Zhang and Zhuzhong Qian and Yan Lu},
year={2026},
eprint={2601.05787},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2601.05787},
}
License
This model is released under the MIT License.
Acknowledgements
- Downloads last month
- -