Pocket-LLM is an open-source AI compilation framework designed to compress heavy Large Language Models (LLMs) into pocket-sized devices using Non-Euclidean Coral Mathematics. It serves as the native software-compilation layer for the Open Cognitive Core Project (OCCP) to break the silicon memory wall.
Modern Artificial Intelligence is facing an acute energy and memory crisis. Traditional LLMs operate entirely within Euclidean Space (Flat Geometry). However, human language is not flat; it is deeply hierarchical and branching. Forcing a complex language tree into flat rows and columns causes massive geometric distortion. To fix this distortion, software engineers are forced to expand models into hundreds of dimensions, creating massive files (gigabytes) that drain device batteries and require expensive high-end GPUs.
Pocket-LLM thinks completely outside the box by replacing flat linear matrices with Hyperbolic Geometry (Negative Curvature)—mimicking the exact exponential growth formula used by sea corals. In a curved hyperbolic space, the available surface area expands exponentially as you move toward the edges. This structural shift allows billions of complex relational language pathways to nestle tightly together. As a result, we can map complex language hierarchies into just 5 to 10 dimensions instead of 300+, shrinking model sizes by up to 90% with zero semantic or information loss.
While developed as a separate software repository to maintain clean modularity, Pocket-LLM shares identical data fields and boundary alignments to translate heavy software models into low-level silicon reality.
The pipeline works in a fluid, unified cycle:
First, the heavy software model (like Llama or Mistral) feeds its standard 300+ dimension weights into the Pocket-LLM Compiler.
Second, our compiler projects those flat matrices onto curved Poincaré Disks and quantizes them into low-dimensional tensors.
Third, the compiler exports micro-binary files (.bin) that are perfectly sliced to match the register boundaries of the OCCP Co-Processor.
Because the parameter footprint drops dramatically, the OCCP chip can load the entire language brain directly into its internal high-speed SRAM Skew Buffers, bypassing external RAM bottlenecks entirely and running offline local AI at nanosecond speeds.
- Hyperbolic Poincaré Projection: An advanced mathematical pipeline that takes high-dimensional token embeddings and mirrors them into a curved coordinates system without losing textual context.
- Field-Matched Exporter: A specialized utility that structures output binary arrays to match open-hardware silicon register layouts, ensuring true plug-and-play hardware execution.
- Hyperbolic Primitives Runtime: A lightweight execution module that replaces power-hungry linear dot-product calculations with native non-Euclidean distance formulas (sinh, cosh, tanh) for near-zero hardware power consumption.
- Geometry Paradigm: Traditional AI is locked in a Flat Euclidean Grid, whereas Pocket-LLM utilizes a Curved Hyperbolic Coral Shape.
- Dimensional Demands: Traditional frameworks require 200 to 400 dimensions per word token, while Pocket-LLM requires only 5 to 10 dimensions.
- Memory Footprint: Standard models require gigabytes of external VRAM, while compressed coral models fit entirely inside a microscopic local chip SRAM.
- System Independence: Euclidean AI forces reliance on expensive corporate cloud servers, while Pocket-LLM guarantees 100% offline, private, and subscription-free execution on consumer edge devices.
- Phase 1 (Foundations): Finalize the core Python mathematical scripts to project linear vector arrays into hyperbolic tensors.
- Phase 2 (The Compiler Engine): Build the automated conversion utility to ingest open-source HuggingFace models and squeeze their parameters.
- Phase 3 (Hardware Alignment): Standardize binary tensor export layouts to align perfectly with the SRAM registers of the OCCP co-processor.
- Phase 4 (Mobile Deployment): Deliver a lightweight C++/Rust execution runtime optimized for mobile operating systems (Android/iOS).
This project is licensed under the CERN Open Hardware Licence v2 — Weakly Reciprocal (CERN-OHL-W). It is legally mandated that any extension, distribution, or commercial manufacturing of this architecture remains fully open, free, and accessible to everyone, permanently protecting digital freedom from monopolization.
Pocket-LLM — Democratizing Intelligence by Squeezing the World's Knowledge into Every Human's Pocket.