Skip to content
sobolewski.proAI today, every eveningSubscribe

Once a day. Unsubscribe with one click. Privacy policy

Local computer use agent on DGX Spark: 1.1–3 s per action

A local computer use agent on DGX Spark drives Windows at 1.1–3 s per action. I timed Qwen3.8-27B, a 35B MoE and UI-Mate, and the harness mattered most.

6 min read

This article in other languages:Polski

In this article
  1. What did it all run on?
  2. What did the test look like?
  3. How long does one action take?
  4. A local computer use agent in a Claude Code-style harness
  5. What surprised me?
  6. Would a Mac be faster?
  7. What next?

I wanted a local agent that operates a Windows PC on its own and stays under 2 seconds per action. So I built my own local computer use agent on an NVIDIA DGX Spark, ran several open models on it and timed every step. Qwen3.8-27B finishes a whole task in 14–22 s at 1.7–3 s per action, and a smaller MoE (mixture-of-experts) model gets down to about 1.1 s but loses its way on the harder task.

The biggest difference, though, came from the harness, the loop around the model. The same model in a Claude Code-style agent harness was roughly 10 times slower.

What did it all run on?

The hardware is a single NVIDIA DGX Spark (GB10 Grace Blackwell, 128 GB of unified LPDDR5x memory, about 273 GB/s) with DGX OS (Ubuntu 24.04, aarch64) and the 580 driver. The machine being controlled is an ordinary Windows 11 desktop (with a Polish interface), which the agent reaches through AnyDesk on the free license, over a 1 GbE LAN.

The agent sees that PC as an AnyDesk window on an Xvfb virtual display (1920×1080) running on the Spark. It clicks and presses keys through xdotool and pastes text from the clipboard. I wrote about the cloud version of the same idea when covering Claude computer use; here everything runs locally.

The models were served by vLLM from the vllm/vllm-openai:nightly Docker image (November 2026), with an OpenAI-compatible API and an FP8 KV cache (if you are just starting out with local models, Ollama or LM Studio is the easier way in). I tried four models:

  1. unsloth/Qwen3.8-27B-NVFP4, a dense 27B model, with speculative decoding through MTP (3 tokens) or the DFlash2 drafter.
  2. nvidia/Qwen3.6-35B-A3B-NVFP4, an MoE with 3B active parameters.
  3. tencent/UI-Mate-9B, a model fine-tuned for GUI agents, with online FP8 quantization and Tencent’s official harness.
  4. tencent/UI-Mate-27B, the larger variant in the same setup.

What did the test look like?

There were two tasks. Each started from a clean desktop and a fresh AnyDesk connection, with a limit of 20 steps:

  1. T1 Notepad: “Open Notepad and write a short, 4-line poem about the city at night”.
  2. T2 Calculator: “Open Windows Calculator, compute 1234 × 56 and report the result”. Success means 69,104 on the screen.

I judged success on the last screenshot, not on what the model claimed about itself.

The fast loop is my own Python harness, about 250 lines. One step goes like this:

  1. A screenshot, downscaled to 1280 or 960 px wide.
  2. The screenshot goes to the model together with a system prompt of about 15 lines, the task, and the last N screenshots and actions.
  3. The model replies with exactly one action in JSON (click, type, key, scroll, wait, done). That is 10–40 tokens, with thinking turned off.
  4. The harness executes the action, waits 0.4–0.5 s for the remote screen to refresh, and starts over.

At every step I logged the screenshot time, the time to first token (roughly the image prefill), the total model time and the time to execute the action.

How long does one action take?

Model Screenshot / history T1 Notepad T2 Calculator Median s/action
Qwen3.8-27B NVFP4 + MTP 1280 px, 3 screenshots passed, 18–22 s (6–7 steps) passed, 21 s (7 steps) 2.6–3.0 s
Qwen3.8-27B NVFP4 + MTP 960 px, 2 screenshots passed, 14 s (6 steps) failed, wandered (20 steps) 1.7–2.2 s
Qwen3.8-27B NVFP4 + MTP 1280 px, 1 screenshot failed, loop (kept typing the text over and over) – 2.3–2.5 s
Qwen3.6-35B-A3B NVFP4 1280 px, 3 screenshots passed, 20 s (12 steps) failed 1.5 s
Qwen3.6-35B-A3B NVFP4 960 px, 2 screenshots passed, 12 s (9 steps) failed 1.1–1.2 s
UI-Mate-9B FP8 (official harness) 2 screenshots failed (typos, wandered) passed, 82 s (14 steps) 5.8 s
UI-Mate-27B FP8 (official harness) 2 screenshots – failed (16 steps) 12.6 s

