Epistemology

A private open source platform for your local text AI

Language learning models are powerful tools you should feel in control of. This project was created to be a middle ground between bare bones CLI usage of llama.cpp and AI interfaces that are so complex or black boxes they feel untrustworthy. It offers a number of ways it aims to be private that may appeal to you:

Local HTTP GET/POST API

Unlock seamless integration with a local HTTP API designed for your needs. Build your AI tools upon APIs using your preferred technology, backed by a fully transparent and understandable backend. The API's clarity and simplicity ensure complete visibility into every aspect of its operation.

Bring your own static UI

Epistemology comes with a default UI for text completion, but makes it easy to replace with your own personal web frontend.

JSON schema support

Constraining AI outputs using grammars is very powerful, Epistemology natively supports using JSON schema files as grammars so you can get useful structured output for programmatic interfaces.

Getting Started

Install llama.cpp

Download a GGUF model such as TheBloke/phi-2-GGUF

Install binaries (macOS, Linux, Windows)

or

Build from

        cargo install epistemology
    

Run the server

        epistemology -p ~/llama.cpp/main -e ~/Downloads/phi-2.Q2_K.gguf

        Listening with GET and POST on http://localhost:8080/api/text-completion
        Examples:
            * http://localhost:8080/api/text-completion?prompt=famous%20qoute:
            * curl -X POST -d "famous quote:" http://localhost:8080/api/text-completion
    

Find more details by running

    epistemology --help
  
or visiting the project page at https://github.com/richardanaya/epistemology/.

Be in control of your AI.
Powered by Rust.
MIT licensed.
Github.