Retrieved article excerpt
Open article · Retrieved 2026-10-31T10:24:16.279166+00:00
# [microsoft](https://huggingface.co/microsoft) / [Mage-VL-Cowork](https://huggingface.co/microsoft/Mage-VL-Cowork) Like 49 Follow Microsoft 22.8k
[Image-Text-to-Text](https://huggingface.co/models?pipeline_tag=image-text-to-text)[Transformers](https://huggingface.co/models?library=transformers)[Safetensors](https://huggingface.co/models?library=safetensors)[English](https://huggingface.co/models?language=en)[llava\_onevision2](https://huggingface.co/models?other=llava_onevision2)[multimodal](https://huggingface.co/models?other=multimodal)[vision-language-model](https://huggingface.co/models?other=vision-language-model)[computer-use](https://huggingface.co/models?other=computer-use)[cua](https://huggingface.co/models?other=cua)[hybrid-agent](https://huggingface.co/models?other=hybrid-agent)[gui-agent](https://huggingface.co/models?other=gui-agent)[coding-agent](https://huggingface.co/models?other=coding-agent)[terminal-agent](https://huggingface.co/models?other=terminal-agent)[reinforcement-learning](https://huggingface.co/models?other=reinforcement-learning)[osworld](https://huggingface.co/models?other=osworld)[webvoyager](https://huggingface.co/models?other=webvoyager)[mage-vl](https://huggingface.co/models?other=mage-vl)[mage-vl-cowork](https://huggingface.co/models?other=mage-vl-cowork)[conversational](https://huggingface.co/models?other=conversational)[custom\_code](https://huggingface.co/models?other=custom_code)
License: apache-2.0
[Model card](https://huggingface.co/microsoft/Mage-VL-Cowork) [Files Files and versions
xet](https://huggingface.co/microsoft/Mage-VL-Cowork/tree/main) [Community](https://huggingface.co/microsoft/Mage-VL-Cowork/discussions)
Deploy
Copy to bucket
Use this model
# Mage-VL-Cowork A Full Training Recipe to Learn Hybrid Computer Use from Evolved Harnesses
[Project Page](https://microsoft.github.io/Mage/cowork/)
[Technical Report](https://github.com/microsoft/Mage/blob/main/assets/mage_vl_cowork_tech_report.pdf)
[GitHub](https://github.com/microsoft/Mage/tree/main/mage_vl_cowork)
[Mage-VL-Cowork](https://huggingface.co/microsoft/Mage-VL-Cowork)
[Mage-VL](https://huggingface.co/microsoft/Mage-VL)
[Mage Collection](https://huggingface.co/collections/microsoft/mage)
[License: Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
Mage-VL-Cowork achieves 66.0% on OSWorld-Verified with 4B parameters
---
> **One compact 4B policy that knows when to click — and when to code.**
Computer-use agents (CUAs) that confine themselves to pixels pay a heavy tax: a single screenshot consumes thousands of tokens, and re-deriving structured file edits through dozens of mouse clicks discards the fastest, most verifiable channel on the machine. Conversely, giving a frontier model naive access to both GUI and terminal tools does not automatically produce hybrid competence — without an optimized execution scaffold, even frontier teachers exhibit suboptimal channel habits that transfer directly to distilled students. Worse, existing CUA post-training pipelines rely on checkpoints already heavily specialized for GUI grounding and coding.
**Mage-VL-Cowork** bridges this gap. Trained end-to-end from an intermediate **4B [`Mage-VL`](https://huggingface.co/microsoft/Mage-VL)** checkpoint through a progressive **five-stage specialize-then-unify curriculum**, it combines screenshot-grounded GUI interaction (`computer_use`) and persistent code/terminal execution (`bash`) inside a **single vision-language policy** — with no external orchestrator. Upstream of training, we **evolve the teacher harness** (pruning redundant action routes and equipping domain libraries) and build **Mage-CUA-Forge**, a workflow-first synthesis engine that generates **293,806 tasks** across **6,915 atomic skills** while cutting recurring per-task generation cost by **82.6%**.
At **4B parameters**, **Mage-VL-Cowork** reaches **66.0% on OSWorld-Verified** under a 50-step budget — achieving the **best performance among 4B models** and demonstrating that an **efficient small VLM can excel at complex computer use**, pushing the frontier of **on-device intelligence**. Across training stages, online reinforcement learning adds **+10.16 percentage points** over Hybrid SFT while simultaneously cutting mean model calls by **13.0%** and output tokens by **25.4%**.
## ✨ Highlights
- **Best-in-class 4B hybrid computer use (66.0% OSWorld-Verified).** Achieving the highest score at the 4B scale, `Mage-VL-Cowork` proves that an efficient small VLM can master end-to-end computer use — leading on **Operating System tasks at 87.5%**, reaching **62.7% on Multi-Application Workflows**, and advancing the frontier of **on-device intelligence**.
- **Internalized turn-level channel routing.** Without an external multi-agent router, the policy dynamically selects `computer_use` for visual layouts, canvas editing, and live in-memory application state, and switches to `bash` for structured programmatic edits (spreadsheets, documents, presentations) and deterministic ground-truth verification.
- **Evolved teacher harnesses amplify student distillation (+12.5 pp).** Evolving and pruning the teacher scaffold before rollout (removing overlapping tools like `xdotool` and accessibility trees while pre-installing domain Python libraries) lifts the GPT-5.4 teacher to **92.0%** with **29.2% fewer steps**, which expands into a **+12.5 pp student gain** (37.6% vs. 25.1%) at the 4B scale.
- **Workflow-first synthesis at −82.6% recurring cost.** **Mage-CUA-Forge** authors reusable, skill-conditioned generation workflows and application-specific preparers once per skill rather than running open-ended agent loops per task — reducing token consumption by **93.3%** (1,276K → 85K tokens/task) and expenditure from **$0.906 to $0.158 per task**.
- **Specialize-then-unify five-stage curriculum (+20.44 pp).** Starting from an intermediate 4B `Mage-VL` checkpoint, the model builds standalone visual grounding (**30.6% → 56.9%** on OSWorld-G; **78.8% → 87.2%** on ScreenSpot-v2), GUI execution, and coding/terminal competence before unifying them via Hybrid SFT and asynchronous Online Hybrid RL (**45.56% → 55.84% → 66.0%**).
- **Stronger *and* more compact after Online RL.** Online GRPO with verifiable task rewards improves task accuracy by **+10.16 pp** over Hybrid SFT while compressing interaction length from **21.57 to 18.77 model calls** (−13.0%) and output tokens from **7,374 to 5,499 per task** (−25.4%).
## 📥 Model Overview
A single unified checkpoint, `microsoft/Mage-VL-Cowork`, handles visual grounding, multi-step GUI manipulation, programmatic file/system operations, and dynamic GUI-to-CLI channel switching.
| Property | Specification |
| --- | --- |
| **Developer** | Microsoft Mage Team |
| **Model Type** | Multimodal hybrid computer-use agent (`llava_onevision2` architecture; image + text → text) |
| **Parameters** | 4B (9.48 GB in `bfloat16` across 2 safetensors shards) |
| **Backbone** | Mage-ViT (`16×16` patch grid, `spatial_merge_size=2`, 3D RoPE) + Qwen3-4B (`Qwen3-4B-Instruct-2507`) |
| **Context Length** | 32,768 tokens (active training & inference window; architecture supports up to 262,144) |
| **Working Memory** | Asymmetric sliding window: **3 most recent screenshots** + **4 full responses** + folded `Action:` history |
| **Action Channels** | `computer_use` (11 GUI primitives in `[0, 999]` normalized coordinates) + `bash` (persistent shell & Python env) |
| **Outputs** | 3-part structured turn: `<think>...</think>` rationale + `Action:` summary + `<tool_call>...</tool_call>` |
| **Training Compute** | 7.79 ZFLOPs nominal LM compute across 5 stages (32 × NVIDIA B200 + 1,120 CPU sandbox slots for RL) |
| **License** | [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0) |
| Model | Role | Backbone | Hugging Face |
| --- | --- | --- | --- |
| `Mage-VL-Cowork` | 4B hybrid computer-use agent (GUI + code & terminal) | Mage-VL-4B | [🤗 microsoft/Mage-VL-Cowork](https://huggingface.co/microsoft/Mage-VL-Cowork) |
| `Mage-VL` | 4B codec-native streaming multimodal foundation model | Mage-ViT + Qwen3-4B | [🤗 microsoft/Mage-VL](https://huggingface.co/microsoft/Mage-VL) |
| `Mage-ViT` | From-scratch visual encoder | Codec-ViT | [🤗 microsoft/Mage-ViT](https://huggingface.co/microsoft/Mage-ViT) |
## 🏗️ Architecture & Training Recipe
Mage-VL-Cowork pipeline
*Overview of Mage-VL-Cowork: upstream teacher-harness evolution, reusable skill-conditioned task workflows (Mage-CUA-Forge), rubric judging, and student-feedback-driven skill expansion.*
### 1. Evolved Hybrid CUA Harness
A strong teacher model does not automatically produce clean hybrid supervision. Before large-scale trajectory collection, an authoring agent evolves the external harness $\mathcal{H} = (\mathcal{F}, \mathcal{T}, \mathcal{P}, \mathcal{E})$ — refining the execution scaffold $\mathcal{F}$, tool interfaces $\mathcal{T}$, system prompt $\mathcal{P}$, and pre-installed terminal environment $\mathcal{E}$ (equipping domain packages such as `python-pptx`, `openpyxl`, `pandas`, `pypdf`, and `pillow` while removing redundant tools like `xdotool` and verbose accessibility dumps). We instantiate specialized **GUI**, **Terminal**, and **Hybrid** harnesses to roll out the same synthesized tasks across training stages.
### 2. Workflow-First Environment Synthesis (`Mage-CUA-Forge`)
Instead of spending open-ended agent tokens to construct one task at a time, **Mage-CUA-Forge** invests authoring effort **once per atomic skill** to build reusable generation workflows and application-specific preparers. Shared specification branches coordinate input artifact creation, executable environment setup scripts, user instructions, and evaluation rubrics. For web and cross-application tasks, we pair desktop preparers with synthesized **InfiniteWeb** sites and deterministic, SQLite-backed **WebHarbor** replicas that reset cleanly before every episode. Across three student-feedback-guided rounds, the pipeline synthesizes **293,806 distinct tasks** (**38.24% multi-application**, **877,608 file references** across 278 file categories) and retains **318,837 verified hybrid trajectories** (68.19% GUI tool calls, 31.81% terminal tool calls).
### 3. Five-Stage Specialize-Then-Unify Curriculum
Rather than learning hybrid routing as a workaround for weak visual grounding, **Mage-VL-Cowork** builds two strong standalone channels first and then unifies them:
| Stage | Training Focus | Supervision Scale | Compute Share | Nominal Compute |
| --- | --- | --- | --- | --- |
| **1. GUI-Oriented Midtraining** | Visual grounding, chain-of-thought reasoning, and schema-compliant tool calling (with prompt decoupling, same-image target deduplication, and selective `<think>`-body masking) | 24.6B tokens / epoch (751K packed 32K bins) | 15.2% | 1.18 ZFLOPs |
| **2. GUI Agent SFT** | Multi-step desktop & web workflows through screenshots, mouse, and keyboard | 156.7K trajectories (32.2B tokens / epoch) | 33.6% | 1.55 ZFLOPs |
| **3. Coding & Terminal SFT** | Repository software engineering + programmatic desktop file/state manipulation | 563.7K trajectories (5.7B tokens / epoch) | 19.9% | 0.27 ZFLOPs |
| **4. Hybrid CUA SFT** | Turn-level channel routing and verification between `computer_use` and `bash` | 318.8K trajectories (45.1B tokens / epoch) | 27.8% | 2.17 ZFLOPs |
| **5. Online Hybrid RL** | Asynchronous GRPO with verifiable task rewards, frontier task sampling, bounded policy lag ($\le 3$ updates), and truncated importance sampling ($\text{TIS} \le 2.0$) | 1,988 verifiable tasks (768 episode slots / update) | 3.5% | 2.62 ZFLOPs |
### 4. Asymmetric Working Memory
Long-horizon desktop tasks face a tension between context budget and visual state awareness. At step $t$, **Mage-VL-Cowork** conditions on an asymmetric sliding window:
- **Folded long-horizon memory ($1 \dots t-4$):** Earlier turns are compressed into single-line imperative `Action:` summaries placed imme