Skip to content

The agent that grows with you

Merge remote-tracking branch 'origin/main' into ethie/llamacpp-0.5.0-linux-cuda-main

emozilla5059f20e1b33
diff --cc hermes_cli/local_runtime/bootstrap.py
index 3815e21d673,41ff89e3944..30d1c5643e6
--- a/hermes_cli/local_runtime/bootstrap.py
+++ b/hermes_cli/local_runtime/bootstrap.py
@@@ -19,20 -20,9 +19,23 @@@ from hermes_cli.local_runtime.gguf impo
logger = logging.getLogger(__name__)
_SUPERVISOR = None # process-wide singleton; one router per Hermes process
+ # The engine that singleton runs (or is booting). Budgets price ITS devices: the server is shared by
+ # every profile this process hosts, so another profile's ``local_runtime.backend`` must not resize it.
+ _SERVING_ENGINE = None
+_EXIT_HOOKED = False
+
+
+def _stop_at_exit() -> None:
+ """The process that boots the server stops it on a clean exit, whatever surface it is (the
+ desktop backend also stops it in its shutdown handler; the second call is a no-op). Processes
+ that only adopted another's server never stop it. A hard kill still leaves an orphan, which the
+ next boot adopts or replaces."""
+ global _EXIT_HOOKED
+ if not _EXIT_HOOKED:
+ import atexit
+
+ atexit.register(shutdown_local_runtime)
+ _EXIT_HOOKED = True
def _detect_gpu_vendor() -> str | None:
diff --cc hermes_cli/main.py
index 5ba61eb81a7,b8e132e7d59..d51ce652993
--- a/hermes_cli/main.py
+++ b/hermes_cli/main.py
@@@ -105,8 -105,8 +105,10 @@@ _ONESHOT_CLEANUPS =
("tools.browser_tool_lifecycle", "_emergency_cleanup_all_sessions", {}, Exception),
("tools.mcp_tool_lifecycle", "shutdown_mcp_servers", {}, BaseException),
("agent.auxiliary_client", "shutdown_cached_clients", {}, Exception),
+ # A no-op unless this run booted the managed llama-server (atexit's hook is skipped here).
+ ("hermes_cli.local_runtime.bootstrap", "shutdown_local_runtime", {}, Exception),
+ # The atexit hook that closes the metrics session never runs past os._exit.
+ ("hermes_cli.observability.relay_shared_metrics", "shutdown_runtimes", {}, Exception),
)
diff --cc website/docs/user-guide/local-models.md
index 330f0a61990,d28a66698b9..d215eaad220
--- a/website/docs/user-guide/local-models.md
+++ b/website/docs/user-guide/local-models.md
@@@ -182,9 -176,16 +182,16 @@@ Selecting a local model as your main mo
## Requirements and limits
- **Windows:** CUDA on supported NVIDIA targets, Vulkan on x64, or CPU.
- **Linux:** Vulkan or CPU; the pinned release has no prebuilt CUDA archive.
+ **Linux:** CUDA on x64 and arm64 NVIDIA (needs a CUDA 13 driver), Vulkan, or CPU.
**macOS:** Metal or CPU. HIP/ROCm is an explicit choice on supported x64
targets. Unsupported backend/target pairs fail before any download.
+ - `backend: auto` prefers CUDA for NVIDIA and Vulkan for AMD and Intel GPUs,
+ then falls back to the builds listed above for your platform (CPU when no
+ GPU is found). Behind a Vulkan or HIP engine, a discrete card is sized from
+ its own memory (system RAM is spill space) and each launch subtracts what
+ other programs hold on it; an integrated GPU shares system RAM and is sized
+ from that. Quickstart installs the engine before choosing the model, so the
+ pick reflects the card.
- A GPU with 8 GB+ of memory runs the small catalog models comfortably;
16 GB+ runs the 27–35B models at high quality.
- Model completeness is checked against the server's response, not catalog