Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
Qwen3.8-27B on an RTX 3090 under WSL2 — bring-up record
Date: 2026-08-21
First end-to-end bring-up of the syv-ai/qwen38-27b-rtx3090 stack on a Windows RTX 3090 host, driving it from PortOS's seeded OpenCode vLLM provider. The setup steps this produced are in features/qwen38-rtx3090.md; this file records what was measured and what had to be discovered along the way.
Verdict
It works, and the throughput story holds up — but four settings stand between a documented clone and a working coding agent, and none of them announce themselves. Three are WSL2-specific; one applies everywhere and is the difference between an agent that edits files and one that cannot.
Host
Windows 11, RTX 3090 (24 GB), driver 596.36 / CUDA 13, 32 GB system RAM. WSL2
Ubuntu on kernel 6.6.87.2, Docker Desktop 29.7.2 with the nvidia runtime,
Compose v5.3.1. Image built locally (9.79 GB — there is no registry to pull
from); weights ~19.5 GB into the project's models/ bind mount.
The two serving profiles
The stack is a frozen serving setup, not a model format, and it ships two
compose profiles. single-user/ is the one PortOS points at.
batch/ |
single-user/ (what CoS wants) |
|
|---|---|---|
| For | many concurrent API requests | one or a few interactive clients |
| Realistic chat | ~46 tok/s | MTP ~114, DFlash 2 ~122–133 |
| Reproducing its own context (quoting / applying an edit) | ~46 tok/s | up to 381 tok/s (SPEC=dflash2 + DFLASH_TOKENS=15) |
| Context | 150k typical | 64k default (CTX=fast); 56k with DFLASH_TOKENS=15; 150k with CTX=long |
| Trick | int8 tensor-core GEMMs + fp16 DeltaNet state | DFlash 2 block drafter + lookup-from-context + prefix cache |
The 381 tok/s headline is not ordinary chat. It is a 25k-token document reproduction workload where 15 of 16 drafted tokens are accepted because the answer is already in the prompt. Upstream is explicit that ordinary chat is ~133 tok/s and that the fast mode targets RAG, coding assistants applying edits, quoting/rewriting, and extraction — which is the CoS TUI shape (large files in context, patches written back).
The context trade-off is why DFLASH_TOKENS=15 is deliberately not a PortOS
default: 56k across four slots is too tight for agent prompts carrying a repo's
worth of files. Lookup drafting stays on either way.
WSL2 on a 3090 is independently reproduced upstream (docs/docker.md):
single-fast measured 114 tok/s greedy. Two WSL knobs are load-bearing there —
GPU_UTIL=0.93 when the free-memory gate fails, and
PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False on some Windows drivers.
Measured
Streaming /v1/chat/completions, greedy, enable_thinking: false, against a
17,113-token prompt sent twice so the second turn shares the prefix:
| turn | prompt | TTFT | decode |
|---|---|---|---|
| 1 (cold) | 17,113 tok | 16,358 ms | 59.3 tok/s |
| 2 (warm) | 17,113 tok | 681 ms | 105.3 tok/s |
24× TTFT collapse on the shared prefix. Upstream reported 22.4 s → 0.56 s on a 25k-token document; this is the same effect at a smaller prompt. Decode lands near upstream's ~133 tok/s ordinary-chat figure — the gap is consistent with WSL2 overhead and a 350 W board rather than upstream's 250 W cap.
The prefix-cache behavior is the part that matters for a CoS agent: a multi-turn session re-sends a growing transcript, and only the new tail is prefilled.
The four settings
Each was found by hitting it. All go in the compose project's .env.
1. EXTRA_ARGS=--enable-auto-tool-choice --tool-call-parser qwen3_xml — every
platform. Upstream's single-user/start_qwen.sh serves without tool calling, so
vLLM rejects OpenCode's first turn outright: "auto" tool choice requires --enable-auto-tool-choice and --tool-call-parser to be set. The parser choice is
a second, quieter trap: the chat template's <tool_call> markers suggest
hermes, but Qwen3.8 emits XML (<function=name><parameter=path>…). With
hermes the server starts, answers, and returns the raw markup as assistant text
with tool_calls: null — no error, the agent just never uses a tool. With
qwen3_xml the same request returns finish_reason: "tool_calls" and a
structured call.
2. VLLM_WSL2_ENABLE_PIN_MEMORY=1 — WSL2. vLLM disables pinned host memory
on sight of WSL; its GPU runner allocates UVA buffers that require it. Without
this the engine never initializes (RuntimeError: UVA is not available) and
compose's unless-stopped policy turns that into a silent crash-loop — 20
restarts before it was noticed.
3. PYTORCH_CUDA_ALLOC_CONF=expandable_segments:False — WSL2. Expandable
segments use CUDA VMM APIs that WSL2 supports only partially. Weight loading dies
seconds in, inside gptq_marlin_repack, as
torch_call_dispatcher("aten::empty", …) API call failed. That reads as an OOM
and is not one: it reproduces on an idle card at GPU_UTIL=0.70, on both the
base and -fast checkpoints, while gptq_marlin_repack called directly with
correct shapes succeeds. Upstream lists this as a memory escape hatch; on WSL2 it
is a precondition for starting.
4. WSL2 memory ceiling ≥ ~24 GB — WSL2, and only for prepare. The CPU-side
requantization holds a 2.5 GB shard plus several float32 copies of a 248k-row
lm_head. Under WSL2's default half-of-host ceiling it is SIGKILLed, reported
only as Killed / exit 137. The download half is unaffected and resumes.
Notes for a Windows install
- PortOS runs native Win32 while the project lives in the distro, so
VLLM_QWEN_PROJECT_DIRmust be the\\wsl.localhost\<distro>\home\<user>\qwen-servingUNC path. Node reads it anddocker composeaccepts it as a working directory, so the readiness checklist and its Start button both work from there. - The container is reachable from native Win32 at
127.0.0.1:18020, which is what the provider record points at. - Weights land as
models/Qwen3.8-27B-W4A16-AutoRound/, a plainhf download --local-dirlayout — not amodels--org--repohub cache. PortOS's readiness check originally matched only the hub shape and reported a fully prepared machine as having no weights; fixed inserver/lib/vllmQwenProject.js. - First start takes ~5–7 minutes (verify, torch.compile, CUDA graphs); later
starts reuse the
qwen-cachevolume.
Agent check
opencode run through PortOS's own buildCliChildEnv over the seeded
opencode-vllm-tui record: OpenCode listed vllm/qwen3.8-27b from the generated
OPENCODE_CONFIG_CONTENT, ran a three-step agent loop, and wrote a file with its
write tool. The API key is enforced — unauthenticated /v1/models is 401.
Sources
- syv-ai/qwen38-27b-rtx3090 — the frozen compose project this record brings up.
- upstream Docker / WSL2 notes
— the independent WSL2 reproduction and the
GPU_UTIL/ allocator knobs. - X announcement and the LocalLLaMA thread — where the throughput numbers were first published and discussed.
Related
- features/qwen38-rtx3090.md — the setup guide.
- 2026-08-19-dflash2-speculative-decoding.md — the earlier evaluation that concluded PortOS should not vendor an unmerged engine patch. That still holds; this stack is upstream's frozen container, and Ollama / LM Studio still cannot run DFlash 2 at all.
- 2026-08-19-dspark-vs-dflash2.md — why Apple Silicon stays on DSpark / MTPLX rather than this path.
- 2026-08-16-qwen38-mlx-macos.md — the same checkpoint on macOS via MLX.
- 2026-08-05-torch-flux2-lora-cuda-validation.md — the same class of Windows 3090 box for media generation, and why the card cannot be shared with this container.