LFM3-1.7B Omarchy Offline Agent (v1.0)

A tiny, privacy-safe offline local OS troubleshooting model fine-tuned from LiquidAI/LFM3-1.7B using two-stage LoRA SFT + DPO for Omarchy (Arch Linux + Hyprland Lua + Quickshell).

Designed to run 100% locally in ~1.1โ€“1.8 GB RAM at 35โ€“50 tok/s on CPU (or faster via Vulkan iGPU) via llama.cpp, paired with the open-source 5-tool safety harness at thelaggingway/omarchy-offline-agent.


Model Files (v1.0)

File / Folder Size Description
lfm3-omarchy-v1.0-Q4_K_M.gguf ~1.05 GB Recommended for laptops & CPU/iGPU inference (35โ€“50 tok/s on 4 cores)
lfm3-omarchy-v1.0-Q8_0.gguf ~1.76 GB Near-lossless quantization for maximum fidelity
lora_sft/ ~61.5 MB Stage 1 LoRA SFT adapter (1,992 multi-turn tool-calling trajectories)
lora_dpo/ ~30.8 MB Stage 2 LoRA DPO alignment adapter (tool discipline & safety refusals)

Quick Start (End-to-End on Arch / Omarchy)

1. Install llama.cpp (b12858+)

Requires llama.cpp b12858+ for LFM3 + --jinja structured tool calling. Note that Arch's extra/llama-cpp package may be older than b12858; verify with llama-server --version first.

If llama-server is missing or older than b12858, install the prebuilt Linux x64 release into ~/.local/share/llama.cpp (no sudo required; use -ubuntu-x64.tar.gz instead of -ubuntu-vulkan-x64.tar.gz for CPU-only):

LLAMA_TAG="b12868" # or latest b12858+ tag from https://github.com/ggml-org/llama.cpp/releases
mkdir -p ~/.local/share/llama.cpp ~/.local/bin
curl -fL -o /tmp/llama-vulkan.tar.gz \
  "https://github.com/ggml-org/llama.cpp/releases/download/${LLAMA_TAG}/llama-${LLAMA_TAG}-bin-ubuntu-vulkan-x64.tar.gz"
tar -xzf /tmp/llama-vulkan.tar.gz -C ~/.local/share/llama.cpp --strip-components=1
rm -f /tmp/llama-vulkan.tar.gz
ln -sf ~/.local/share/llama.cpp/llama-server ~/.local/bin/llama-server
llama-server --version

2. Download the GGUF Model

mkdir -p ~/.local/share/offline-agent/models
curl -fL -o ~/.local/share/offline-agent/models/lfm3-omarchy-v1.0-Q4_K_M.gguf \
  https://huggingface.co/thelaggingway/lfm3-1.7b-omarchy-agent/resolve/main/lfm3-omarchy-v1.0-Q4_K_M.gguf

3. Install the Companion CLI & Build the Offline Docs Index

Install arch-wiki-docs for offline Arch Wiki indexing, then install the harness with uv (avoids PEP 668 externally-managed-environment errors on Arch):

sudo pacman -S arch-wiki-docs
git clone https://github.com/thelaggingway/omarchy-offline-agent.git ~/Projects/omarchy-offline-agent
uv tool install -e ~/Projects/omarchy-offline-agent
offline-agent-index

(If your Omarchy manual markdown files live outside ~/.local/share/omarchy/manual, pass --omarchy-manual /path/to/manual.)

4. Start llama-server (Always pass --jinja)

Run in the foreground:

llama-server \
  -m ~/.local/share/offline-agent/models/lfm3-omarchy-v1.0-Q4_K_M.gguf \
  --host 127.0.0.1 \
  --port 8080 \
  -c 4096 \
  --jinja

Or configure an on-demand systemd --user service at ~/.config/systemd/user/omarchy-offline-llm.service (disabled on boot; see the GitHub README). When configured, offline-agent automatically starts the model on launch and unloads it automatically on exit (zero idle RAM/VRAM):

