hermes-agent/website/docs/user-guide
kshitij 7b006ea6e8 feat(stt): idle unload for local whisper model
The local faster-whisper model singleton (_local_model) is loaded once
and never released — the 'base' model holds ~370 MB of RAM/VRAM for
the entire lifetime of the process, even when no voice messages arrive
for hours or days. On long-running gateway processes (especially with
local LLMs competing for the same GPU) this is wasteful.

Add a config-driven idle unload: after stt.local.unload_after_idle_seconds
(default 0 = never) of no transcription activity, a lightweight daemon
thread sets _local_model = None so the Python GC can reclaim the
ctranslate2 objects. The next voice message reloads the model
transparently (the existing lazy-load path handles it).

The watcher:
  - Checks every 30s whether idle time exceeds the configured threshold
  - Acquires _local_model_lock before unloading (prevents races with
    concurrent transcriptions that are mid-load)
  - Exits immediately if the model is already None (unloaded by another
    path, e.g. the CUDA fallback eviction)
  - Is restarted by each transcription with the current config value,
    so changing stt.local.unload_after_idle_seconds in config.yaml takes
    effect on the next voice message without a process restart

Default is 0 (never unload) — zero behavior change for existing users.
Recommended value for gateway processes: 300 (5 minutes).

15 tests: config resolution (garbage/negative/None fallbacks), unload
safety (already-None, lock acquisition), touch timestamp, watcher
lifecycle (unload after timeout, no unload within timeout, exits when
model already None, stopped on new start). Existing STT test suite
unchanged.
2026-08-07 19:26:12 +05:30
..
egress Reapply "Merge pull request #30179 from NousResearch/feat/iron-proxy" 2026-07-24 09:49:00 -07:00
features docs(cron): document async manual runs and per-run prompt context 2026-08-06 23:22:42 -07:00
messaging refactor: fold simplify-code review findings 2026-08-07 13:28:43 +05:30
secrets docs: accuracy sweep + coverage for 2 months of shipped features 2026-07-29 08:48:05 -07:00
skills fix(skills): align hermes-agent-skill-authoring with hardline authoring standards 2026-08-06 22:07:51 -07:00
_category_.json
…
checkpoints-and-rollback.md fix(checkpoints): never auto-delete orphans on unattended startup sweep 2026-07-24 16:01:06 -07:00
cli.md docs: document /personality none|default|neutral reset across personality docs 2026-08-03 12:29:49 -07:00
configuration.md feat(stt): idle unload for local whisper model 2026-08-07 19:26:12 +05:30
configuring-models.md docs: teach providers: dict as the canonical custom-provider format 2026-07-29 09:44:59 -07:00
desktop.md feat(desktop): add terminal font picker 2026-08-01 14:30:08 -07:00
docker.md feat(runtime)!: require Node 26 across all installers, heal, and upgrade paths 2026-08-01 21:17:51 -04:00
git-worktrees.md docs(developer-guide): document htui/hgui worktree UI dev helpers (#64783) 2026-07-16 22:51:23 -04:00
import-from-other-agents.md feat(cli): hermes import-agent — import Claude Code and Codex CLI setups 2026-07-26 17:47:07 -07:00
managed-scope.md docs: add managed scope admin guide + cross-link from configuration 2026-06-19 07:46:33 -07:00
multi-profile-gateways.md fix(gateway): bind HTTP auth to routed profiles 2026-07-28 14:22:18 -07:00
profile-distributions.md Expand .gitignore example 2026-06-20 20:42:49 -07:00
profiles.md docs: warn against pointing two agents at one Hermes home (memory, profiles, FAQ) 2026-08-05 21:33:44 +05:30
security.md Revert "remove Vercel AI Gateway and Vercel Sandbox (#33067)" 2026-07-29 19:48:37 -07:00
sessions.md docs: four small accuracy fixes 2026-08-05 21:33:44 +05:30
tui.md fix(docs): fix broken image and video in TUI docs (#43501) 2026-07-19 19:33:03 -04:00
which-file-does-what.md docs: add 'Which File Does What?' - one-page map of SOUL/USER/MEMORY/AGENTS 2026-08-05 21:33:44 +05:30
windows-native.md docs: fix stale PATH location in windows-native common pitfalls 2026-08-05 21:33:44 +05:30
windows-wsl-quickstart.md fix(docs): update all install instructions everywhere 2026-06-04 21:07:45 -04:00