One Harness, One Agent, Three GPUs: Running Qwen on a DGX Spark, an RTX 5090, and a Radeon R9700
From the publisher’s feed, collected in the ZeroLabs newsroom.
Three machines, one model, one agent. A field report on what actually changed, and what I’d keep if I started over.I’ve been working in AI since 2014. I was reading the AlexNet paper that year, and I kept coming back to a problem of my own: how do you classify messy free-text inputs without a bunch of regexes? The paper was about images. I was about text. But it made me think deep learning might actually help. I’ve been chasing that problem ever since. That chase led to the founding of my company, ProcureVue, where, among other data things, we build local agentic pipelines for clients every day in custom harnesses using custom models we trained ourselves.The setup described here fills a specific gap. A lot of client data can’t leave the building. When that’s the case, the engineering and analysis work behind it gets done by hand. For work that wasn’t subject to similar data restrictions, I had been using Claude Code and Claude Cowork. I wanted sustained coding sessions and document work in an environment where we control the model server and can grant collaborators access to it. Local inference is what makes all three true at once: the data stays, we control the server, and collaborators can reach it.So this is what I cobbled together. DeepSeek Harness (DSH) became the agent layer: tool calls, code execution, tests, web search, long sessions, and GenOffice for document operations. I kept DSH where a person is working and served Qwen3.8 27B from a separate inference process, joined by an OpenAI-compatible Chat Completions endpoint.I built that setup across three machines: an NVIDIA DGX Spark, a Windows 11 workstation with an RTX 5090 running vLLM inside WSL2, and an Ubuntu workstation with a 32 GB AMD Radeon R9700 running llama.cpp.This post is about three things: what changed between the platforms, what the measurements actually showed, and what I would keep if I started over. One word up front: my numbers come from specific machines and workloads. When I use someone else’s measurements, I say so.The useful boundary: DSH talks to an APIHere’s the boundary that made everything else easy. DSH handles the session: messages, tools, agent behavior, and context management. The inference server does one job: accept a request, run the model, return the response. Once I had the server exposing `/v1/chat/completions`, changing hardware mostly became a provider configuration change in DSH.One caution, though. “OpenAI-compatible” is a wire protocol, not a promise of identical behavior. Context capacity, reasoning and tool-call formatting, multimodal support, authentication, and performance still need to be tested against the exact model and server build. DSH’s provider documentation describes the custom endpoint pattern, while vLLM and llama.cpp document their respective API servers.That boundary is the whole trick: keep the agent and its tools on the client, and change the inference endpoint without touching them. Basically, it’s your own “data center”.Why DSH for this experiment?I wanted to test sustained agentic work: shell access, code editing, tests, subagents, web search, context compaction, and Office-document operations, over sessions that run for hours. A direct API client would have tested serving, sure. But I would still have had to supply the workflow around it. DSH gave me a ready orchestration layer whose tools and workflow could remain largely constant while I swapped out Spark, 5090, and Radeon inference backends.To be fair: AutoGen, LangChain, or a custom harness could also provide an orchestration layer. DSH was my practical choice, not a prerequisite for running Qwen. Holding the harness broadly constant made the hardware comparisons more useful, although the differing checkpoints, settings, and agent trajectories still prevent a controlled comparison. I keep coming back to that, so you should hear it here first.Where the model and tools executeRead the arrows as OpenAI-compatible `/v1/chat/completions` requests and responses. Each host serves its Qwen3.8 27B checkpoint, and the client selects the endpoint. The client and inference process can even share a physical machine, that’s the local 5090 connection, but they retain separate responsibilities. The client operating systems shown describe the placement pattern, not a claim that I validated every plugin on all three operating systems.Here’s the part people get wrong. Code, shell commands, tests, and local document operations execute in the DSH client’s environment. Superpowers supplies the workflow instructions; GenOffice runs as a local MCP process; the Brave plugin calls Brave’s external service. The model server just receives the prompts and tool results DSH sends it.A local model does not make every tool operation local. Web search still crosses an external API boundary. Compaction is another model request routed by DSH, and on AMD, its logical summary provider uses the same inference process and model as those used for ordinary generation.First stop: DGX SparkThe Spark was the natural place to begin. It is a Linux/NVIDIA machine with 128 GB of unified memory, a big number, and it makes the memory questions easier. I ran vLLM in Docker on Spark and pointed DSH on another computer at its endpoint.I’ll be honest: my first vLLM experiments were not smooth. An earlier model/container attempt failed in EngineCore before the server was ever usable. Downloads and container startup took real work, and a later package update left one Spark unable to communicate with the NVIDIA driver until I repaired the environment. Then, finally, Qwen3.8 27B was serving. The recorded agent recipe uses the Unsloth NVFP4 checkpoint with FP8 KV cache, prefix caching, chunked prefill, and an MTP draft configuration.Here is the recorded agent recipe, in full:VLLM_IMAGE="vllm/vllm-openai:latest"MODEL="unsloth/Qwen3.8-27B-NVFP4"docker rm -f vllm-qwen38 2>/dev/null || truedocker run -d \ --name vllm-qwen38 \ --restart unless-stopped \ --gpus all \ --ipc=host \ --ulimit memlock=-1 \ --ulimit stack=67108864 \ -p 8000:8000 \ -e HF_TOKEN="$HF_TOKEN" \ -e HF_HUB_DISABLE_XET=1 \ -e HF_HUB_DOWNLOAD_TIMEOUT=300 \ -v "$HOME/.cache/huggingface/hub:/root/.cache/huggingface/hub" \ "$VLLM_IMAGE" \ "$MODEL" \ --host 0.0.0.0 \ --port 8000 \ --served-model-name qwen3.8-27b \ --tensor-parallel-size 1 \ --trust-remote-code \ --max-model-len 262144 \ --kv-cache-dtype fp8 \ --gpu-memory-utilization 0.80 \ --max-num-seqs 4 \ --max-num-batched-tokens 8192 \ --enable-prefix-caching \ --enable-chunked-prefill \ --reasoning-parser qwen3 \ --enable-auto-tool-choice \ --tool-call-parser qwen3_coder \ --speculative-config '{"method":"mtp","num_speculative_tokens":3}'The comparison table already names the pieces; the script shows how they fit together. The stock `vllm/vllm-openai:latest` image serves `unsloth/Qwen3.8–27B-NVFP4` on port 8000 under the alias `qwen3.8–27b`, the model ID DSH sees. `--max-model-len 262144` is the 262,144-token ceiling in the table. The agent configuration is FP8 KV cache, a 0.80 memory budget, and 4 concurrent sequences, and the `speculative-config` line is MTP with 3 draft tokens. The Hugging Face cache mount under `$HOME` means recreating the container does not re-download the checkpoint.The DSH side is comparatively short. In schematic form, a custom provider needs the Chat Completions protocol, the server URL, and the model ID actually served by vLLM:api: openai-completionsbaseURL: http://127.0.0.1:8000/v1models: - id: qwen3.8-27bThat fragment illustrates the fields. It is not a complete drop-in `cordis.patch.yml`. In practice, I also configure credentials, model capabilities, and DSH’s policies. And when the harness and the server live on different machines, I replace the loopback address with the server’s reachable address and protect the endpoint accordingly.The RTX 5090: where the memory budget got realMy 5090 workstation remains a Windows PC, but the serving stack runs in WSL2 Ubuntu. That gives vLLM the Linux environment it expects while letting me keep my normal Windows workflow. vLLM’s own installation documentation describes WSL as a path for Windows systems.I serve the 5090-oriented NVFP4 checkpoint, `gittensor-model-hub/Qwen3.8–27B-NVFP4-RTX5090`. The revised launch script sets ` --max-model-len 163840`, FP8 KV cache, `--gpu-memory-utilization 0.85`, and `--max-num-seqs 2`, with prefix caching and chunked prefill. It selects Qwen’s reasoning parser and the `qwen3_xml` tool parser. Two flags worth understanding: the memory-utilization flag sets vLLM’s GPU memory budget for this instance, and ` --max-model-len` bounds combined input and output length.Here is the revised launch script, in full:#!/usr/bin/env bashset -euo pipefail# Initialize Conda for non-interactive shellsource /path/to/miniconda3/etc/profile.d/conda.shconda activate env_vllmexport CUDA_HOME=/path/to/miniconda3/envs/env_vllm/lib/python3.12/site-packages/nvidia/cu13export PATH="$CUDA_HOME/bin:$PATH"export LIBRARY_PATH="/usr/lib/wsl/lib:${LIBRARY_PATH:-}"export VLLM_USE_V2_MODEL_RUNNER=0vllm serve \ gittensor-model-hub/Qwen3.8-27B-NVFP4-RTX5090 \ --host 0.0.0.0 \ --port 8000 \ --served-model-name qwen3.8-27b \ --seed 0 \ --tensor-parallel-size 1 \ --trust-remote-code \ --max-model-len 163840 \ --kv-cache-dtype fp8 \ --gpu-memory-utilization 0.85 \ --max-num-seqs 2 \ --max-num-batched-tokens 8192 \ --enable-prefix-caching \ --enable-chunked-prefill \ --reasoning-parser qwen3 \ --default-chat-template-kwargs '{"preserve_thinking":false,"reasoning_effort":"medium"}' \ --enable-auto-tool-choice \ --tool-call-parser qwen3_xml \ --generation-config vllm \ --override-generation-config '{ "temperature": 0.8, "top_k": 40, "top_p": 0.95, "min_p": 0.05, "repetition_penalty": 1.0 }'The environment is the quiet half of this recipe. `env_vllm` is a pinned conda environment, Python 3.12.14, vLLM 0.29.0, and torch 2.13.0+cu130, and I keep its own recipe beside the launch script: a conda environment file, a requirements lock exported from the working machine, and a setup script that rebuilds the environment and runs a torch and vLLM version check. The `CUDA_HOME` and `PATH` exports put the conda environment’s own CUDA toolkit on the load path, the `LIBRARY_PATH` export is the WSL piece, and `VLLM_USE_V2_MODEL_RUNNER=0` pins the launch to the non-v2 model runner.Here’s why the memory numbers matter on this box: the card also drives my Windows desktop, so I had to leave VRAM available for normal work, including video calls. I changed the memory budget and the context ceiling after diagnosing a severe slowdown. The observations and the before-and-after rates are in the comparison section.The Radeon R9700: llama.cpp on UbuntuOn the 32 GB Radeon workstation running native Ubuntu, I served `Qwen3.8–27B-UD-Q4_K_XL.gguf` with llama.cpp and its Vulkan backend.The biggest shortcut here was the boxwrench/R9700 research program, especially its Qwen3.8 experiment log and parameter sweep. It documented a working llama.cpp/Vulkan recipe and native MTP settings. I adapted that starting point to my host, checked the local GPU index, and selected `Vulkan0`.My llama.cpp setup offloads the model to `Vulkan0`, uses a 163,840-token server context, F16 key and value caches, one parallel slot, and Qwen’s native MTP speculative-decoding path. The core of the command looked like this:./build/bin/llama-server \ --model /path/to/Qwen3.8-27B-UD-Q4_K_XL.gguf \ --mmproj /path/to/mmproj-BF16.gguf \ --alias qwen3.8-27b-r9700 \ --host 0.0.0.0 \ --port 8080 \ --device Vulkan0 \ -ngl 99 \ --parallel 1 \ --threads 6 \ --ctx-size 163840 \ --ubatch-size 512 \ --flash-attn on \ --cache-type-k f16 \ --cache-type-v f16 \ --kv-unified \ --spec-type draft-mtp \ --spec-draft-n-max 2 \ --spec-draft-p-min 0.3 --jinja \ --metrics \Those flags match the `llama-r9700` service unit I now use, including the separately downloaded vision projector. The unit runs as the `procurevue` user, loads environment variables from `/etc/procurevue/llama-r9700.env`, requires `tailscaled.service`, and restarts the server after failures. The credential is omitted here.One process note that saved me time: I first ran the serving command interactively and confirmed that the authenticated `/v1/chat/completions` endpoint answered a short request. When an initial service attempt exited immediately, its status and journal were much easier to interpret, because I already knew the command could start.Making the AMD host usable from other machinesI put the server behind `systemd`, gave it an API key, and connected DSH clients over Tailscale at a host address of the form `http://:8080/v1`. The unit’s `Requires=tailscaled.service` ties startup to that connection. The Ubuntu firewall permits TCP 8080 on the Tailscale interface and denies ordinary access to that port. The result: collaborators run DSH locally, and the model stays on the Ubuntu host.I also learned to test the path in layers. First, can the model answer a local authenticated `curl` call? Second, can another machine reach the authenticated endpoint over the intended network? Third, does DSH send a request that this server and model can actually handle?And a 401, by the way, can be good news. An HTTP 401 without the key means the service is alive and enforcing authentication. It is not the same failure as a connection timeout. Knowing the difference saved me a lot of late-night guessing.PluginsHere is how the three plugins plug into DSH, and where each one runs:Plugin mermaid diagramThree plugins, three integration mechanisms: Superpowers is pure configuration, Brave is an external API called from the client, and GenOffice is a local process DSH supervises. The model never sees a plugin; it sees the plugin’s results as ordinary context in its prompt.An API endpoint gives DSH a model. What it does not provide the model is a development process, up-to-date information, or reliable ways to work with Office files. Those capabilities live in the harness and its plugins.That distinction matters when switching from Spark to the 5090 or the Radeon: I can change the inference host without rebuilding every tool and workflow around it. But each DSH client still needs its own plugin configuration, and, as the next sections show, that’s where things get fiddly.SuperpowersI use a DSH adaptation of Superpowers as the default agent preset for coding work. The upstream project supplies a repeatable progression through understanding a request, planning, implementing, running tests, and reviewing the result. Qwen does much of the day-to-day investigation and code work locally; the structure helps keep an agent session from becoming a long sequence of unexamined edits. It is a workflow choice in DSH, not a feature installed on the GPU server.The completed coding example in “Did the agent actually work?” below shows this workflow in practice: a delivered reporting feature, new tests, and an independent check of the resulting values.I am developing an extension that would send a completed plan or implementation to an independent frontier-model reviewer, then have the local agent address specific findings and recheck the work. The design allows a reviewer to inspect code and local data, run tests, and use scratch probes when a claim needs verification. The automated loop is still in development. I’m not going to describe its end-to-end behavior as deployed and validated when it isn’t. The intended division of labor is clear: local Qwen handles sustained execution, while an independent reviewer challenges assumptions at consequential checkpoints.#### Compaction is a second job, not necessarily a second modelLong agent sessions accumulate a lot: messages, code, test output, web results, and subagent responses. DSH’s compaction subsystem can summarize older context when it approaches the configured limit. I defined a distinct logical provider for that job, with reasoning disabled and a smaller output budget.The reason the setup exists is a failure I hit: the context window spilled over during compaction. The conversation outgrew the window while the summary job ran, and the summary job itself ran out of output budget, so the summary came back truncated. I fixed it by making compaction a first-class job: a dedicated summary provider for each inference route with an explicit 16,384-token output budget, and one nested compaction policy per provider-and-model pair. The “Setting up DeepSeek Harness” section below shows that setup in full.Here’s the part that surprised me a little: on the model hosts, both logical providers point to the same `llama-server` process and the same model alias. There is no need to load Qwen twice just because DSH has two roles for it. Compaction did run during my coding sessions. One exported Spark session records six summaries, each sent to `dgx-spark-1e8a-summary` with `maxTokens: 16384`.One more error, because it was the same shape of failure on the normal generation route: “Output token limit reached.” DSH ends a response when generation hits the output budget declared for that provider, and the ordinary AMD provider was declaring limits that did not match what the server actually runs. The fix: `contextWindow: 163840` and `maxTokens: 32768` on that provider, with the summary provider declaring the same context window and its own `maxTokens: 16384`. Two different problems, two different fixes: one sets how much the normal route is allowed to write, the other sets which route compaction takes.Brave web searchA local model’s weights are a snapshot. For current library behavior, documentation, and troubleshooting, I gave DSH a web search provider powered by the Brave Search API.In my setup, that involved three distinct pieces: one, a Brave plugin in the DSH web profile; two, a `BRAVE_API_KEY` available to that process; and three, the web profile selecting Brave as its `searchProvider`. Adding the key by itself did not switch the provider. At one point, a configuration dump still showed `deepseek-official`.Setting up DSH on one of my analysts’ machines made that separation concrete. DSH could reach the AMD model via Tailscale, but the initial web search failed. The missing step was updating `profiles/web/cordis.patch.yml` to select Brave as the web profile’s `searchProvider`. Once I made that change, Brave search worked on his machine. Lesson: the inference endpoint and the web-search provider are configured independently. DSH’s web subsystem documentation describes that provider-selection layer.GenOfficeThe third piece is document work. For my actual business use, an agent needs to read and edit spreadsheets, Word documents, and presentations, then inspect what the files look like after rendering. GenOffice offers CLI and MCP operations for Office formats, PDF, and document rendering. The GenOffice project documentation describes those capabilities. I connected its tools to DSH as part of the coding workflow.The web profile patch registers `/usr/bin/genoffice` as a local MCP server using its `mcp` command over standard input and output. A later session used it to read and render an 18-slide presentation, while other tools in the DSH session were used to edit embedded screenshots and check OCR. In one task, the agent had to sanitize all client data from the 18-slide deck. It chose how to do so and ran multiple tests pre- and post-work to ensure full coverage.The rendered deck also made image input relevant to this workflow. The server-side changes and image tests are covered in the comparison section.Setting up DeepSeek HarnessThose plugins need a home. This section is the DSH side of the setup, in files: one settings file that names every inference host, one agent preset that carries the Superpowers workflow, and one profile patch that turns on Brave search and GenOffice. Everything below is a sanitized copy of what my install actually runs.One settings file, every inference hostDSH’s settings file keeps one provider per inference host, and every local host gets a twin ending in `-summary` for the compaction job. The model setup, in part:llm-pi-ai: providers: openai: apiKeyEnv: OPENAI_API_KEY models: - id: gpt-6-astra retryPolicy: mode: normal maxRetries: 0 spark-vllm: displayName: DGX Spark vLLM apiKeyEnv: SPARK_VLLM_API_KEY api: openai-completions baseURL: http://:8000/v1 models: - id: nvidia/Qwen3.6-35B-A3B-NVFP4 name: Qwen3.6-35B-A3B - id: qwen3.8-27b name: Qwen3.8-27B-spark1 contextWindow: 262144 maxTokens: 32768 input: [ text, image ] spark-vllm-summary: displayName: DGX Spark vLLM - Compaction api: openai-completions baseURL: http://:8000/v1 reasoning: off compat: supportsReasoningEffort: true models: - id: qwen3.8-27b name: qwen3.8-27b Compaction contextWindow: 262144 input: [ text, image ] reasoningEfforts: off: none high: high apiKeyEnv: SPARK_VLLM_API_KEY tailscale-amd-ai-1: apiKeyEnv: TAILSCALE_AMD_AI_1_API_KEY api: openai-completions baseURL: http://:8080/v1 models: - id: qwen3.8-27b-r9700 name: qwen3.8-27b-r9700 contextWindow: 163840 maxTokens: 32768 input: [ text, image ] tailscale-amd-ai-1-summary: apiKeyEnv: TAILSCALE_AMD_AI_1_API_KEY api: openai-completions baseURL: http://:8080/v1 reasoning: off compat: supportsReasoningEffort: true models: - id: qwen3.8-27b-r9700 name: qwen3.8-27b Compaction contextWindow: 163840 maxTokens: 16384 input: [ text, image ] reasoningEfforts: off: none high: highagent-default-model: provider: tailscale-amd-ai-1 model: qwen3.8-27b-r9700agent-presets: default: superpowersI dropped the file’s `ui-onboarding` version stamp from this copy, and the two Spark LAN addresses are placeholders. Everything else reads as the file does.A few things to notice. Credentials are referenced by environment variable name; the keys themselves never sit in the file. The summary providers are the compaction section made into configuration: same host, same key, `reasoning: off`, and their own output budget. The `pv5-vllm` pair is the 5090’s local vLLM, and its `127.0.0.1` address is the loopback case from the diagram. The `tailscale-amd-ai-1` pair is the Tailscale case. The 5090 and AMD summary providers declare a 16,384-token output cap here, and the policy section below carries that number to every host. `input: [text, image]` on the AMD ordinary provider is the capability line that the vision section describes. The `openai` entry is the frontier-model route, kept for the reviewer work that is still in development. The Qwen3.6–35B line on the first Spark is the earlier model from the first attempts. And `agent-default-model` points ordinary generation at the AMD host, while `agent-presets: default: superpowers` starts every new session on the Superpowers workflow instead of the bare standard agent.The superpowers agent presetThe preset lives under DSH’s `.agent-presets` directory, and its identity file is three lines:name: Superpowersdescription: The standard coding agent plus the Superpowers skill library, brainstorming, TDD, systematic debugging, plan writing and execution, and code review. Skills travel with this preset.order: 5The weight of the preset sits in its `agent.cordis.yml`. It mounts the standard coding toolset: shell, filesystem, background jobs, goals, plan mode, subagents, workflows, todos, and the web tool. The two rows that make it Superpowers are the skill mount:- id: skill-filesystem name: '@deepseek-ai/dsh-skill-filesystem' config: customSkillDirs: - !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"- id: tool-skill name: '@deepseek-ai/dsh-tool-skill'The `customSkillDirs` row points the skill registry to the `skills/` folder that ships with the preset, so the library resolves to wherever the preset is installed. `tool-skill` provides the agent with the catalog and the loader. The other half of the mechanism is the preset’s persona prefix, which starts with `You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.` and then embeds the full `using-superpowers` bootstrap, the text that makes the agent check for a relevant skill before it acts. Standard agent, bundled skill library, and a persona that cannot skip the skill check.One final row in that file wires in the plan-and-task-review plugin, the reviewer loop still in development above. I am not showing that block here, because it carries project paths I do not publish.The compaction policy changeThe compaction section above is the why: the context window spilled over during compaction, and the fix is the setup below. Here is that setup, as the file now reads under the preset’s compaction group:- id: compaction name: cordis:group group: true isolate: compaction: true toolResultPruner: true config: - id: compaction-basic name: '@deepseek-ai/dsh-compaction-basic' config: # Default/fallback compaction target summarizationProvider: tailscale-amd-ai-1-summary summarizationModel: qwen3.8-27b-r9700 modelPolicies: # When the conversation is running on the AMD R9700 - provider: tailscale-amd-ai-1 model: qwen3.8-27b-r9700 summarizationProvider: tailscale-amd-ai-1-summary summarizationModel: qwen3.8-27b-r9700 maxTokens: 16384 thresholdRatio: 0.70 # When the conversation is running on PV5 / 5090 - provider: pv5-vllm model: qwen3.8-27b summarizationProvider: pv5-vllm-summary summarizationModel: qwen3.8-27b maxTokens: 16384 thresholdRatio: 0.70 # When the conversation is running on a DGX Spark - provider: spark-vllm model: qwen3.8-27b summarizationProvider: spark-vllm-summary summarizationModel: qwen3.8-27b maxTokens: 16384 thresholdRatio: 0.70 # When the conversation is running on a DGX Spark - provider: dgx-spark-1e8a model: qwen3.8-27b summarizationProvider: dgx-spark-1e8a-summary summarizationModel: qwen3.8-27b maxTokens: 16384 thresholdRatio: 0.70The group also carries the `/compact` command and a tool-result pruner that truncates oversized tool outputs. The structure is the whole lesson: a fallback target for when nothing matches, and one nested policy per provider-and-model pair, each pointing compaction at that host’s summary provider with a 16,384-token output cap. That is the cap the Spark session export shows in its six summaries.The web profile patch: Brave and GenOfficeOne more file does two jobs. It is the patch layer for the DSH web profile, applied after every bundle layer:# Your patch layer for this dsh profile, applied after every bundle layer:# a top-level YAML array of loader patch entries (id-targeted config# overrides, disables, and insert lists; `!!js` expressions allowed).- id: web name: '@deepseek-ai/dsh-web' config: searchProvider: brave- insert: - id: mcp-genoffice name: '@deepseek-ai/dsh-mcp-client' config: serverName: genoffice transport: stdio command: /usr/bin/genoffice args: - mcp toolCallTimeoutMs: 120000 failOnStartupError: trueThe first entry is the second machine install lesson in file form. The key was present, the model was reachable over Tailscale, and search still failed until `searchProvider: brave` put the web profile on the Brave route. The second entry is the GenOffice path: a local MCP server over standard input and output, a 120-second tool-call timeout, and a hard fail if the server does not start. One profile patch, two capabilities, and no changes to the inference hosts.Comparing the setups and resultsDid the agent actually work?I’ve used this setup as my main coding agent since September 5th (24 days so far), and it has roughly 50M output tokens on it this month. The work: feature development, re-engineering, experiment analysis, client research and call prep, powerpoints, and an EDA task. On quality, I’ll be honest: it reminds me of Codex circa October 2025. The code it writes is generally good, and it can reason across large codebases and complicated structures. But compared to the current Claude Code and Codex offerings, this setup needs more architectural review.Let me start with the honest version: Qwen3.8 27B completed useful coding and Office-document work in this environment. I have not measured its accepted-task success rate or established parity with Claude Code or Claude Cowork. Those are separate claims, and throughput alone answers neither of the quality questions.Here’s what the agent actually did, in two saved sessions.In one coding session, I asked the agent to add spend, first and last purchase dates, transaction count, and distinct purchase-order count to a New Vendors exception report. After we agreed on the design, it created a branch, updated the aggregation, added three tests and documentation, and committed the result. The feature test first failed due to the missing field, exactly as it should have, and then passed. The full suite finished with 19 passes and four failures; the agent reproduced those four failures with its change stashed, confirming they already existed in the baseline. Because the sample report had no new vendors, it also ran an independent value check against 305 generated report rows. That is evidence of a delivered feature with validation, not just a plausible-looking patch. Later on, we tested this ourselves and pushed the feature to production with no further changes.In a separate GenOffice workflow, the agent sanitized names and part numbers in an 18-slide training presentation, including text embedded in screenshots. Its final checks reported 43 blurred regions across 12 screenshots, a second pass on boxes that clipped characters, and no remaining target strings in its OCR check. An independent package comparison found 12 changed embedded PNGs across 11 slides, with slide layout and editable text unchanged. The source presentation remained untouched. GenOffice supplied document reading and rendering; other tools handled image editing and OCR. One embedded image format could not be visually inspected by the available tools. So this is a completed task with a documented verification limit, not proof of exhaustive sanitization.Now the caveat, and it matters. These are two selected completed examples, not a scored sample of every attempt. I do not have a denominator of accepted, rejected, abandoned, and reworked tasks from which to calculate a reliability percentage. Nor were these tasks replayed under a fixed protocol on every host, or against Claude Code/Cowork. A useful follow-up would run the same task set with explicit acceptance checks and record accepted-result rate, human interventions, retries, elapsed time, and actual cost per accepted result.So I read the comparisons along three axes:- Quality: useful results demonstrated on specific tasks; comparative reliability and quantization-related quality loss remain unmeasured.- Throughput: the 5090 was fastest in the recorded long coding sessions, with different checkpoints and serving settings across hosts.- Cost: hardware, power assumptions, and token-price scenarios inform capacity planning; they do not establish cost per accepted task.Serving recipes and memory fitThe three machines share a model family and an API shape. What differs (the checkpoint, runtime, cache, and context settings) is in the table:https://medium.com/media/7a371004a8bf161672cb8a4df9f4923a/hrefA few reading notes before you take numbers from that table. The headline row reports my observed average generation rates during coding sessions lasting more than three hours, including multiple compaction events. That describes sustained DSH use. Tool execution and the work an agent chooses also affect task completion time. The next row records the prompt-processing rates I see on Spark and the R9700. The 5090 figures are vLLM reporting intervals: one with two concurrent requests, the other an isolated large prefill, so they do not provide a steady DSH prompt rate directly comparable to the other two. The other rows are recorded recipes, not a simultaneous live snapshot of all three servers. The September 18 judge sweep used different settings and concurrency from the agent recipes in this table.One more thing worth flagging: the selected 5090 checkpoint’s current model card says its built-in MTP head was removed, and the revised 5090 script does not enable speculative decoding. The Unsloth checkpoint used in the judge comparison has MTP weights, and the AMD GGUF uses llama.cpp’s native draft path. Checkpoint revisions and runtime settings belong beside any performance claim. I intend to keep them there.Why these quantizations?The governing constraint on the 32 GB cards was usable KV-cache capacity after loading the model, with space left for runtime overhead and, on the 5090, the Windows desktop. Do the math: a nominal 27-billion-parameter model at two bytes per parameter would require about 54 GB for weights alone in FP16/BF16, before cache or runtime overhead. Fully GPU-resident FP16/BF16 was therefore not a practical target on either single 32 GB card.Spark’s larger unified memory makes its capacity question different. I used the recorded Unsloth NVFP4 recipe there as a working starting point, not because I had demonstrated that it was Spark’s quality-optimal format.The 5090 measurements made the choice of checkpoint concrete. In the 16K judge setup, the Unsloth NVFP4 build loaded 21.26 GiB of weights and left 3.04 GiB for KV cache, roughly 36,548 KV tokens. The 5090-oriented ModelOpt build loaded 16.19 GiB, leaving 9.26 GiB for KV cache and about 186,006 KV tokens in that test. Those measurements explain why I selected the smaller build for long agent sessions. Keep in mind that they are configuration-specific cache capacities, not guaranteed context lengths for every launch recipe. And `--max-model-len` sets one request’s combined input/output ceiling; it does not create KV capacity for concurrent requests.On the Radeon, Q4_K_XL GGUF was the working llama.cpp/Vulkan format in the R9700 research I adapted. It gave me a practical starting point for the later configuration with F16 KV cache and a separate vision projector. I did not run a systematic sweep of larger and smaller GGUF quantizations, so I cannot call Q4_K_XL the best quality/speed trade-off for this card. Weight quantization, KV-cache precision, and speculative decoding are separate choices, and all three belong in the recipe.One more honest line: I also did not run a controlled evaluation of NVFP4 or Q4_K_XL against FP16/BF16. The completed coding and document tasks demonstrate utility, but do not establish that aggressive quantization preserved full reasoning quality. Likewise, the MTP output differences discussed below show differing outputs, not which output is better. These results describe the complete serving configurations I used, rather than isolating a GPU or quantization effect.Purchase cost, power, and coding throughputA purchase comparison needs a consistent denominator, so here are mine. I built the R9700 machine from components bought at the Charlotte, North Carolina, Micro Center on September 21, 2026, for $4,080.17 including tax. I assembled it myself. I bought two DGX Sparks during the 2025 preorder sale at $4,000 plus tax each. The throughput below is for one Spark, not the combined throughput of the two. I built the 5090 machine originally as a 5070 PC for $1,800 in early 2025. In April 2026, I paid $3,699 for the 5090 and $229 for a replacement power supply, $3,928 plus tax at my local Micro Center. My known gross cash spending on that box across both stages is therefore $5,728 plus the upgrade’s tax.https://medium.com/media/53b7468573dd8fda2a2477bffad70fe6/hrefRead the table like this. These rates are the long DSH coding-session averages described above, over three hours and multiple compactions. The What I paid row records my spending; the replacement row estimates the cost of one whole machine in Charlotte as of September 28, 2026. The coding tok/sec per $1,000 row divides observed coding throughput by the estimated tax-included complete-machine replacement cost in thousands of dollars. Note that the AMD and 5090 throughput-per-dollar ranges overlap, so small differences do not settle a ranking. My own assembly time is not priced into either build. The historical Spark purchase worked out to 4.75–6.00 tok/sec per $1,000 before tax. The 5090 box works out to 11.35–12.92 tok/sec per $1,000 of gross cash spent before upgrade tax using the $5,728 across both purchase stages; adding the upgrade tax lowers that rate. That figure counts the original 5070 build and does not subtract any resale or reuse value for the displaced card. The $3,928 plus tax upgrade alone is not a complete machine price.Where do the replacement estimates come from? For a new Spark, NVIDIA’s $4,699 Founders Edition MSRP becomes about $5,087 at the current 8.25% Mecklenburg County sales-tax rate. The AMD receipt is only one week old, so its $4,080.17 tax-included total is the best available proxy for replacing the same build; I have not repriced each component or checked present inventory.For the 5090, I have recently seen cards near $4,700 at Micro Center when listed. That is my observed card-price allowance, not a verified live offer or guaranteed stock. I model a full replacement with that card, a $229 1,200 W PSU, 64 GB (2 × 32 GB) DDR5 at $900–$1,200, a current CPU at $300–$600, motherboard at $150–$350, 2 TB SSD at $150–$300, case and cooling at $200–$400, and Windows at $140–$170. Current 64 GB DDR5 listings illustrate why RAM deserves its own substantial allowance. The other non-GPU part allowances are planning assumptions for a capable desktop, not the exact specifications of my existing 5070-based box. The parts sum to $6,769–$7,949 before tax, or roughly $7,300–$8,600 with Charlotte tax, excluding assembly labor and monitors. A comparable Micro Center RTX 5090 / 64 GB / 2 TB desktop configuration establishes the component class, but I did not use it as a price quote.Now the power figures. I want to be clear that these are rough estimates for active inference, not measurements. The 5090 box has a 1,200 W PSU and a card rated at about 600 W; during agentic coding, I see 95%+ GPU utilization. For planning, I assume about 350–580 W at the card, 40–100 W for the CPU, and 30–70 W for the rest of the box, divided by 88–93% PSU efficiency. That gives roughly 450–850 W at the wall. The R9700 box has a 1,000 W PSU and a 300 W board-rated GPU. Assuming 200–300 W at the card, 35–95 W for the CPU, 25–60 W for the other components, and the same PSU-efficiency band gives roughly 280–520 W at the wall. These component allocations and efficiency bands are my assumptions, not readings from either PC.Two things people mix up. A PSU’s 1,200 W or 1,000 W rating describes available capacity, not the electricity the computer continuously consumes. And NVIDIA’s definition of GPU utilization is the time with GPU work executing, not a percentage of rated board power. The Spark’s ~100–220 W range is an even rougher planning allowance beneath NVIDIA’s specified 240 W peak total-system figure, not a reading from my Spark.If the machines drew those estimated watts while generating at the observed rates, the implied output per kilowatt-hour would be approximately 0.31–0.86 million tokens for Spark, 0.26–0.57 million for the R9700, and 0.28–0.59 million for the 5090. Those broad ranges overlap and omit idle time, tool calls, prompt processing, and the fluctuating GPU load during an actual three-hour task. They cannot establish a reliable energy-efficiency winner. To replace the estimates, I would record average power at the wall or a metered UPS while each whole machine runs a representative DSH workload, then calculate output tokens per joule as tok/sec ÷ watts or energy per million output tokens as watts ÷ tok/sec × 1,000,000 ÷ 3,600,000 kWh for a measured generation interval.Three-year cost against my cloud bills and API tokensThis is where my actual spending changes the comparison. Before moving most of my coding work to my two Sparks at the beginning of September 2026, I averaged about $500 per month in overage charges on Claude Code and Codex. Since the switch, I have incurred one $35 overage charge.I’ll be straight with you about what that is: an observed before-and-after change over less than a month. Not a measured three-year saving. The R9700 and 5090 figures below show what it would cost to buy those machines for the same role; the two-Spark setup is the one I observed to be connected to my lower cloud bill. I still use paid cloud services, and I have not established that my task mix, total work volume, or use of frontier models was identical in the two periods.The old overage rate, $500 × 36 months = $18,000, is a much more relevant spending baseline than the $720 cost of a $20/month subscription alone. If the future overage bill averaged $35 per month, the reduction would be $465/month, or $16,740 over three years. Again, the $35 was one charge since the switch, not an established monthly run rate, so those projections are conditional. I hold the Claude Code and Codex subscription fees constant on both sides because I have not stopped using them, and I do not have the full subscription bill here. Overage dollars also cannot be converted into an actual token count without the underlying usage and billing records.Now the volume. My September-to-date DSH session totals are approximately 50 million generated output tokens and 1 billion input tokens, cumulatively across sessions. My observed cached-input rate is about 92%, implying 920M cached and 80M uncached input tokens at this monthly scale. These are much better inputs for the exercise than my earlier arbitrary assumption of 1 M output per month.For a three-year run-rate scenario, I treat the month-to-date total as one month’s volume and hold it constant for 36 months: 1.8 billion outputs and 36 billion inputs. That is a projection, not three years of observed usage. The aggregate DSH counters do not identify how many tokens each host served, or whether a commercial API would achieve the same cache-hit rate.One trap I want to flag. The published Claude Pro plan still has no fixed included token allowance, and Claude Code shares its usage limits. Dividing $20 by 50M outputs yields a purely arithmetic $0.40/M, but it is not a demonstrated effective Pro price for this workload: the plan does not promise this token volume, and I have paid additional cloud overages. I cannot claim my DSH tokens are equivalent to its included quota.For electricity, I use $0.1516/kWh, the July 2026 North Carolina residential average reported by the EIA, held flat for three years; my actual rate could differ. I charge two complete Sparks to the actual Spark arrangement and one complete machine to each AMD and 5090 alternative. Each dedicated server is on for 26,280 hours over three 365-day years. Estimated idle draw is 25 W per Spark, 75 W for the R9700, and 120 W for the 5090; the active-inference watt ranges are in the preceding table. None are metered readings.Here’s how the bounds work. The low electricity estimate charges active power while generating 1.8B outputs at the fast end of the observed coding rates. For Spark and R9700 it also charges active power for the 8% uncached inputs at the fast end of their reported prompt rates, then idle power for the remaining time; the 5090 low end remains a decode-only floor, since its steady prompt rate is unknown. The high estimate charges the top active wattage for every hour each machine runs, providing substantial power for input processing and other activities. These are deliberately broad planning allowances, not an energy measurement of 36B input tokens. I assign all hardware and electricity to this workload, without residual value, resale proceeds, repairs, or my assembly time.https://medium.com/media/1f1063314666089f54266f2068332f12/hrefA note on the Spark column: it counts both servers, with the aggregate 50M outputs and 1B inputs divided equally as a modeling simplification. At 19–24 output tok/sec per Spark, each would spend about 289–365 hours/month decoding 25M outputs, out of an average 730 hours/month. At my reported 219–243 prompt tok/sec, fully processing each Spark’s 500M counted inputs would add roughly 572–634 hours/month per Spark. Added as separate phases, that is ~861–1,000 hours per Spark, beyond a month’s wall-clock capacity. Similarly, one R9700 at about 500 prompt tok/sec would need ~556 hours to process 1B inputs plus ~316–375 hours to decode 50M outputs, or ~871–931 hours before tools. Why does the math exceed a month? Because the exact sum is not a live throughput measurement, requests may share prefixes, prompt and decode work may overlap or be batched, and the reported rates and cumulative DSH counters may use different accounting windows. It is a capacity check, not a stopwatch.Now factor in the cache. With my observed 92% DSH cached-input rate, about 80M of the 1B monthly counted inputs are uncached. If that ratio applies to each host, fully processing each Spark’s 40M uncached inputs would take about 46–51 hours/month, or ~44 hours for all 80M on the R9700. Added to decode as separate phases, that is ~335–416 hours per Spark or ~360–420 hours for the R9700, before tool calls. This calculation assumes the reported prompt rates apply to uncached work and that locally cached inputs need no full prefill; DSH’s cache counter alone does not measure precise GPU time saved.Charging that uncached prefill at the low active-power estimate lifts the Spark pair’s decode-only electricity floor from ~$436 to ~$474, and the R9700’s from ~$652 to ~$702 over three years; the table includes those revised low values. For scale, a single Spark would need ~579–731 hours/month just for all 50M outputs. The 5090 logs provide 496.5 prompt tok/sec in one vLLM reporting interval and 8,164.4 in an isolated large prefill, not a stable DSH prompt rate; I cannot put a defensible 5090 input-hours estimate alongside the other two. Actual input work and wall-clock usage still matter before claiming a single AMD or 5090 host can replace the two-Spark workload.So what does payback look like against my historical cash outlay? The two Sparks cost $8,000 plus purchase tax together, the R9700 $4,080.17 tax included, and the 5090 box $5,728 plus the upgrade’s tax, before electricity. The 5090 figure includes its original 5070 build and gives no credit for the displaced GPU. At a hypothetical continued $465/month reduction in overages, replacement hardware plus this broad electricity allowance implies a rough cash payback of 22–25 months for the two Sparks, 9–10 for one R9700, and 17–23 for one complete 5090. The AMD and 5090 paybacks assume that one host can complete the work the two Sparks currently serve at acceptable quality. Remember: only the initial two-Spark before-and-after spending change has been observed; the three-year workload, costs, and paybacks are projections.Now, let’s put the posted cloud API prices on the table. The observed 1B-input-to-50M-output ratio means 20 input tokens per output token. The table prices the full monthly aggregate under two cases: no input-cache hits and 92% billed at each API’s cached-input rate, matching the ratio reported by my DSH sessions. The second case contains 80M uncached input tokens + 920M cached input tokens + 50M output tokens each month. One caveat before you read too much into the cache column: this 92% is an observed DSH rate, but transferring it to another provider’s billing is a scenario, not a guarantee: cache eligibility, cache writes, expiration, prompt structure, and tokenization can all differ. The cost per million outputs includes its 20M associated inputs. These are September 2026 standard API prices (and DeepSeek’s peak rates); separate cache-write fees, tool fees, taxes, and commercial discounts are excluded.https://medium.com/media/0ca2e5e82fa09ac5fd362934d8e9f16d/hrefLet me say the big caveat out loud. The frontier-model columns are not an apples-to-apples comparison of the cost of doing the same work. In my DSH coding sessions, the 27B Qwen model often generates substantial visible reasoning to work through tasks for which Claude Opus 5.5 shows little or no comparable reasoning in the Claude Code TUI. That is an observation about what the interfaces show, not evidence that Opus performs no internal reasoning, or that its billable reasoning tokens would be zero. It does mean I should not treat Qwen’s 50M observed output tokens as the number of Opus output tokens required to complete my September tasks. Prompt construction, context replay, tool calls, compactions, model tokenizers, cache behavior, and the number of attempts can all differ. What the table actually answers is the narrower question, “What would these API rate cards charge for the same counted input/output volume and assumed billable cache rate?” A comparison of real cost per completed coding task would replay comparable work in each agent, check the accepted result, and record actual billed tokens, elapsed time, and cloud overages.Notice how far the modeled API comparison falls below the no-cache row. The observed 92% DSH cache-input rate is doing that work. DeepSeek also publishes half-price off-peak rates; for example, V4 Pro at the same assumed 92% billable cache rate would be about $172/month, if every request qualified. Two more honesty notes. The $500/month I formerly spent on Claude Code and Codex subscription overages is not an API quote for my 1B/50M DSH usage; it covered different products, models, tokenizers, billing rules, and allowances. And the 36-month API totals hold today’s rates and September’s workload constant; they are not price commitments. Billing exports with cache reads and writes, DSH per-provider token counts, meter readings, and my electric tariff would tighten the estimate.Vision paths for document workHere’s a distinction that matters: rendering an Office file and sending its images to Qwen are separate capabilities.On the 5090, an earlier vLLM recipe included `--language-model-only`, which disables multimodal inputs; the revised script omits it. On the Radeon, the language-model GGUF needed the matching Unsloth `mmproj-BF16.gguf` projector, downloaded separately and loaded with ` --mmproj`. llama.cpp documents that separate the projector path.The DSH side had its own wrinkle. The model entries also needed `input: [text, image]` to allow image requests. That change got an early image request past DSH’s capability check, but it then failed when loading the image downstream. A later DSH Office session used image-reading tools on presentation screenshots; the export does not establish that those images went through this Qwen provider’s multimodal route.The 16K data-judge workloadI also tested Qwen as a data judge in one of our pipelines, by replaying the same 128 judging prompts on Spark and the 5090. Each run used a 16,384-token context ceiling and a 12,000-token output allowance per request. Aggregate output throughput here means all output tokens divided by elapsed time from the first request to the last response.With the same Unsloth NVFP4 checkpoint and MTP enabled on both hosts, Spark reached 208.8 tokens/sec at 64 concurrent requests; the 5090 reached 374.6 at 16, its best measured setting for that checkpoint. Those are each host’s measured peak at different concurrency levels, so the roughly 1.8× ratio describes those serving configurations, not a fixed-concurrency race. Both runs completed all requests without truncation or failure.The 5090-oriented ModelOpt checkpoint reached 541.4 aggregate tokens/sec at 64 concurrent requests, and throughput was still climbing when the sweep stopped. That run used a smaller checkpoint and no MTP, so its 2.6× ratio to Spark compares different checkpoints and serving recipes. These are aggregate results with enough parallel judging work to fill the GPU. None of them measures a single DSH coding session. An older Spark figure of 372 tokens/sec came from a different workload and configuration, so I leave it out of this comparison.DSH sessions and MTPOn a DSH coding and planning task, the R9700 generated roughly 48–50 output tokens/sec with native MTP on. With MTP off, two runs measured 25.5 and 25.8, nearly half the rate. Repeated 5090 runs without MTP measured 65.7 and 77.0 tokens/sec on that task.The usual caveat applies: the agents took different paths through their tool calls and generated different amounts of text, so the rate ratio does not directly compare end-to-end completion time or plan quality. One quirk worth noting: turning MTP off also did not make the AMD runs produce identical outputs from the same prompt and seed.The independent boxwrench experiment found a narrower correctness issue: under its pinned llama.cpp build and greedy test, native MTP changed the output from the serial path. Its follow-up traced the difference to a recurrent-state snapshot path, without establishing which answer was more accurate. My response: I record MTP status beside each measurement, and I treat output consistency and answer quality as separate questions.AMD backend measurementsFor the AMD side, here’s what the boxwrench experiment log reports from a separate F16-KV text-generation test: 721.3 tokens/sec prefill, 53.82 tokens/sec decode, and 27.73 GiB of VRAM allocated. These are boxwrench’s measurements. That text workload does not benchmark my later vision-enabled command. Its Vulkan-versus-HIP comparison found HIP about 41.6% faster at prefill but about 11.6% slower at decode for its tested prompt shape. I kept Vulkan for this serving configuration. And to be fair to my own later experiments: they changed thread count and Flash Attention together and slowed my host, so they do not isolate either setting’s effect.Long-session stability on the 5090When VRAM contention with the Windows desktop gets so bad it crashes the Linux monitoring toolsThe 5090’s weakness in my arrangement was VRAM contention with the Windows desktop, especially during video calls. Here’s how it showed up. One DSH session began at around 77 tokens/sec and later averaged around 27, with a subagent at around 7. In troubleshooting, the card showed 32,049 MiB in use, nearly its entire capacity. Twice during Teams calls while the agent was running, the screen blacked out or flickered, Teams crashed, and the video failed on rejoining. The telemetry did not indicate thermal or power throttling.The decisive test: a short-request run that had fallen to roughly 10–11 tokens/sec returned to 82.8 after restarting only vLLM, with KV usage reported at just 1.7% in that test. That tied the severe slowdown to the serving process’s memory state and desktop GPU pressure, not simply to a long prompt.What happened, as far as I can tell: at `--gpu-memory-utilization 0.93`, vLLM reserved too much of the 32 GB card for other work on the desktop. When a video call added GPU demand, some serving states appeared to lose GPU residency, making inference dramatically slower; the tests did not isolate whether model weights, KV cache, or both were displaced.The fix was to give the card some room to breathe. I lowered the vLLM memory budget to 0.85 to leave room for Windows and video calls, and reduced ` --max-model-len` from 262,144 to 163,840 to keep long sessions within a safer ceiling. These are precautions against the diagnosed memory-pressure failure mode. Since making both changes, I have not recreated the severe collapse. The worst drop I have seen is roughly 83 to 52 tokens/sec. Fair warning, though: the 5090 still has more throughput volatility in my use than Spark or the R9700.What I would build againIf I were starting my local inference infrastructure from scratch today, I would build it around dual R9700 Ubuntu machines.The math is unflattering to the 5090 in my setup. My single-card R9700 delivered 37–44 tok/sec over long DSH coding sessions against 65–74 tok/sec for the 5090, but the complete AMD build cost me $4,080.17, against an estimated $7,300–$8,600 to replace the complete 5090 machine today. On those purchase figures, the R9700 is even to better on coding throughput per dollar: about 9.07–10.78 versus 7.55–10.10 tok/sec per $1,000 of current complete-machine cost. The 5090 is faster in a single coding session, while my 5090 desktop has shown greater speed fluctuations when competing GPUs are in use.The R9700 build already has the motherboard capacity and 1,000 W PSU for a second card. AMD supports multi-GPU R9700 systems, so I can add a second GPU to that platform as demand grows. I have measured only one R9700 in this build, and I would test whether the second card is best used for another independent agent/model instance or a distributed workload, rather than assume it doubles one session’s token rate. I would keep DSH and its coding and document tools on the client and serve inference from dedicated AMD hosts. That setup preserves the working path I now have from DSH to a local model and to GenOffice, with room to add capacity without replacing the whole machine.The API comparison puts that local-build preference in a financial context, and I’ll be honest that it cuts both ways. At my September DSH volume of 50M outputs and 1B inputs per month, applying the observed 92% cached-input rate to DeepSeek V4.1 Flash’s peak API prices gives about $90/month, or $1.79 per million outputs including their input costs. That is below the modeled $2.66–$3.42/M for one R9700, $4.51–$6.66/M for one 5090, and $5.92–$6.63/M for my two Sparks, each including estimated electricity and three-year amortization of a complete replacement machine. Even at peak pricing, a current-generation model served by a frontier cloud provider comes in below my locally served 27B Qwen on this token-cost model. DeepSeek’s off-peak rates could further reduce the API bill.So here’s the decision rule I would actually use. If the data and task can go to an external API, I would test DeepSeek V4.1 Flash in the same agent workflow first when cost is the deciding factor. The same 92% billable cache rate may not transfer, and Qwen spends substantial visible reasoning tokens on some jobs where a cloud model may generate a very different amount; I have not established Flash’s cost, quality, or speed per accepted task on my coding workload.But for client work that cannot be sent to an external provider, local serving changes what I can do: DSH with local Qwen lets me run substantially more agentic tasks against those client materials within our privacy restrictions. That practical access, alongside the R9700’s per-dollar throughput, is why I would build out local AMD capacity, even though Flash wins this specific token-price calculation.Reproducing this setupThe article is the package. Every load-bearing command and configuration file is inline: the Spark docker recipe in the Spark section, the 5090 launch script and its pinned environment in the 5090 section, the R9700 `llama-server` command and service unit in the AMD section, the topology in “Where the model and tools execute,” and the DSH configuration in “Setting up DeepSeek Harness,” including the model providers, the superpowers preset and skill mount, the compaction group, and the web profile patch. The test procedures that the results depend on are in the AMD and vision sections.The inline examples are sanitized copies of the real files. User paths are redacted to `/path/to/…`, LAN addresses to placeholders like ``, and credentials are omitted or referenced by environment-variable name. The complete Superpowers preset is available upstream at [Superpowers](https://github.com/obra/superpowers); this article shows the changes.What is not inline, stated once. The complete preset file and the client datasets are not in the article. The coding and presentation examples are selected excerpts, not complete sessions. What is inline is enough to stand up the same three serving recipes and the same DSH configuration, and to check your own measurements against the ones in this article.So here’s the short version, for the people who scrolled straight to the end. The API boundary is what makes any of this easy. The measurements tell you which machine does the work, and which one your wallet prefers. And the honest caveats throughout, because there were a lot, are the difference between a field report and a press release. If your client work can’t leave the building, I hope the numbers here save you a few months of my trial and error.One Harness, One Agent, Three GPUs: Running Qwen on a DGX Spark, an RTX 5090, and a Radeon R9700 was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.