For Qwen3.8-27B at 960 px the time breaks down like this: screenshot 0.05 s, time to first token 0.4–0.8 s, generating the action 0.3–0.6 s, executing it plus the wait 0.5 s. The slowest step is typing the whole poem in a single type action (about 3–4 s), because the model generates the full text then.

So the 2 s target is within reach, but no configuration that meets it got through Calculator. The only row in the table where both tasks passed is the 27B at 1280 px with three screenshots, at 2.6–3.0 s per action.

A local computer use agent in a Claude Code-style harness

For comparison I hooked the Claude Code CLI up to the same vLLM server (through the Anthropic-format /v1/messages endpoint) and gave it a tool that describes the screen.

Configuration Result
27B + DFlash2, thinking on failed, only 2 actions in 120 s
27B, thinking “off” via chat_template_kwargs failed, the model still wrote 2,500–9,500 characters of reasoning per step (the Anthropic endpoint ignored the default kwargs)
27B + MTP failed, 4 actions in 300 s

The large system prompt (about 13,000 tokens), the long-winded reasoning and the tool-call wrapping cost 10–60 s per step. So the same model takes about 20 s per step in a general-purpose agent framework and about 2 s in a lean loop. A 2 s target needs a dedicated, minimal loop.

What surprised me?

Thinking has to be off for real. To force that on the Anthropic endpoint I had to patch the chat template, adding {%- set enable_thinking = false %} as its first line.

History length turned out to be a quality dial. With one screenshot the model repeated itself, and with three it noticed its own previous action. Resolution behaves similarly: 960 px cut the time to first token roughly in half, but click accuracy dropped and Calculator failed.

The MoE with 3B active parameters is the fastest (about 1.1 s per action), but it makes more planning mistakes and often breaks the JSON format. Interestingly, enforcing a JSON schema at decoding time did not help, because the model sometimes ran into the token limit. A forgiving parser did more.

DFlash2 gave 64 tok/s on structured JSON and only about 20–25 tok/s on free-form reasoning text. With actions this short, decoding speed matters less than prefill anyway.

The UI-Mate models write out reasoning and a description of the action at every step, hence 6–13 s per action even at 9B. On Calculator their clicks were accurate, but they are a long way from 2 s.

One model I never got running at all. Qwen3.8-Flash-Next NVFP4 (a 125B MoE, 6B active) did not fit on a single Spark with stock vLLM: a 124 GB checkpoint plus a 0.85 memory reservation hung the machine (OOM, dead SSH). Community recipes keep its 48 GB n-gram table on disk thanks to a patch, but I did not get around to trying that (I described how to work out whether a model will fit in memory in how much VRAM for a local LLM).

And one small real-life detail: free AnyDesk closes sessions after a few minutes (the message says “license limitations”), so my runner reconnects before every run, using the unattended access password :)

Would a Mac be faster?

I did not measure this; it is only a back-of-the-envelope estimate. One action is about 1,000–1,500 image tokens of prefill plus about 20–40 tokens of decoding.

A Mac Studio (M3 Ultra, about 819 GB/s) would decode about 2–3 times faster than the Spark (273 GB/s), but it would prefill images several times slower, because it has much less compute. And prefill is already the bigger half of the time here (0.4–1.8 s against 0.3–0.6 s of decoding).

So under this kind of load I would expect the Mac to come out similar or slower per action, and faster only on long text replies.

What next?

  1. A small, fast model for the actions, plus the 27B as a planner called every few steps.
  2. Screenshots at 1120–1280 px with a history of 2–3 as the sweet spot.
  3. Flash-Next with the patch that keeps the n-gram table on disk, and tensor parallelism across two Sparks.
  • AI
  • open-weight
  • AI agents
  • AI models

AI today, every evening

The day's biggest AI news and new posts from the blog, every evening. Short, with sources.

Once a day. Unsubscribe with one click. Privacy policy