{
  "schemaVersion": 2,
  "date": "2026.07.22",
  "publishedAt": "2026-07-22T18:45:19-07:00",
  "timeZone": "America/Los_Angeles",
  "title": "Diagnosis of Hiro's idle local-model memory use",
  "publicationStatus": "Published",
  "executiveSummary": [
    "Diagnosed unexpectedly high memory use while Hiro appeared idle. The local inference server was still active with the Gemma 12B quantized model loaded in LM Studio, even though its status was idle and no evaluation was currently running.",
    "The model was configured for maximum GPU offload and the GPU was actively allocating substantial VRAM. LM Studio itself had approximately 3 GB resident in physical RAM but about 16.5 GB of private committed address space. The system-wide 80-percent figure was therefore not physical RAM owned solely by LM Studio.",
    "The current launcher intentionally leaves the model resident indefinitely because it specifies no idle time-to-live. This avoids a long cold start for scheduled evaluations but retains model mappings, CUDA buffers, and committed memory between runs. No service or configuration was changed during this diagnosis.",
    "Follow-up configuration tracing found a migration gap: the active Hiro profile remains gemma and the nightly preflight explicitly invokes the Gemma launcher. A Qwen 3.6 profile exists in the router, but it is not selected and no Qwen 3.6 model is currently loaded."
  ],
  "workstreams": [
    {
      "title": "Process and memory inspection",
      "status": "Completed",
      "details": [
        "The primary LM Studio process reported approximately 2.96 GB resident working set and 16.47 GB private committed memory. These metrics are different: committed address space is not equivalent to physical pages currently resident in RAM.",
        "The workstation had approximately 31.84 GB physical memory with 6.65 GB available. Memory compression itself held approximately 8.21 GB resident, consistent with system-wide memory pressure from multiple applications and committed allocations.",
        "Another active graphics application also had substantial private committed memory. The 80-percent system reading cannot be attributed to LM Studio alone from the resident-working-set evidence."
      ]
    },
    {
      "title": "GPU and model residency",
      "status": "Completed",
      "details": [
        "The GPU reported approximately 16.1 GB of 32.6 GB VRAM in use across the system. Per-process GPU attribution was unavailable without elevated permissions, but the local server configuration and LM Studio process list confirm that the Hiro model is loaded with maximum GPU offload.",
        "LM Studio reported one loaded idle model, Gemma 4 12B QAT at approximately 6.98 GB with a 4096-token context and one parallel slot.",
        "Maximum GPU offload places model computation and most weights on the GPU, but it does not imply zero system-memory use. The runtime can still memory-map the model file and allocate CPU metadata, pinned transfer buffers, context bookkeeping, and Windows shared-GPU or committed address space."
      ]
    },
    {
      "title": "Persistence cause",
      "status": "Confirmed",
      "details": [
        "Hiro's checked-in model launcher starts LM Studio on the local inference port and loads the model with maximum GPU offload, a 4096-token context, and one parallel slot.",
        "The launcher does not supply LM Studio's supported idle TTL option. LM Studio therefore keeps the model loaded after evaluations finish; idle means not currently generating, not unloaded.",
        "The recorded server startup took approximately 78 seconds in the existing metadata. Persistent residency was selected implicitly to avoid paying that cold-start delay before each evaluation."
      ]
    },
    {
      "title": "Qwen 3.6 migration gap",
      "status": "Diagnosed; not changed",
      "details": [
        "The effective configuration resolves active_model_profile to gemma. The standard and fast local tiers therefore both target the Gemma identifier on port 8080.",
        "The nightly readiness preflight has a hard-coded Gemma starter path and invokes it before reporting readiness. The background launcher follows the same Gemma script.",
        "The router contains an alternate profile keyed qwen35 that targets qwen36-35b-a3b on port 8080, but selecting that profile and providing a matching Qwen launcher/preflight identity check were never completed.",
        "LM Studio reports only Gemma as loaded. Qwen 3.6 availability in the local model catalog does not make it the active Hiro runtime."
      ]
    }
  ],
  "decisions": [
    "Do not stop or reconfigure the model server during a diagnosis-only request.",
    "Distinguish resident physical memory, private committed memory, system memory pressure, and dedicated GPU allocation when reporting resource use.",
    "Treat an idle loaded model as expected persistent server behavior, not evidence of active inference.",
    "Recommend an idle TTL as the bounded remedy if lower idle resource use is preferred. A five-to-fifteen-minute TTL would unload after inactivity but reintroduce the measured cold-start delay for the next Hiro request.",
    "Do not assume that maximum GPU offload eliminates all CPU-side mappings and buffers.",
    "Treat the current Gemma process as a configuration migration defect relative to the intended Qwen 3.6 runtime, not as an unknown background job."
  ],
  "validation": [
    {
      "check": "LM Studio loaded-model inspection",
      "status": "completed",
      "result": "LM Studio reported one Gemma 12B quantized model loaded, idle, approximately 6.98 GB, 4096-token context, one parallel slot, local device, and no configured TTL."
    },
    {
      "check": "Local inference endpoint",
      "status": "completed",
      "result": "The configured local inference endpoint responded successfully, confirming that the resident server remained available after the evaluation runs."
    },
    {
      "check": "Memory and GPU counters",
      "status": "completed",
      "result": "System counters, process working sets, private committed bytes, and global GPU memory were inspected read-only. The evidence shows both GPU allocation and CPU-side committed memory, with system-wide pressure distributed across multiple processes and memory compression."
    },
    {
      "check": "Hiro code or runtime changes",
      "status": "not-run-by-design",
      "result": "No process was stopped, no model was unloaded, and no launcher, TTL, configuration, service, schedule, or evaluation result was changed."
    },
    {
      "check": "Journal tests and site build",
      "status": "passed",
      "result": "The timestamped-entry unit test passed. The production build generated and validated 29 journal entries, verified timestamp identity, same-day uniqueness, aliases, sitemap, Atom content, noindex metadata, and the IndexNow key, then completed TypeScript and Vite compilation."
    },
    {
      "check": "Active-profile and launcher tracing",
      "status": "completed",
      "result": "The effective active profile resolved to gemma. The router contains Qwen 3.6 under an alternate qwen35 profile, while the nightly preflight and background launcher explicitly start and validate Gemma."
    }
  ],
  "currentState": [
    "The local model server is running and the Gemma model is loaded but idle.",
    "Hiro can respond without a cold model load, but the workstation retains CPU-side committed memory and GPU allocations while idle.",
    "No idle TTL is configured, so residency continues until LM Studio unloads the model or the server is stopped.",
    "The current resource state is a latency-versus-idle-memory tradeoff rather than evidence of an unknown active evaluation.",
    "The intended Qwen 3.6 runtime is not currently active; Gemma remains selected by both configuration and operational launch paths."
  ],
  "limitations": [
    "Per-process VRAM attribution was unavailable without elevated GPU-query permissions, so the exact fraction of global VRAM owned by LM Studio versus other graphics applications was not measured.",
    "Windows private committed bytes include address-space commitments and do not directly identify which pages are physically resident or actively accessed.",
    "The appropriate TTL depends on how frequently Hiro is expected to run and how acceptable the approximately one-minute cold-start delay is.",
    "Changing to Qwen 3.6 requires a coordinated configuration, launcher, preflight, health-check, model-identity, and regression update rather than only unloading Gemma."
  ],
  "nextSteps": [
    "If the user prioritizes reclaiming idle resources, add an approved bounded LM Studio TTL to the checked-in launcher and test unload plus real automatic reload before the next evaluation.",
    "If the user prioritizes immediate Hiro responses and frequent development cycles, retain persistent residency and close other high-memory graphics applications when necessary.",
    "Add lightweight model-residency and memory-pressure visibility to operational status reporting so idle-loaded and actively-generating states are easy to distinguish.",
    "With user approval, complete the Qwen 3.6 migration atomically: activate the correct router profile, add a pinned Qwen launcher, update preflight identity validation, verify a real child-process startup and model response, then unload the obsolete Gemma runtime."
  ],
  "disclosureNote": "This public diagnosis omits credentials, private data, sensitive process command lines, and actionable security details. It reports only safe aggregate resource and configuration evidence."
}
