Skip to main content

Module profile

Module profile 

Source
Expand description

Machine profile (UX §6): hardware facts, detected roles and the adaptations they imply. Built from a snapshot (pure) plus a bounded scan of the configured model folders (headers are never read), stored in oomtop-state and refreshed at most daily. Roles are sticky for ROLE_TTL_MS so a model server that isn’t running right now doesn’t erase the “local LLM” role.

Structs§

Adaptations
GpuInfo
Hardware
MachineProfile

Enums§

Role

Constants§

ROLE_TTL_MS
A role not observed for this long is dropped.
SCAN_BUDGET
Wall-time budget for the scan (it runs at most once a day, but must not delay the first frame much).
SCAN_MAX_ENTRIES
Bounded model-folder scan: entries visited at most.

Functions§

build
Builds (or refreshes) the profile. prev roles are kept until they expire.
count_model_files
Counts .gguf / .safetensors files under the folders (depth ≤ 3, ≤ SCAN_MAX_ENTRIES entries, at most SCAN_BUDGET of wall time; symlinks not followed; unreadable dirs skipped). Only the count is kept.
hardware
Hardware facts from a snapshot.
roles_in
Roles visible in this snapshot.