Blog Post

Apps on Azure Blog
23 MIN READ

Qwen3.8-27B on a Lenovo laptop: run it on RTX Spark, watch it in Azure Monitor

Wuyi_Weng's avatar
Wuyi_Weng
Icon for Microsoft rankMicrosoft
Oct 26, 2026

A review of the Lenovo Yoga 9n 2-in-1 (16", 11) as a machine for local coding agents: why 64 GB of unified memory makes a 27B model practical, what three hours of OpenCode traffic looked like on the dashboard, and how to set it up with vLLM and watch it in Azure Monitor and Azure Managed Grafana.

Updated October 30, 2026: the sample now runs vLLM 0.32 with async scheduling, 14% more decode steps a second on the code benchmark, and the memory bandwidth figure is corrected. See the update at the end.

In an earlier post I served Qwen3.8-27B from an H100 in Azure. The same model also runs on a laptop: the Lenovo Yoga 9n 2-in-1 (16", 11) with NVIDIA's RTX Spark N1X and 64 GB of unified memory. On a short code-generation benchmark it decodes 44.7 tokens a second for one request, and it holds the model's full 262,144-token context. Over three hours of an OpenCode agent reviewing two open-source repositories, it decoded replies at a steady 27 tokens a second per request, and the GPU averaged 41 W.

A coding agent needs three things from a local model: replies fast enough to wait for, room for the whole conversation, and a machine that runs cool and steady for hours. In my testing, the Yoga 9n delivered all three. This post reviews it for that job, shows what three hours of agent traffic looked like on the dashboard, and walks through the setup: Windows on Arm, Docker, vLLM, a speculative decoder that suits the hardware, and the monitoring that measured it all.

Disclosure: I work at Microsoft. Lenovo provided this laptop to Microsoft in July 2026 as a pre-release unit for software testing, and I used it for this post. Retail units may differ slightly.

At a glance

Verdict: the Yoga 9n 2-in-1 with RTX Spark is a practical machine for running a 27B coding model locally. Its 64 GB of unified memory holds Qwen3.8-27B, a draft model and the full 262,144-token context, and it served three hours of real agent work at a consistent speed and a modest power draw.

What I liked:

  • The model, its drafter and the full native context fit in the 64 GB configuration, alongside Windows.
  • 44.7 tokens a second on a short code benchmark and about 27 per request in a long agent session, with a median first token in 2–3 seconds while a conversation stays cached.
  • Sustained performance: 41 W of average GPU power, a 67 °C peak and a graphics clock near 2 GHz for three hours.
  • The GPU's share of the memory is a setting in the NVIDIA app, so you can give a large model room and take it back afterward.
  • The standard stack runs unchanged: Docker Desktop, the official vLLM ARM64 image, LiteLLM and OpenCode.
  • No hourly bill. The H100 VM from the earlier post costs $6.98–$10.12 an hour at the October 2026 pay-as-you-go price, depending on the region.

Good to know:

  • It suits one agent session at a time; many parallel subagents wait their turn.
  • Memory is shared with Windows, so give the model room while it runs.
  • The NVFP4 checkpoint is a preview release from Unsloth.

Who it's for: developers who want a capable coding model on their own machine, with the model's full context window and no per-hour or per-token bill.

The machine

 Lenovo Yoga 9n 2-in-1 (16", 11), as tested
UnitPre-release, provided by Lenovo to Microsoft in July 2026 for software testing
ChipNVIDIA RTX Spark N1X: 20-core Arm CPU, 6,144-core Blackwell GPU
Memory64 GB of LPDDR5X-9400, shared by the CPU and the GPU
SoftwareWindows 11 on Arm, Docker Desktop with Windows Subsystem for Linux (WSL) 2, NVIDIA's Windows driver

Lenovo sells it configured to order on Lenovo.com, and in the US, Best Buy carries two fixed configurations: the 20-core N1X with 64 GB, as tested, and an 18-core N1X with a 5,120-core GPU and 32 GB (Notebookcheck). For this model, choose the 64 GB configuration; the next section explains why.

Why it works for a 27B model

Three specs decide whether a laptop can run a model this size for real work, and the Yoga 9n has all three.

64 GB of unified memory. The CPU and GPU share one pool of memory. On this laptop 32,704 MiB of it is set aside for the GPU, which Windows shows as dedicated GPU memory, and Windows keeps 30.8 GiB for itself. The GPU's share holds the model and its draft model (23.35 GiB once loaded) and a KV cache big enough for one full 262,144-token request. Windows backs about 10 GiB more of GPU allocations with system memory, which it shows as shared GPU memory. A 32 GB laptop has half as much memory to share between Windows and the GPU, and this model's weights alone are 19.1 GB.

That split is a setting, not a fixed spec. In the NVIDIA app, Dedicated GPU Memory (GB) under System > Advanced sets how much of the unified memory the GPU gets, and a new value takes effect after a restart. That's handy for local models: give the GPU a large share while you serve a model this size, and give the memory back to Windows when you don't. I ran everything here with 32 GB for the GPU.

Memory bandwidth. To generate a token, the GPU reads every weight of the model. LPDDR5X-9400 on the 256-bit bus that press reports describe works out to about 300 GB/s on paper. A simple read test inside the model's container measured 229 GB/s while the model was loaded; re-run against dedicated GPU memory, it reads about 270 GB/s (see the update at the end). For this model that bandwidth sets the speed, as Step 3 shows.

4-bit weights in hardware. Blackwell GPUs compute in NVFP4, a 4-bit floating-point format. The NVFP4 checkpoint reads 19.1 GB of weights per decode step, where the FP8 weights took 31.1 GB (29.0 GiB) on the H100. vLLM runs it with native FP4 kernels (FlashInferCutlassNvFp4LinearKernel).

The software is ready too. vLLM's official image comes in a Linux ARM64 build with CUDA 13, and it runs unchanged in Docker Desktop's WSL 2 backend. The building blocks are the ones I used on the H100: vLLM behind a LiteLLM gateway, with OpenCode as the agent.

How I measured

The numbers in this post come from three different workloads, so read each one with its own conditions:

 Code benchmarkLong-prompt benchmarkAgent session
TaskThree code-generation prompts: a thread-safe LRU cache in Python with tests, a token-bucket rate limiter in TypeScript, and Dijkstra's algorithm in GoOne question about a prompt cut from the source and docs of my own lab repositoryOpenCode asked to review every file in microsoft/agent-framework and microsoft/TypeScript
Prompt36–40 tokens97,880 tokens, with a random first line so none of it came from the prefix cache19,000 to 115,000 tokens, resent on every turn and mostly cached
Reply512 tokens each, temperature 0, thinking off384 tokens, temperature 0, thinking offAs long as the agent needed, thinking on
How it was sentOne request at a time, straight to vLLMOne request, straight to vLLMThrough LiteLLM from a second machine, one request running at a time
Result44.7 tok/s decode, mean of three44.3 tok/s decode, 1,033 tok/s prefill27 tok/s decode per request over three hours

All three use the same model, drafter and quantization: Unsloth's NVFP4 checkpoint of Qwen3.8-27B, the DFlash 2 drafter quantized to FP8 and proposing seven tokens, an FP8 KV cache, and vLLM 0.31. What you're running and Step 2 give the details. The two benchmarks ran before I raised the context from 196,608 to the full 262,144 tokens; on the final profile the code benchmark measured 44.1 tokens a second. The sample's scripts/Invoke-SpeedBench.ps1 runs both benchmarks.

With speculative decoding, decode speed depends on how predictable the text is. Each decode step produced 5.04 tokens on the code benchmark and 3.3 in the agent session, where most of the output was reasoning. A tokens-per-second figure is only comparable with one measured on the same workload and the same speculative-decoding settings.

Three hours of real coding work

The session in these screenshots is real OpenCode traffic: an agent asked to review every file in two open-source repositories, microsoft/agent-framework and microsoft/TypeScript, run from a second machine on the same network through LiteLLM, from 22:52 to about 01:50 UTC.

For the first 32 minutes the agent worked in one conversation that grew from 19,000 to 77,000 tokens. That is the everyday case for a coding agent, and the Yoga 9n was quick and consistent through it:

  • Fast first tokens. The median time to first token was 2.1–3.3 seconds in each ten-minute window, because 92% of the prompt tokens came from the prefix cache.
  • Steady decode. Replies decoded at about 27 tokens a second per request, with 3.6 tokens produced per decode step.
  • Low power. The GPU averaged 30 W and peaked at 59 °C.

Agent traffic is harder than benchmark traffic. Over the whole session the model read 85 input tokens for every token it wrote, and 72% of the output tokens the gateway returned were thinking. Each step produced 3.3 tokens on average instead of the 5.04 it reached on the code benchmark in Step 3, because reasoning and prose are harder to guess than code. The first drafted token was accepted 71% of the time, the seventh 13%:

Even so, replies averaged 27 tokens a second per request across three hours of agent traffic.

Memory held steady

The GPU used 30.7 of its 31.9 GiB throughout, and Windows backed another 9.9 GiB of GPU allocations with system memory. Windows kept 3.5 GiB or more available, and with one request at a time the KV cache peaked at 51%. vLLM preempted no requests in three hours.

Cool and consistent for three hours

Over three hours of continuous agent work, GPU power averaged 41 W and peaked at 74 W. The temperature averaged 55 °C and peaked at 67 °C, and the graphics clock held near 2 GHz from the first hour to the last, with no sign of thermal throttling. That is a modest, stable power draw for sustained inference.

The setting that matters most: one request at a time

With two requests running at once, each request's decode steps share the GPU with the other request's 8,192-token prefill chunks, and two long conversations push each other's prefixes out of the cache. With one, a reply decodes at full speed and its conversation stays cached. I ran the same OpenCode task with each setting:

First 70 minutesTwo requests at a timeOne request at a time
Requests completed74111
Output tokens45K64K
Input from the prefix cache33%62%
Decode per request9.7 tok/s29.0 tok/s

One request at a time completed 50% more requests and 42% more output in the same time, and per-request decode held between 25 and 38 tokens a second. The agent's subagents don't run in a fixed order, so the two runs reached their busy phases at different moments; take the exact margin as indicative. A synthetic replay agrees on the direction for long conversations: two conversations of 135K and 90K tokens finished 2.8 times sooner with one request at a time. For six short conversations with 200-token replies, two at a time was faster (214 against 297 seconds), so if your agent sends many small requests, measure both.

What you're running

The rest of this post is the setup, step by step.

Qwen3.8-27B is a 27-billion-parameter dense model from Qwen under the Apache 2.0 license. My H100 post describes its architecture. The part that matters most here is its hybrid attention: 48 of its 64 layers keep a fixed-size state instead of a per-token KV cache, which is why a full-length context fits in 12 GiB.

Two checkpoints, both pinned to a revision:

  • The model: unsloth/Qwen3.8-27B-NVFP4 at revision 16b6615, Unsloth's Dynamic V3.0 NVFP4 quantization: 19.1 GB of weights. It's a preview release from Unsloth, not an official Qwen checkpoint, so treat quality and speed results as results for this checkpoint.
  • The draft model: incoai/Qwen3.8-27B-DFlash2 at revision 015e795, a 1.86B-parameter DFlash 2 drafter that proposes seven tokens per pass. vLLM quantizes it to FP8 when it loads.

Step 1: Prepare Windows

The stack runs in Docker Desktop with the WSL 2 backend, which runs an ARM64 Linux engine on this laptop. Install NVIDIA's current Windows driver and the NVIDIA app, set Dedicated GPU Memory (GB) to 32 under System > Advanced in the app, and restart. Then install Docker Desktop and cap the WSL virtual machine's memory in %UserProfile%\.wslconfig (the sample's config/wslconfig.example):

[wsl2]
memory=12GB
swap=8GB
autoMemoryReclaim=gradual

Run wsl --shutdown after changing it. autoMemoryReclaim goes under [wsl2] on WSL 3.x; WSL 2.0 took it under [experimental], which is where the first version of this post put it. The cap matters on unified memory. The GPU reservation and the shared GPU memory come out of the same 64 GB as Windows and WSL, so a VM that grows freely competes with the model. With 12 GB for WSL, Windows kept at least 3.5 GiB available through three hours of agent traffic.

Two habits help:

  • Stop the model before large downloads or image builds. They need memory of their own; pulling the weights while vLLM was running left Windows short of memory.
  • Let it start in peace. Free memory dips to about 1 GiB for a moment while vLLM captures CUDA graphs at startup, and then recovers.

Step 2: Serve the model with vLLM

The model image (images/vllm/Dockerfile) builds on vllm/vllm-openai:v0.31.0 and downloads both checkpoints into the image at pinned revisions, so the stack starts offline. The sample's compose.yaml runs vLLM and the LiteLLM gateway:

docker compose build
docker compose up -d

This is the serve command:

vllm serve /models/Qwen3.8-27B-NVFP4 \
  --served-model-name qwen3.8-27b \
  --quantization compressed-tensors \
  --trust-remote-code \
  --max-model-len 262144 \
  --kv-cache-memory-bytes 12616466432 \
  --gpu-memory-utilization 0.05 \
  --kv-cache-dtype fp8 \
  --block-size 64 \
  --max-num-seqs 1 \
  --max-num-batched-tokens 8192 \
  --enable-prefix-caching \
  --speculative-config '{"method":"dflash","model":"/models/Qwen3.8-27B-DFlash2","num_speculative_tokens":7,"quantization":"fp8"}' \
  --limit-mm-per-prompt '{"image":{"count":4,"width":1024,"height":1024},"video":0}' \
  --mm-processor-cache-gb 0.25 \
  --reasoning-parser qwen3 \
  --enable-auto-tool-choice --tool-call-parser qwen3_coder
FlagWhy
--quantization compressed-tensorsThe NVFP4 checkpoint's format.
--max-model-len 262144The model's native context window.
--kv-cache-memory-bytes 12616466432An 11.75-GiB cache: 740 blocks, 263,927 tokens, one full-length request. On unified memory an explicit size is more predictable than a share of "GPU memory".
--gpu-memory-utilization 0.05With an explicit cache size, vLLM uses this value for its startup memory check, not to size the cache. A low value keeps that check below the Windows GPU reservation.
--kv-cache-dtype fp8Half the bytes per cached token.
--block-size 64Needed for DFlash 2. Without it, vLLM pads the drafter's 64-token pages to the model's 1,648-token hybrid page, and a 196,608-token request needed 13.5 GiB of cache instead of 9.2.
--max-num-seqs 1One request at a time; others wait in the queue. This let the coding agent complete 50% more requests in the same time, as measured above.
--max-num-batched-tokens 8192The prefill chunk per step.
--enable-prefix-cachingReuses the cached prefix of a conversation, so each agent turn computes only what's new.
--speculative-configDFlash 2 drafts seven tokens in one pass. "quantization":"fp8" saved 1.73 GiB of memory and decoded slightly faster than BF16.
--limit-mm-per-prompt, --mm-processor-cache-gb 0.25Up to four images per prompt, with a small image-processing cache instead of the 4-GiB default, which vLLM keeps in two processes.
--reasoning-parser, --tool-call-parserThinking returned separately from the answer, and OpenAI-style tool calls.

When it's ready, the startup log reports 263,927 tokens of KV cache, 1.01 full-length requests.

Step 3: Make decode fast

On this laptop, decode speed is a question of bytes. Each decode step reads the model's weights once, and speculative decoding lets one step produce several tokens: a small draft model guesses ahead, and the big model checks all the guesses in the same pass. So:

tokens per second ≈ effective bandwidth ÷ bytes read per step × tokens accepted per step

I calibrated the effective bandwidth on the first setup I ran: 203 GB/s, 89% of the 229 I had measured, or about 75% of the 270 GB/s the GPU reads from dedicated memory (see the update at the end). With that, the formula predicted the DFlash 2 result within 3% before I measured it. The measurements are the two single-request benchmarks from How I measured, not agent traffic:

On vLLM 0.31MTP, 3 draft tokensDFlash 2, 7 draft tokens, FP8 drafter
Bytes read per step25.5 GB: the model, plus the MTP head and output layer three times~22.3 GB: the model, the drafter and the output layer once each
Tokens per step, code benchmark3.305.04
Predicted26.3 tok/s45.9 tok/s
Measured, code benchmark28.4 tok/s44.7 tok/s
Measured, 98K-token prompt benchmark29.4 tok/s44.3 tok/s

The model's built-in multi-token prediction (MTP) head reads the output layer once per draft token. DFlash 2 drafts its seven-token block in one pass, so each step reads fewer bytes and accepts more tokens. From the MTP setup I started with (26.4 tokens a second on vLLM 0.24) to DFlash 2 on vLLM 0.31, the code benchmark got 69% faster; the vLLM upgrade alone was worth about 8%.

Prefill, reading a new prompt, ran at 1,000–1,400 tokens a second on the 34K- and 98K-token benchmark prompts and slowed to 645 on a brand-new 240,000-token prompt, which took about six minutes to its first token. A follow-up turn that reused that prompt started in 4.9 seconds. Coding agents resend the conversation with every turn, so in practice the prefix cache does most of that work.

Step 4: Connect a coding agent

LiteLLM serves the model under a stable alias, local-llm, on port 4000, so clients don't change when the model does. This is the provider block for OpenCode, an open-source coding agent, from the sample's config/opencode.json; use 127.0.0.1 on the laptop itself, or its LAN address from another machine:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "litellm-local/local-llm",
  "small_model": "litellm-local/local-llm",
  "provider": {
    "litellm-local": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Local LiteLLM (Qwen3.8-27B)",
      "options": { "baseURL": "http://127.0.0.1:4000/v1", "apiKey": "none", "timeout": false },
      "models": {
        "local-llm": {
          "name": "Qwen3.8-27B (local)",
          "reasoning": true,
          "tool_call": true,
          "limit": { "context": 262144, "output": 16384 },
          "modalities": { "input": ["text", "image"], "output": ["text"] }
        }
      }
    }
  }
}

The context limit tells OpenCode when to compact the conversation, and the 16K output cap covered every reply in the three-hour session with room to spare: the largest used 7,300 tokens. LiteLLM binds to localhost by default and has no authentication of its own, so if you open it to your network (LITELLM_HOST_BIND in the sample's .env), restrict the port to a trusted subnet in Windows Firewall.

Before handing it real work, I checked it. A smoke test returned an exact answer, read an image and made a required tool call through LiteLLM; the sample's scripts/Test-LocalLlm.ps1 runs those three checks through the gateway. My local evaluation suites passed 15 of 16 basic cases, 4 of 5 large-context cases and 5 of 5 complex-reasoning cases, the same cases as the MTP setup on the same vLLM version. A needle placed at the very start of a 239,685-token prompt came back correct.

Step 5: Watch it

A server has memory of its own and a GPU with memory of its own. On this laptop one 64 GB pool feeds Windows, WSL, the GPU's share and the shared GPU memory Windows adds on top, so the signals that matter cross the line between the model and the operating system. The monitoring follows the earlier posts, adapted to Windows on Arm, and the sample has every piece of it.

What runs where

Windows on Arm
  nvidia-smi -> Export-NvidiaGpuMetrics.ps1, every 5 s -> textfile -> windows_exporter :9182
Docker Desktop (WSL 2)
  vLLM /metrics    LiteLLM /metrics/ and spans    OpenTelemetry Collector (linux/arm64):
                                                    scrapes all three every 10 s, receives the spans
                                                    |  OTLP, Microsoft Entra ID
                                                    v
Application Insights with OTLP support
  metrics -> Azure Monitor workspace -> Azure Managed Grafana dashboard, Prometheus alert rules
  traces  -> Application Insights
  • vLLM reports tokens, the prefix cache, the queue, KV cache usage and speculative decoding, down to how often each draft position is accepted.
  • LiteLLM reports what the gateway answered, and the sample's callback logs one line per request with its tokens, time to first token and status. When requests go missing, that is the count to compare with vLLM's. It also sends a span for every model call over OTLP.
  • windows_exporter reports the memory Windows has available and the GPU's dedicated and shared memory, as Windows sees them.
  • GPU power, temperature and clocks come from nvidia-smi. DCGM, which the H100 posts used, isn't available on Windows, so a small PowerShell script, run as a scheduled task, polls nvidia-smi and writes Prometheus text that windows_exporter's textfile collector serves. On RTX Spark, nvidia-smi also lists the NPU, with a temperature of its own; the script keeps only the GPU, so max() over these series means the GPU.

Send it to Azure Monitor

The sample uses the same collector as the H100 posts: the OpenTelemetry Collector, contrib distribution, as a linux/arm64 container next to the model. It scrapes the three Prometheus endpoints, receives LiteLLM's spans, labels everything with the laptop's name, and keeps only the Windows series the dashboard and alerts use, since Azure Monitor bills per sample ingested. Then it sends both signals over OTLP to an Application Insights resource with OTLP support: metrics land in its Azure Monitor workspace as Azure Monitor managed service for Prometheus data, and traces in Application Insights.

Without a managed identity on the laptop, the collector signs in as a Microsoft Entra ID application, which needs the Monitoring Metrics Publisher role on the data collection rule that Application Insights creates. The part that talks to Azure Monitor, abridged from the sample's observability/otelcol/config.yaml:

extensions:
  azure_auth:
    service_principal:
      tenant_id: ${env:AZURE_TENANT_ID}
      client_id: ${env:AZURE_CLIENT_ID}
      client_secret: ${env:AZURE_CLIENT_SECRET}
    scopes: [https://monitor.azure.com/.default]

processors:
  resource:
    attributes:
      - {key: microsoft.applicationId, value: "${env:AZMON_APPLICATION_ID}", action: upsert}

exporters:
  otlp_http/azuremonitor:
    traces_endpoint: ${env:AZMON_TRACES_ENDPOINT}
    metrics_endpoint: ${env:AZMON_METRICS_ENDPOINT}
    auth:
      authenticator: azure_auth

Ingest OTLP data into Azure Monitor with the OpenTelemetry Collector walks through creating the resource, and my H100 post covers the details that tripped me up there. Two matter here. OTLP histograms arrive as native histograms, with no _sum or _count series, so a query reads histogram_sum(...) where remote-written data would use _sum. And each model call's span carries its token counts and time to first token; with message capture off it carries no prompts or responses, but it does carry the tool definitions the agent declares, so decide whether that's acceptable in your Application Insights resource.

The dashboard

I built the dashboard in these screenshots for this post through the Azure Managed Grafana MCP server: I described the panels and an agent created them with amgmcp_dashboard_update. The sample has it as JSON to import into any Azure Managed Grafana instance that reads your workspace, with its queries written for OTLP's native histograms. On a laptop, a few questions matter more than on a server:

QuestionPromQL
Is the GPU spilling into system memory?max(windows_gpu_adapter_memory_shared_bytes{phys="0"})
Is Windows running short?min(windows_memory_available_bytes)
How fast does a reply decode?histogram_sum(sum(increase(vllm:request_generation_tokens[10m]))) / histogram_sum(sum(increase(vllm:request_decode_time_seconds[10m])))
How many tokens does each step produce?1 + sum(rate(vllm:spec_decode_num_accepted_tokens_total[5m])) / sum(rate(vllm:spec_decode_num_drafts_total[5m]))
Is the drafter's first guess landing?sum(increase(vllm:spec_decode_num_accepted_tokens_per_pos_total{position="0"}[1h])) / sum(increase(vllm:spec_decode_num_drafts_total[1h]))
Are requests queuing?max(vllm:num_requests_waiting)
How much power, how hot?max(nvidia_gpu_power_draw_watts), max(nvidia_gpu_temperature_celsius)

The decode-speed query divides the generated tokens of finished requests by their decode time. Both come from vLLM's per-request histograms, so the result doesn't depend on histogram buckets or on how many tokens each speculative step produced.

Read the memory panels together. GPU memory in use against the GPU's share says whether the model and its cache fit the reservation, shared GPU memory says how much Windows backs with system memory, and the memory Windows has available says what's left for everything else. Any one of them alone can look fine while the pool runs out.

The same MCP server can answer questions about the data, too: amgmcp_prometheus_query runs PromQL against the workspace, so an agent can tell you when requests started waiting during a session and how much memory Windows had at that moment. My H100 post covers what else it can do.

Alerts

A long agent run is a job you walk away from, and Azure Monitor evaluates Prometheus alert rules against the workspace whether or not you're looking at the dashboard. The sample's local-llm-alerts.bicep deploys four as a rule group:

AlertFires whenWhy
Windows memory lowWindows has had under 2 GiB available for 5 minutesWindows, WSL, the GPU's share and shared GPU memory draw on one pool.
Slow first tokenThe mean time to first token over 10 minutes passes 2 minutesThe agent dropped requests that waited about five minutes, and neither server logged an error.
PreemptionsvLLM preempted a request in the last 10 minutesThe KV cache ran out of room, and the work will be recomputed.
Stale GPU metricsThe GPU metrics haven't updated for 5 minutesThe collector stopped, and windows_exporter keeps serving its last file.

Each rule groups by the laptop's name, so one rule group covers every laptop that writes to the workspace, and a laptop that's asleep raises nothing.

Getting the most out of it

Keep subagent fan-out modest. The Yoga 9n is at its best with one conversation at a time. When the agent started 12 to 18 subagents at once, the request on the GPU kept decoding at 22–29 tokens a second, but the others waited their turn, and the mean time to a first token grew to about five minutes. In OpenCode, the task permission controls subagents. Deny it, or ask for fewer parallel subagents, for work you run locally, and keep wide fan-out for a data-center GPU.

Watch for long waits. The client dropped requests that had waited about five minutes, and neither server recorded an error: vLLM counted no aborts, and its access log showed 200, which a streaming response sends before its first token. Compare the requests arriving at vLLM with the requests the gateway answers; a gap is your sign. I haven't confirmed which layer sets the limit. LiteLLM's timeouts were an hour, and the OpenCode provider block above turns its own timeout off, which points to the client's HTTP stack giving up while it waits for response headers: LiteLLM appears to send them only with the first token.

Leave Windows some memory. Keep a few GiB free for Windows while the model runs, and stop it before large downloads or builds.

Mind the thinking. Nearly three-quarters of the output was reasoning. For routine edits, a lower reasoning_effort in the client can save more time than tuning the server.

Laptop or H100?

They're built for different jobs, and the laptop is well matched to its own. The H100 in the earlier post served many sessions at once and peaked at about 1,550 output tokens a second across 32 requests. The Yoga 9n serves one developer's coding session at about 27 tokens a second per request in real agent work, and 44.7 on short code generation, with the model's full context, on the machine that developer already carries, and with no hourly bill. The model runs locally, so requests are served on the laptop instead of by a model provider.

The two setups differ in checkpoint, draft method and vLLM version as well as hardware, so read this as two working configurations, not a like-for-like benchmark:

 Lenovo Yoga 9n 2-in-1Azure H100 NVL VM
Running costThe laptop's own power$6.98–$10.12 an hour pay-as-you-go: about $5,100 a month or more if it stays on
Where requests are servedOn the laptopIn an Azure region
Memory for the model32 GB GPU share of 64 GB unified memory94 GB of HBM
CheckpointUnsloth NVFP4 previewQwen FP8
Speculative decodingDFlash 2, 7 draft tokensMTP, 3 draft tokens
vLLM0.31 (official ARM64 image)0.24 (NVIDIA NGC 26.07)
KV cache263,927 tokens: one full-length request1.45M tokens
One short request, thinking off44.7 tok/s on the code benchmarkAbout 166 tok/s in the smoke test
Best forOne developer's interactive coding sessionsA team, wide subagent fan-out, throughput

The running cost is the October 2026 pay-as-you-go Linux price of Standard_NC40ads_H100_v5, which depends on the region. The earlier post ran it as a Spot VM for about $2 an hour, but Azure can evict Spot capacity with 30 seconds' notice.

Rules of thumb

  • Buy for memory. 64 GB of unified memory and its bandwidth are what make a 27B model practical. The CPU and GPU core counts matter less for this job.
  • Count bytes per step. Decode speed is roughly bandwidth divided by the bytes each step reads, times the tokens it accepts. A drafter that reads less and accepts more, like DFlash 2 in FP8, was the biggest lever I measured.
  • Run one request at a time for one agent. It keeps decode fast and the conversation cached.
  • Watch shared GPU memory and the memory Windows has available next to the KV cache. On unified memory, they're the same pool.

The bottom line

The Lenovo Yoga 9n 2-in-1 with RTX Spark makes a local 27B coding model practical. Its 64 GB of fast unified memory is the reason: Qwen3.8-27B, a draft model and the full 262,144-token context fit on the laptop, short code generation decodes at 44.7 tokens a second, and a real agent code review held at about 27 tokens a second per request for three hours at an average of 41 W of GPU power.

For a developer who wants a capable coding model on their own machine, it's an easy configuration to recommend. Choose the 64 GB model, run one agent session at a time, and in my testing it made a dependable everyday coding machine.

Update, October 30, 2026

Two more weeks with this setup turned up one correction and three improvements, measured with the benchmarks from How I measured. The sample is updated to match.

  • Bandwidth. The 229 GB/s read test ran while the model was loaded, so its buffer sat in shared GPU memory, which Windows backs with system memory. Against dedicated GPU memory the same test reads about 270 GB/s, 283 at best, or 90% of the 300 GB/s spec; the model's container and the Windows host measure the same. The model's 203 GB/s is therefore about 75% of what the GPU can read, not 89%, and the rest is per-step overhead rather than memory placement: a profile that fits entirely in dedicated memory decodes at the same rate as the default one, which spills 8 GiB. The formula and predictions in Step 3 don't change.
  • vLLM 0.32. The official 0.32 image runs this model on vLLM's new model runner and decodes 7–9% more steps a second than 0.31 on the same prompts, with the same prefill speed and the same evaluation results.
  • Async scheduling. Passing --async-scheduling explicitly adds about 5% more steps a second, with identical outputs. A profiler trace showed why there was room: about 12 ms of each 114 ms decode step was the GPU waiting on small host-side copies.
  • The WSL cap, measured. Without the cap from Step 1, the WSL VM's page cache grows at every model start, as vLLM reads 60 GB of weights, until Windows pages, and the model's shared GPU memory is what gets paged. On the same afternoon, the same profile decoded 15–25% slower and prefilled the 98K-token prompt 40% slower uncapped than capped. The first benchmark after a model start is slow for a few minutes either way. The cap's autoMemoryReclaim key belongs under [wsl2] on current WSL, which Step 1 now shows.

Together, on vLLM 0.32 with async scheduling and the cap in place, the code benchmark runs at 9.70 decode steps a second against 8.53 for the 0.31 profile measured the day before, 14% more, or 47.6 tokens a second against the 44.7 above; the drafter accepts slightly fewer tokens per step on 0.32, 4.92 against 5.04. The 27K-token prompt prefills at 1,438 tokens a second and decodes at 51.7.

Try it

Updated Oct 30, 2026
Version 3.0
No CommentsBe the first to comment