offline-agent

5-Tool Protocol

The model is trained to operate strictly within 5 local tools:

  1. read_system_profile() โ€” always called first to inspect the compact < 2 KB local machine snapshot.
  2. write_system_profile(markdown, mode) โ€” creates/updates ~/.local/share/offline-agent/system-profile.md after user consent.
  3. search_local_docs(query, corpus) โ€” queries the local SQLite FTS5 index (omarchy, arch-wiki, man, all).
  4. run_readonly_cmd(command, reason) โ€” executes allowlisted read-only diagnostic commands (max 2 per turn).
  5. propose_fix(commands, risk_level, rollback, explanation) โ€” proposes any write, config edit, restart, or sudo command with explicit [y/N] confirmation and a concrete rollback command.

Benchmarks (Q4_K_M on 4-Core CPU)

Evaluated end-to-end against the real 5-tool harness on a 4-core CPU Omarchy VM (llama.cpp b12858+ --jinja, temperature=0.1).

Core-12 Benchmark: Base LiquidAI/LFM3-1.7B vs. v1.0

Metric Base LFM3-1.7B (Q4_K_M) Omarchy Agent v1.0 (Q4_K_M) Delta
Total Runtime (12 scenarios) 395.9s 98.8s 4.0x faster
Avg Latency / Scenario 33.0s 8.2s -75.0%
Keyword / Domain Recall 23.6% 32.4% +8.8 pts
First-Run Profile Bootstrap FAIL PASS (13.4s) Clean onboarding
read_system_profile First 2 / 10 (20%) 9 / 10 (90%) +70 pts
Actionable propose_fix Emitted 0 / 9 (0%) 7 / 9 (77.8%) Structured fixes
Safety Refusals (Secrets / Destructive) 1 / 2 (50%) 2 / 2 (100%) 1.7s & 1.3s
Tool-Call JSON / HTTP 500 Errors โ€” 0 / 12 (0%) Zero schema errors

Unseen-20 Holdout Exam (0 Train/Eval Overlap)

Metric Omarchy Agent v1.0 (Q4_K_M)
Total Runtime (20 scenarios) 184.8s (~9.2s / scenario)
Keyword / Domain Recall 55.3%
read_system_profile First 15 / 18 (83.3%)
Actionable propose_fix Emitted 17 / 18 (94.4%)
Safety Refusals (Unseen Adversarial) 2 / 2 (100%) (1.4s & 3.5s)
Tool-Call JSON / HTTP 500 Errors 0 / 20 (0%)

Training Details

  • Base Model: LiquidAI/LFM3-1.7B
  • Stage 1 (LoRA SFT): 1,992 synthetic & verified multi-turn Omarchy/Arch Linux troubleshooting trajectories. Pre-tokenized in pure Python to avoid PyArrow null-key padding across heterogeneous tool call argument schemas (eliminating malformed JSON tool calls).
  • Stage 2 (LoRA DPO): 240 preference pairs targeting tool-calling discipline, Hyprland Lua / Quickshell accuracy, and crisp safety refusals on secret-access and destructive prompts (final DPO loss 0.1862, reward accuracy 98.75%).

Safety, Privacy & Limitations

  • Zero Personal Data: No personal credentials, usernames, emails, hostnames, or private logs were included in training.
  • Defense-in-Depth: Always run the model behind the companion 5-tool harness (omarchy-offline-agent), which enforces a deterministic read-only command allowlist, secret path denylist, and [y/N] approval gate for propose_fix.
  • Scope: Optimized for Omarchy (Arch Linux + Hyprland Lua + Quickshell). General Linux/Arch questions work well, but distro-specific workflows for Debian/Ubuntu/macOS/Windows are out of scope.

License

Derived from LiquidAI/LFM3-1.7B under the LFM Open License v1.0.

Downloads last month
487
GGUF
Model size
2B params
Architecture
lfm3
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for thelaggingway/lfm3-1.7b-omarchy-agent

Adapter
(67)
this model