llama-cpp

Deploy llama.cpp with GGUF quantized models for local LLM inference without CUDA.

Updated May 2, 2026
One-click install
npx skills add https://github.com/qcmuu/AI-Research-Skills --skill llama-cpp-qcmuu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llama-cpp
Source: https://github.com/qcmuu/AI-Research-Skills/tree/main/12-inference-serving/llama-cpp
Command: npx skills add https://github.com/qcmuu/AI-Research-Skills --skill llama-cpp-qcmuu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires llama-cpp-python, and includes references (resource) components.

What problem does it solve?

It solves the need to run local LLM inference without NVIDIA/CUDA by providing a lightweight deployment path for CPUs, Apple Silicon, and consumer/edge hardware using GGUF models.

Core Features & Use Cases

  • CPU-first and edge deployment: Run llama-cli/llama-server with minimal dependencies for offline or resource-constrained environments.
  • GGUF quantization support: Select quantized GGUF formats (e.g., Q4_K_M to Q8_0) to trade off memory, speed, and quality.
  • Hardware acceleration and hybrid offloading: Use Metal (Apple), CUDA (NVIDIA), or ROCm (AMD) and optionally offload selected layers (-ngl) for better throughput.
  • OpenAI-compatible serving: Expose an HTTP API for chat completions so client apps and agent frameworks can integrate easily.

Example: You want a privacy-preserving chatbot on a MacBook (M-series) and need good quality without setting up CUDA—download a GGUF model, run llama-server, and query it via /v1/chat/completions.

Quick Start

Use the server mode to start an OpenAI-compatible endpoint with your downloaded GGUF model by running ./llama-server -m models/llama-2-7b-chat.Q4_K_M.gguf --host 0.0.0.0 --port 8080 -ngl 32.

Frequently Asked Questions about llama-cpp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run local LLM inference on CPU without CUDA?

To run local LLM inference on CPU without CUDA, use llama.cpp with GGUF quantized models. This lightweight deployment path supports CPUs, Apple Silicon, and consumer hardware for offline or resource-constrained environments.

What is GGUF quantization and when do I need it for edge deployment?

GGUF quantization is a model format that reduces memory requirements for local LLM inference. You need it for edge deployment to trade off memory, speed, and quality by selecting formats like Q4_K_M to Q8_0.

Can I use llama.cpp with Apple Silicon or AMD ROCm for hardware acceleration?

Yes, llama.cpp supports hardware acceleration with Apple Metal, AMD ROCm, and NVIDIA CUDA. You can optionally offload selected layers using the -ngl flag for better throughput on these platforms.

How do I set up an OpenAI-compatible API server using a local GGUF model?

To set up an OpenAI-compatible API server, run llama-server with your downloaded GGUF model using the command ./llama-server -m models/llama-2-7b-chat.Q4_K_M.gguf --host 0.0.0.0 --port 8080 -ngl 32 to expose chat completions endpoints.

Does llama-cpp-python support hybrid offloading for privacy-preserving chatbots?

Yes, llama-cpp-python supports hybrid offloading via the -ngl flag for privacy-preserving chatbots. This allows partial layer offloading to GPUs while running the rest on CPU, optimizing throughput on consumer hardware.

What are the limitations of CPU inference with GGUF quantized models?

Limitations of CPU inference with GGUF quantized models include trade-offs between memory, speed, and quality based on the quantization level chosen. Lower quantization reduces memory but may degrade model output quality.