Skip to main content

Local Knowledge Graph

Linux macOS Windows PyPI Python

Example

Ask a local model a question, watch it reason step by step, and see the steps drawn as a graph where the edges are how similar the steps are to each other.

Everything runs on your machine. Nothing is uploaded anywhere.

Run it

pip install mpe-lkg
mpe-lkg

Then open http://localhost:5100.

It needs a local model, which it reaches through Ollama. You do not need to work that out from here — start it and it will tell you what it found, what is missing, and the one command that fixes it. mpe-lkg doctor reports the same thing without starting the server, and exits non-zero, so it works in a script.

Python 3.10 or newer. The wheel is py3-none-any, so nothing is compiled and the same artefact serves Linux, macOS and Windows — all three tested on every push.

From a clone, or from Python
git clone https://github.com/punnerud/Local_Knowledge_Graph
cd Local_Knowledge_Graph
python3 -m venv .venv && .venv/bin/pip install -e .
.venv/bin/mpe-lkg

python app.py still works from a clone as it always has.

from mpe_lkg import create_app, health

print(health())
create_app().run(port=5100)

More

Models and configuration Choosing models, every environment variable, troubleshooting
Embeddings from inside a model Reading a chosen layer instead of an embedding endpoint
How it works The modules, the strongest-path search, why there is no ANN index
Development Tests, and the gate that checks this documentation against measured data

Licence

The mpedb License 1.0 — the same licence as mpedb and MPEqs, byte for byte.

Free of charge for every person and every organization, with one exception: a group whose revenue or valuation exceeds five billion dollars owes a one-time fee of seven US cents per device. Not an OSI-approved licence.


Published to PyPI as mpe-lkgMorten Punnerud-Engelstad Local Knowledge Graph.

Download files

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

Source Distribution

mpe_lkg-0.4.0.tar.gz (669.6 kB view details)

Uploaded Source

Built Distribution

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

mpe_lkg-0.4.0-py3-none-any.whl (229.7 kB view details)

Uploaded Python 3

File details

Details for the file mpe_lkg-0.4.0.tar.gz.

File metadata

  • Download URL: mpe_lkg-0.4.0.tar.gz
  • Upload date:
  • Size: 669.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for mpe_lkg-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4347fae761f1b179ad518470531a7aa7573f554c83e8d8b14d6669438fd079dd
MD5 3f7764dc9cd80e0a70057119b1da93a5
BLAKE2b-256 1d11f08328c1457a8e0b8f69923218b90c46d67b9dbfa142a28719af844859d9

See more details on using hashes here.

File details

Details for the file mpe_lkg-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: mpe_lkg-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 229.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.12

File hashes

Hashes for mpe_lkg-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8e420a4807e59075f06e5d23e0b0b655bddc8f1aef5ecc141ffa48f45f4a30
MD5 bc257f0f46e7787e76f7d69f60ed8ed9
BLAKE2b-256 9dcd7ca757e03b346bc70ed0acc03d57ac3d8a875729e8f419232383368d66a5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page