LMM — Living Memory Model
Copyright 2026 Rüzgar Kanar

This product includes software developed by Rüzgar Kanar.
Licensed under the Apache License, Version 2.0 (see LICENSE).


================================================================================
WHAT IS ORIGINAL HERE, AND WHAT IS NOT
================================================================================

LMM is NOT a language model trained from scratch. It is a memory-and-reasoning
LAYER that runs on top of an existing, third-party language model.

The original work in this repository is the layer:

  * the fact graph and its trust/contradiction machinery (v3/memory.py,
    v3/gate.py, v3/geometry.py, v3/dynamics.py, v3/transitive.py)
  * the evidence index and its retrieval (lmm/evidence.py, lmm/retrieve.py)
  * the fabrication gate, the coverage/support checks and the abstention
    stamp (lmm/session.py, lmm/verify.py, lmm/prompts.py)
  * the structured-ingestion adapters (lmm/tables.py)

The language capability itself is NOT original to this project. It is supplied
by a pluggable engine, and the default engine is a third-party model.


================================================================================
THIRD-PARTY MODELS
================================================================================

Qwen2.5-3B-Instruct
    The default local engine. Copyright Alibaba Cloud / the Qwen team.
    Licensed under the Apache License, Version 2.0.
    https://huggingface.co/Qwen/Qwen2.5-3B-Instruct

    LMM does not redistribute these weights. They are downloaded by the user
    from their original source. Any LoRA adapter trained by this project's
    consolidation step is a derivative of that base model and inherits its
    license terms.

Other engines are optional and are reached through the same interface:
llama.cpp / GGUF builds of the above (MIT, llama.cpp), and hosted APIs such as
Azure OpenAI (governed by the provider's own terms, not by this license).


================================================================================
BUNDLED EMBEDDING MATRIX  (src/lmm/static/)
================================================================================

Unlike the engines above, this one IS redistributed, because the meaning
channel ships switched on and a channel that needs a download is a channel
most installations never get.

potion-multilingual-128M
    Copyright The Minish Lab. Licensed under the MIT License.
    https://huggingface.co/minishlab/potion-multilingual-128M

    A static embedding distilled by the model2vec method: a table of vectors,
    with no transformer to run. What ships here is a REDUCTION of it —
    108,000 of its word-pieces, projected to 128 dimensions by PCA and stored
    as float16 (src/lmm/static/vectors.npy, src/lmm/static/pieces.txt, 30 MB).
    Nothing was retrained; the reduction is arithmetic over the published
    matrix, and the MIT licence travels with it.

    The segmentation that reads a word into those pieces is this project's own
    (src/lmm/static.py, ~30 lines), so no tokenizer library is redistributed
    or required.


================================================================================
BENCHMARK MATERIAL
================================================================================

The benchmark corpora shipped in bench/ (corpus.txt, corpus_en.txt,
corpus_es.txt and their question sets) are INVENTED for this project: a
fictional world with invented entities, written so that no answer can come from
what a model already knows. They are covered by this repository's license.

Benchmarks reported in the README against real-world documents — a
several-hundred-page device manual, an internal strategy document, an
inspection spreadsheet — were run against third-party and private material that
is NOT redistributed here and is NOT part of this repository. Those documents
belong to their respective owners. Only the aggregate scores are published.
