Models, Ollama import and sharing your GPU
LUCID discovers existing local GGUF models without copying or modifying them, lets you opt in to serving specific models to your circle, and can download verified models peer-to-peer with exact-offset resume.
Automatic read-only model discovery#
When lucidd probe or LUCID Desktop inspects your machine, it performs a strictly read-only scan of standard locations (skipping symlinks and dotfiles, verifying the 4-byte GGUF magic header, capped at 64 models and depth 4):
- Ollama:
~/.ollama/models/manifestsand~/.ollama/models/blobs(parses JSON manifest layerapplication/vnd.ollama.image.model) - LM Studio:
~/.lmstudio/modelsand~/.cache/lm-studio/models - Local LUCID folders:
~/Models,<data_local_dir>/lucidd/models,<data_local_dir>/lucid/models, plus any folders you explicitly add innode.tomlor Desktop's + Add model folder button
Important
Folder validation fails closed on relative paths, .., symlinks, system roots (/, /etc, /usr, /System, /Library, /proc, /sys, /dev), $HOME root, and sensitive directories (.ssh, .gnupg, .aws, .kube, .docker, Keychains, .config/phase, .config/lucidd).
Fast restarts without re-hashing large models#
Importing a 27 GB GGUF file hashes the entire file once to verify its ModelCid. On subsequent restarts (for example, when changing the Context Window or saving Cluster helpers), LUCID does not make you wait to re-hash unchanged multi-gigabyte files:
- Signed GGUF hash cache:
luciddstores an Ed25519-signed local metadata cache (<alias-replay-state>.gguf-hashes-v1.json) keyed on each file's canonical path, size, read-only status, modification time, and—on macOS/Linux—device, inode, andctime(orcreation_timeon Windows). - Tamper-safe invalidation: Any byte change, file replacement, or signature mismatch automatically invalidates the cache entry and falls back to a full SHA-256 re-hash.
- Immediate
/api/tagson startup: Installed and cached models are served immediately by/api/tagson startup so Open WebUI, Pi, and OpenCode never stall waiting for remote DHT lookups.
Installing or pinning the llama.cpp runtime#
To run GGUF models locally, LUCID uses a SHA-256-pinned llama.cpp release (b12651):
- Desktop app: Clicking Provide… or Set up runtime prompts for explicit confirmation (
confirm_permission: true), then either pins an already-installedllama-serverbinary or downloads the officialb12651archive for your hardware (macos-arm64-metal,linux-x86_64-cuda,linux-x86_64-vulkan,linux-x86_64-cpu,linux-aarch64-cpu, orwindows-x86_64-vulkan). On Windows, LUCID uses the Vulkan build for AMD Radeon (including APUs such as Strix Halo), Intel Arc and NVIDIA GPUs withoutnvidia-smi, detected from the display-adapter registry and the driver'svulkan-1.dll. - Verification: Downloads require HTTPS, enforce a 320 MiB cap, verify exact SHA-256 before extracting, inspect every
tarentry for traversal, extract into a mode-0700directory, and recordllama_server_binaryandllama_server_sha256innode.toml. - Tamper detection: On every startup,
luciddre-hashes the configuredllama-serverbinary and refuses to start the worker if the SHA-256 does not match (probe status reports"tampered").
Opting in to share your GPU#
Sharing is off by default (providing_enabled = false in node.toml).
- Desktop app: Select a local model and click Provide…. You are asked to confirm before LUCID records the model in
approved_provide_models, hot-imports its verified GGUF blob into the content catalog, updatespolicy.toml(serve_models), and advertises its signed record on the Kademlia DHT. Click Stop Providing at any time to revoke. - CLI (manual operator mode):
lucidd \ --mode worker \ --worker llama-cpp \ --model-dir ~/Models \ --llama-server-binary /absolute/path/to/llama-server
Even when sharing is enabled, only peers you explicitly invite (or list in policy.toml's authorized_submitters) can run jobs on your machine. See Operator policy and safety controls.
Peer-to-peer model pull and resume#
If a circle peer advertises a model with --serve-model-content enabled (off by default so serving inference never silently donates upload bandwidth), you can pull the verified weights directly over /phase/blob/1.0.0:
- Desktop app: Select a network model and click Download Locally (P2P).
- CLI / HTTP API:
curl -N http://127.0.0.1:11434/api/pull \ -H "Content-Type: application/json" \ -d '{"model": "qwen2.5-7b-q4"}'
Pin an exact content hash or publisher if an alias is ambiguous (ambiguous aliases fail closed with 409 Conflict rather than picking arbitrarily):
curl -N http://127.0.0.1:11434/api/pull \
-H "Content-Type: application/json" \
-d '{"model": "qwen2.5-7b-q4", "cid": "<64-hex-sha256>", "publisher": "<peer-id>"}'How pull safety and resume work:
- Signed alias resolution: Resolves
SignedAliasRecordfrom the DHT with monotonic sequence rollback and equivocation detection. - Staging & exact-offset resume: Downloads into
blobs/.staging/<aa>/<cid>.partin 1–64 KiB chunks. If interrupted, the next pull requestsBlobStreamRequest { offset: existing_partial_len }and resumes from the exact byte offset. - Failover & commit verification: Tries up to 8 providers (15-minute per-provider timeout, 1-hour total deadline). Before publishing to immutable read-only
blobs/<aa>/<cid>.bin,ArtifactStore::commit_staged_blobchecks the whole-file SHA-256 against the expectedModelCid. On mismatch, the corrupt partial is deleted and the next provider retries cleanly from offset0.