GitHub - punnerud/Local_Knowledge_Graph · GitHub
/" data-turbo-transient="true" />
Skip to content
Type / to search
Sign in<br>Sign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
punnerud
Local_Knowledge_Graph
Public
Notifications<br>You must be signed in to change notification settings
Fork<br>49
Star<br>550
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>26 Commits<br>26 Commits
.github/workflows
.github/workflows
dev
dev
docs
docs
src/mpe_lkg
src/mpe_lkg
.gitignore
.gitignore
LICENSE
LICENSE
Makefile
Makefile
README.md
README.md
app.py
app.py
pyproject.toml
pyproject.toml
View all files
Repository files navigation
Local Knowledge Graph
Ask a local model a question, watch it reason step by step, and see the steps drawn as a<br>graph. Blue edges are embedding similarity — association. Green is what an exact<br>evaluator settled — sums and unit conversions, in fractions, via<br>mpeqs. Everything runs on your machine.
Run it
pip install mpe-lkg<br>mpe-lkg
Open http://localhost:5100. It talks to a local model through<br>Ollama and will tell you what is missing and the one command that<br>fixes it. The model matters more than anything else here — measured, qwen3:4b-instruct-2507<br>answers 82.5% of the arithmetic battery against llama3.2:3b's 40%:
ollama pull qwen3:4b-instruct-2507-q4_K_M
Ask harder questions with mode=explore (each sub-question answered by its own run) or<br>mode=settle (explored twice, finished only when two independent runs agree), and take any<br>run as RDF:
/rdf">curl -sX POST localhost:5100/jobs -H 'content-type: application/json' \<br>-d '{"query":"How many seconds are there in 23 weeks?","mode":"settle"}'<br>curl -s localhost:5100/jobs/id>/rdf
More
Modes, jobs and RDF<br>reason / explore / settle, the vote, the probes, the vocabulary
Models and configuration<br>Choosing models, every environment variable, troubleshooting
Embeddings from inside a model<br>Reading a chosen layer instead of an embedding endpoint
How it works<br>The modules, the strongest-path search, why there is no ANN index
Development<br>Tests, and the gate that checks this documentation against measured data
Licence
The mpedb License 1.0 — the same licence as<br>mpedb and MPEqs,<br>byte for byte.
Free of charge for every person and every organization, with one exception: a group whose<br>revenue or valuation exceeds five billion dollars owes a one-time fee of seven US cents per<br>device. Not an OSI-approved licence.
Published to PyPI as mpe-lkg — M orten P unnerud-E ngelstad L ocal<br>K nowledge G raph.
About<br>No description, website, or topics provided.<br>Resources<br>Readme<br>License<br>Activity<br>Stars<br>550 stars<br>Watchers<br>5 watching<br>Forks<br>49 forks<br>Report repository
Releases
Packages
Used by
Contributors
Languages
You can’t perform that action at this time.