Skip to main content

Local Knowledge Graph

Linux macOS Windows PyPI Python

Example

A local model reasons step by step, and the reasoning becomes a knowledge graph that is used, not just drawn. Everything runs on your machine.

Run it

pip install mpe-lkg
mpe-lkg

Open http://localhost:5100. It talks to a local model through Ollama and will tell you what is missing and the one command that fixes it. The model matters more than anything else — measured, qwen3:4b-instruct-2507 answers 82.5% of the arithmetic battery against llama3.2:3b's 40%:

ollama pull qwen3:4b-instruct-2507-q4_K_M

Harder questions: mode=explore answers each sub-question with its own run; mode=settle finishes only when two independent runs agree. Any run can be taken as RDF:

curl -sX POST localhost:5100/jobs -H 'content-type: application/json' \
     -d '{"query":"How many seconds are there in 23 weeks?","mode":"settle"}'
curl -s localhost:5100/jobs/<id>/rdf

More

How it works, and what the graph is for the load-bearing measurements, the modules, the strongest-path search
Modes, jobs and RDF reason / explore / settle, the vote, the probes, the vocabulary
Models and configuration choosing models, every environment variable, troubleshooting
Embeddings from inside a model reading a chosen layer instead of an embedding endpoint
Development tests, the battery, 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.9.0.tar.gz (792.0 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.9.0-py3-none-any.whl (288.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mpe_lkg-0.9.0.tar.gz
  • Upload date:
  • Size: 792.0 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.9.0.tar.gz
Algorithm Hash digest
SHA256 d8d5c0791586f72352a4418c55129ca34c0caf3913258d40454196e58ff54e75
MD5 a02ee83bde2d48b56d7efde2ffcf587b
BLAKE2b-256 58c04ce36680defa1d0651fcc4c0d2f90c8445c17ef593508c5e2ab634774327

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpe_lkg-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 288.8 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac9918a74e058968d82877506548e6f132bbc69b2139d254215acbd5957984d5
MD5 b1bd5b5294f215000b6b980ad16df247
BLAKE2b-256 bc9d6c7bbee8f59151ac6ec0270b8ea3074f26997f5432a6acde536ddb711cfd

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 Sentry Error logging StatusPage Status page