lk fix-llama-cpp
Rebuild llama-cpp-python from source with GPU acceleration for this machine.
What it does
Rebuild llama-cpp-python from source with GPU acceleration for this machine.
Use this when local GGUF models fail to load with errors like: • "Failed to create llama_context" • "ggml_metal_library_init: error" • "Metal library compilation failed" • "CUDA error: ..." What this does (per platform): • macOS: GGML_METAL=ON + GGML_METAL_EMBED_LIBRARY=ON + GGML_ACCELERATE=OFF (pre-compiles Metal shaders at build time, avoids vecLib clash) • Linux: GGML_CUDA=ON if nvcc found, else GGML_HIPBLAS for ROCm, else GGML_BLAS for OpenBLAS CPU acceleration • Windows: GGML_CUDA=ON if nvcc found, else uses prebuilt wheel Skipped automatically when Python's architecture doesn't match the hardware (e.g. x86_64 Python under Rosetta on arm64 Mac) — the build can't possibly produce a working binary in that case. Takes ~5-10 minutes. Requires cmake + native compiler (Xcode/gcc/MSVC). Falls back gracefully on failure: Ollama backend continues to work.
Usage
Run lk fix-llama-cpp from your terminal. Add --help to any command to see its full flag list, which is always authoritative over this page.
•
lk fix-llama-cpp
Models, offline and private
0:48
See fix-llama-cpp used in a real session, alongside the rest of the models commands.
Related commands
•
lk models — List available models from all configured providers.
•
lk pull — Download a GGUF model from the GCS bucket — no API key, no Ollama needed.
•
lk rm — Remove one or more downloaded GGUF models and free disk space.
•
lk sync-catalog — Refresh the local model catalog from the canonical GCS catalog.json.
•
lk train — Register a downloaded GGUF model for Local Keep AI usage.
•
lk train-all — Register all downloaded GGUF models for Local Keep AI usage.
•
lk use — Set the default GGUF model Local Keep AI will use.
Where this is defined
fix-llama-cpp is declared in ai-platform/sage/commands_models.py. This page is generated from that source, so it cannot describe behaviour the CLI does not have.
All documentation
Installation
Install the CLI on macOS, Linux or Windows, and sign in.
Setup, start to finish
The whole path on one page: install, sign in, pick local or hosted, get an answer.
Connecting accounts
One account everywhere, registering devices for the SMS bridge, and OAuth integrations.
Models
Pull open-weight models, switch between them, and run fully local.
Using models on every client
What runs locally in a terminal, a browser tab, a phone and the desktop app.
Editor integrations
VS Code, Cursor, JetBrains, Neovim, Sublime, Zed, Godot, Unity, gh and git hooks.
The SMS bridge
Send a task to your own machine from your phone, and get the answer back.
The apps
One React Native codebase behind iPhone, Android, web and desktop — and how to run it.
Automation Studio
Idea to production: flows, per-step models, your machines or ours, live editing.
Enterprise seats
Licensed team seats under one owner account — invites, billing, and how seats resolve.
API reference
API keys, authentication, chat completions, pricing and errors — for your own software.
Notifications
Four channels, all opt-in, how to change them, and the limits on re-engagement.
Privacy
What leaves your machine, what never does, and how anonymisation works.
Troubleshooting
When a model will not load, a command hangs, or the CLI cannot be found.