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.0.tar.gz (887.3 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.0-py3-none-any.whl (155.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pocket_o_llama-1.0.0.tar.gz
  • Upload date:
  • Size: 887.3 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.0.tar.gz
Algorithm Hash digest
SHA256 d6b1aa66653f028ed2282ac40bbf370dcd7a79e38b523fe0d1922c5e48305b18
MD5 db235a46b4023b9a5d5b7ba97486292f
BLAKE2b-256 b9b9f06c6874218d0496a8c257b2f4b6147a8f2bd6e631ae758ff70cbffc4b7b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pocket_o_llama-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 155.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41471d3aca6fe94dbbb30204b9b3be2e996441e9291df37e24fca9315fa18b37
MD5 f8b623accc2fb82fce7625738601f4b8
BLAKE2b-256 6455439929ac0ac4711495a4f86b9b043f2a7f64eb7b944eaa33d946d719b509

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.1

2 files

This release

1.0.0 This release

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