Advanced: temporarily release a local service¶
Kind: how-to.
This optional adapter targets a specific local systemd setup.
It is not part of the normal installation or receipt procedure.
Use it only if you already manage llama-cpp-tuned.service and its router on port 8090.
Do not use it for a different service or without permission to stop that workload.
- Prepare the corpus and build the parser image using the receipt guide.
- Run the explicit handover command with a new output directory.
uv run python scripts/receipt_experiment.py \
--input corpus/receipts-01 --output runs/receipts-01 --release-llama
The command records the service state and loaded model IDs before shutdown.
It refuses an existing parser container.
After the run, it removes only the owned parser and restores the recorded service state.
A bounded check verifies the previously loaded IDs.
Restoration failures return a nonzero exit status and appear in lifecycle.json.
Recover after forced termination¶
Power loss or forced termination can bypass cleanup.
- Read the run's
lifecycle.jsonfor the original service state and model IDs. - Run
uv run inference-axi stopto remove the owned parser. - Start
llama-cpp-tuned.serviceonly if it was previously active. - Reload each recorded model ID through the router's
/models/loadendpoint. - Poll
/modelsuntil each recorded ID reportsloaded. - Stop polling after 180 seconds and inspect service logs if loading fails.
Use status-request timeouts of at most 10 seconds. A successful load response can precede completed loading. Leave a previously inactive service inactive.