Skip to main content

Pocket-O-Llama

Pocket-O-Llama Logo

Your local, high-precision GGUF model server.
Designed to run smoothly on low-spec hardware without throttling your system.
Empowering developers to run AI locally, efficiently, and privately.

PyPI version Python Version License


Why Pocket-O-Llama?

Running local LLMs shouldn't require a supercomputer or a massive, bloated installation. Pocket-O-Llama is a lightweight, hardware-agnostic alternative to heavier engines. It is designed from the ground up to maximize the performance of highly quantized models (like those from Unsloth AI) on everyday laptops and desktops.

  • Native Hugging Face Hub Integration: Pass any GGUF repository ID (e.g., unsloth/Llama-3.2-1B-Instruct-GGUF), and the server will auto-resolve, download, and cache the optimal quantization for you.
  • True Zero-Copy Streaming: Real-time token streaming using llama_cpp for instant Time-To-First-Token.
  • Interactive Web Dashboard: Comes with a beautiful, built-in dark-mode UI with Markdown rendering, model switching, and real-time conversation history.
  • OpenAI Drop-In Replacement: Fully schema-compatible with /v1/chat/completions, meaning it instantly works with your existing LangChain, LlamaIndex, or AutoGen scripts.
  • Zero Port Conflicts: Runs independently on custom ports (default 11435) so it never clashes with other local services.

Installation

Install Pocket-O-Llama directly via pip. It is recommended to use a virtual environment.

pip install pocket-o-llama

or

Clone the repository and install it locally via pip:

cd Pocket-O-Llama
python -m pip install .

Usage

Launch your local GGUF model server directly from the command line by passing the path to your model file:

# Example 1: Auto-download and run an Unsloth model from Hugging Face
pocket-chat --model unsloth/Llama-3.2-1B-Instruct-GGUF

# Example 2: Run a local .gguf file with custom thread allocation
pocket-chat --model "/path/to/your/model.gguf" --port 11435 --threads 4

Once running, open your browser and navigate to http://localhost:11435 to access the interactive chat dashboard!

Command-Line Arguments

Argument Short Description Default
--model -m Hugging Face Repo ID or absolute path to a local .gguf file unsloth/Llama-3.2-1B-Instruct-GGUF
--port -p Port to run the FastAPI server on 11435
--host Host IP address (Use 127.0.0.1 to expose to LAN) 127.0.0.1
--threads -t Maximum CPU threads to allocate 4

API Usage/Testing

Pocket-O-Llama acts as a drop-in replacement for OpenAI/Gemini/Anthropic API. You can hit the /v1/chat/completions endpoint exactly as you normally would.

Using Python requests:

import requests

response = requests.post(
    "http://localhost:11435/v1/chat/completions",
    json={
        "messages": [
            {"role": "system", "content": "You are a helpful, brilliant coding assistant."},
            {"role": "user", "content": "Write a Python function to calculate the Fibonacci sequence."}
        ]
    }
)

print(response.json()["choices"][0]["message"]["content"])

Using cURL (Streaming):

curl -X POST http://localhost:11435/api/chat \
-H "Content-Type: application/json" \
-d '{
  "model": "unsloth/Llama-3.2-1B-Instruct-GGUF",
  "messages": [{"role": "user", "content": "Explain quantum computing in one sentence."}],
  "stream": true
}'

Roadmap (v0.2.0 & Beyond)

We are actively developing features to push the boundaries of lightweight local AI:

  1. The "OS-Sandbox" HITL Agent: Zero-config native tool calling with interactive macOS-style GUI permission prompts (Human-in-the-Loop) before executing code or reading local directories.

  2. Dynamic LoRA Swapping: Instant, memory-efficient "Skill Cartridge" swapping for base models.

  3. LAN Compute Swarming: Peer discovery to split GGUF inference layers across multiple low-spec devices on the same Wi-Fi network.


License & Author

Created by Hrutu Surve

This project is open-source and fiercely protected against unauthorized closed-source corporate usage under the GNU AGPLv3 License. See the LICENSE file for full details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pocket_o_llama-1.0.1.tar.gz (889.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pocket_o_llama-1.0.1-py3-none-any.whl (156.0 kB view details)

Uploaded Python 3

File details

Details for the file pocket_o_llama-1.0.1.tar.gz.

File metadata

  • Download URL: pocket_o_llama-1.0.1.tar.gz
  • Upload date:
  • Size: 889.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pocket_o_llama-1.0.1.tar.gz
Algorithm Hash digest
SHA256 726638aede68fbe2aaeff8a30f1d71196351e9115957cc9fc7ab98c0812c3547
MD5 8e39f884b605398caed0c4e1f264f4ef
BLAKE2b-256 b7e931c207564da9097f232ae664c55a7db7d912df848764780c9f9e839908a7

See more details on using hashes here.

File details

Details for the file pocket_o_llama-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pocket_o_llama-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 156.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for pocket_o_llama-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 884d3d10660361c4144d8ac47dc9ed568cb6b62cd1e52e5d4d4bf082ff1517e5
MD5 1e9b045715b7c9f801a1fedd4b8459c2
BLAKE2b-256 dcb98e43f63938f63fe3fbcaf2b46cf277f0faa0b180da0c57de93a9fa2b8f95

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page