Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

Stars

564 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages