8000 GitHub - hofftodd/ai-tools: Personal tooling for running LLMs locally with llama.cpp · GitHub
[go: up one dir, main page]

Skip to content
hofftoddPublic

About

Personal tooling for running LLMs locally with llama.cpp

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

60 Commits

Folders and files

Repository files navigation

ai-tools

Tools for running local LLMs across two machines as one pool, using them from coding agents, orchestrating agent work with ai-factory, and benchmarking the models. How they fit together is in ARCHITECTURE.md; open work is in TODO.md.

What's here

What it does Runs on
ai-swap/ One endpoint and chat UI for every model on every machine: starts the right engine on demand, swaps models to fit memory, forwards requests between machines both (:8080)
ai-swap-clients/ Writes pi, oh-my-pi, opencode and Claude Code configs for every model in the ai-swap cluster both
llama-config/ Generates the R9700 box's ai-swap config from the GGUFs in ~/models, fitted to the GPU Linux box
ai-factory/ Orchestrates coding agents (planners, tester, builder) on local models, in Docker sandboxes (formerly Foreman) mini-ubuntu2 (:8700)
ai-bench/ Benchmarks models (speed, LiveCodeBench, agentic terminal tasks) and writes the analyses both
ai-delegate/ MCP server that lets Claude Code hand work to the local models: questions, reviews, and coding jobs in a sandbox that come back as a diff where Claude Code runs
ai-common/ Python package ai-factory and ai-delegate share: Docker sandboxing and the isolated network's relay, the guarded web fetch and search client, an ai-swap client with model leases wherever those run
ai-search/ Web search for the local models: a SearXNG-compatible endpoint with Brave Search (or SearXNG) behind it mini-ubuntu2
hf-watch/ Notifies you when new models of interest appear on Hugging Face Mac
sync-models/ Backs model files up to the NAS (two-way on the Linux box, one-way from the Mac) both
keys/ Inventory of every API key (names only) and templates that render each machine's env files from the ai-suite 1Password vault all
suite Clones, updates and checks the whole suite on a machine both

ai-swap, ai-factory, ai-bench, ai-delegate and ai-common are separate GitHub repos cloned inside this folder. They're hidden from this repo's git through .git/info/exclude (local only, never committed), so each keeps its own history, branches and pull requests. Everything else is part of this repo.

Setting up a machine

git clone git@github.com:hofftodd/ai-tools.git ~/dev/ai-tools
cd ~/dev/ai-tools
./suite clone      # clone ai-swap, ai-factory, ai-bench, ai-delegate and ai-common into place
./suite update     # build ai-swap, set up the Python environments, link tools into ~/.local/bin

Then, per machine:

  • ai-swap: write ~/.config/ai-swap/config.yaml (by hand on the Mac; llama-config on the Linux box) and run it as a service: a LaunchAgent on macOS (ai-swap/examples/ai-swap.plist), a systemd user unit on Linux. Each machine lists the other under peers:.
  • Agents: ai-swap-clients --default flint (Mac) or let llama-config run it (Linux box).
  • hf-watch (Mac): install its LaunchAgent, see hf-watch/README.md.

Day to day

suite                 # what's checked out where, and what's out of date or uncommitted
suite --fetch         # same, after fetching
suite update          # pull everything, rebuild ai-swap (restarting it if it changed), sync envs

suite pull and suite update only fast-forward: a repo with local changes or a diverged branch is skipped and reported, never merged or overwritten.

Task Command
Chat with any model http://studio.local:8080/ or http://mini-ubuntu.local:8080/
Use a model from an agent pi --provider ai-swap-<model> --model <model>, claude-swap --model <model>
See what's loaded where the ai-swap UI's Models view, or curl :8080/api/status
Free a machine for something else curl -X POST :8080/api/unload
Benchmark cd ai-bench && uv run aibench -c bench-mac.yaml run -m <model> -s <suite> (reserves ai-swap for the run)
Change the Linux box's models llama-config [resident models…]
Back up models sync-models (mount the NAS first on the Mac)

Machines

Mac Studio (studio) Linux box (mini-ubuntu) ai-factory host (mini-ubuntu2)
Hardware M5 Ultra, 256 GB unified memory Radeon AI PRO R9700, 32 GB VRAM Core Ultra 5 125H, 92 GB RAM, no model GPU
Network (reserved address) wired, 192.168.0.4 Wi-Fi, 192.168.0.3 wired, 192.168.0.7
Engines DwarfStar (DeepSeek), oMLX (MLX), llama.cpp (Metal) llama.cpp (Vulkan) none (Docker for ai-factory's agents)
ai-swap config ~/.config/ai-swap/config.yaml, hand-written same path, generated by llama-config same path, hand-written, no models, role: ai-factory host
ai-swap service LaunchAgent com.github.hofftodd.ai-swap systemd user unit ai-swap systemd user unit ai-swap
Always loaded flint qwen3.8-27b –
Also runs ai-factory (systemd user unit ai-factory, :8700)

llama-config is Linux-only: it fits GGUFs to a discrete GPU's VRAM (llama-server --list-devices), knows only llama.cpp, and manages systemd services. The Mac uses unified memory and also runs DwarfStar and oMLX, so its ai-swap config is written by hand.

About

Personal tooling for running LLMs locally with llama.cpp

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0