Instructions to use thelaggingway/lfm3-1.7b-omarchy-agent with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use thelaggingway/lfm3-1.7b-omarchy-agent with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M # Run inference directly in the terminal: llama cli -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M # Run inference directly in the terminal: llama cli -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Use Docker
docker model run hf.co/thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use thelaggingway/lfm3-1.7b-omarchy-agent with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thelaggingway/lfm3-1.7b-omarchy-agent" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thelaggingway/lfm3-1.7b-omarchy-agent", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
- Ollama
How to use thelaggingway/lfm3-1.7b-omarchy-agent with Ollama:
ollama run hf.co/thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
- Unsloth Desktop
- Pi
How to use thelaggingway/lfm3-1.7b-omarchy-agent with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use thelaggingway/lfm3-1.7b-omarchy-agent with Docker Model Runner:
docker model run hf.co/thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
- Lemonade
How to use thelaggingway/lfm3-1.7b-omarchy-agent with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Run and chat with the model
lemonade run user.lfm3-1.7b-omarchy-agent-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use thelaggingway/lfm3-1.7b-omarchy-agent with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use thelaggingway/lfm3-1.7b-omarchy-agent with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "thelaggingway/lfm3-1.7b-omarchy-agent:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
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:
read_system_profile()โ always called first to inspect the compact< 2 KBlocal machine snapshot.write_system_profile(markdown, mode)โ creates/updates~/.local/share/offline-agent/system-profile.mdafter user consent.search_local_docs(query, corpus)โ queries the local SQLite FTS5 index (omarchy,arch-wiki,man,all).run_readonly_cmd(command, reason)โ executes allowlisted read-only diagnostic commands (max 2 per turn).propose_fix(commands, risk_level, rollback, explanation)โ proposes any write, config edit, restart, orsudocommand 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 accuracy98.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 forpropose_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
4-bit
8-bit