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.1.tar.gz (796.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.9.1-py3-none-any.whl (290.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mpe_lkg-0.9.1.tar.gz
  • Upload date:
  • Size: 796.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.9.1.tar.gz
Algorithm Hash digest
SHA256 5c3231931a12541140704ab631c51a76310f9d4ab5fb07449cb35e3bc7dac5ce
MD5 6160a486a0dfdbe373038a40a4beb8cb
BLAKE2b-256 a85a90fd21db5c610d1b0cc1d9879ff3e4417deeea5ba577dcad7f3558c824ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mpe_lkg-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 290.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 00c34dd2f0952d8cbd8a549834548e96bf37e2ebffeb740fb5b21e81d9cd4b5c
MD5 e7c9003923252080d0565e7e12461ef1
BLAKE2b-256 8a19cf033954dbb844cf430660f8d138ca11231a13cd352a5c5704d093de3286

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