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.

Metadata

Release files for pocket-o-llama 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pocket-o-llama 1.0.1
File Size Uploaded Provenance Actions
pocket_o_llama-1.0.1.tar.gz 889.1 kB Without provenance Details for pocket_o_llama-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pocket-o-llama 1.0.1
File Interpreter ABI Platform Actions
pocket_o_llama-1.0.1-py3-none-any.whl Python 3 none any Details for pocket_o_llama-1.0.1-py3-none-any.whl

Total release size: 1.0 MB

Release files / pocket_o_llama-1.0.1.tar.gz

Download URL pocket_o_llama-1.0.1.tar.gz
Size 889.1 kB
Tags Source
SHA-256 checksum
How to use checksums
726638aede68fbe2aaeff8a30f1d71196351e9115957cc9fc7ab98c0812c3547
BLAKE2b-256 checksum
How to use checksums
b7e931c207564da9097f232ae664c55a7db7d912df848764780c9f9e839908a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / pocket_o_llama-1.0.1-py3-none-any.whl

Download URL pocket_o_llama-1.0.1-py3-none-any.whl
Size 156.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
884d3d10660361c4144d8ac47dc9ed568cb6b62cd1e52e5d4d4bf082ff1517e5
BLAKE2b-256 checksum
How to use checksums
dcb98e43f63938f63fe3fbcaf2b46cf277f0faa0b180da0c57de93a9fa2b8f95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for pocket-o-llama 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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