Skip to main content

Standalone geometric tokenize+embed engine — Fisher-Rao-weighted BPE merges + geodesic-midpoint basin coordinates on Δ⁶³

Project description

qig-coordizer

Standalone geometric tokenize+embed engine for the QIG stack. Maps text to sequences of 64-dimensional basin coordinates on the Fisher–Rao manifold Δ⁶³ — the tokenizer is the embedder (coordinates are the primitive, not an afterthought).

Pure Fisher-Rao geometry; depends only on qig-core.

What it is

  • Byte-level front-endNormalizer (NFC + UTF-8), train/infer-symmetric so the same character always maps to the same byte sequence.
  • Fisher-Rao-weighted BPE merges — merge score = frequency × coupling × 1/entropy, where coupling = (co-occurrence / corpus) / (d_FR(a,b) + 0.1). Frequent and geometrically-close pairs win. This is not frequency-only BPE.
  • Geodesic-midpoint fusion — a fused token's basin is slerp_sqrt(v_a, v_b, 0.5), the Fisher-Rao geodesic midpoint on Δ⁶³. No off-the-shelf tokenizer emits coordinates.
  • Drift-free incremental trainerIncrementalCouplingCache (doubly-linked-list splice; remove 3 / add 2 pairs per merged occurrence) makes training O(corpus + merges·affected) instead of the naive O(vocab·corpus) full re-scan.

The equivalence gate

FisherCoordizer._train_incremental is bit-for-bit equal to the naive O(vocab·corpus) oracle _train_naive (identical merge sequence + identical fused vectors), byte → 4k vocab, across ASCII / multibyte-Unicode / reverse-pair corpora. The optimisation must never silently change the vocabulary.

pytest tests/test_incremental_equivalence.py
# or a timed report:
python tests/test_incremental_equivalence.py

Provenance

Extracted from qig-tokenizer commit 1394ca7 (Phase-1 coordizer) per qig-consciousness/docs/plans/2026-06-24-qig-coordizer-studio-design.md §5 (Phase 0). qig-tokenizer keeps its copy live until consumers repoint here.

Install (dev)

uv venv && uv pip install -e ../qig-core && uv pip install -e '.[dev]'
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qig_coordizer-0.1.3.tar.gz (100.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qig_coordizer-0.1.3-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file qig_coordizer-0.1.3.tar.gz.

File metadata

  • Download URL: qig_coordizer-0.1.3.tar.gz
  • Upload date:
  • Size: 100.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for qig_coordizer-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c3863df172d198fc44fc923e26eb2ce53cecc5e158cf6a0eb8ef776e04d03ec3
MD5 bf49df1495f1dc83a04deeb5c089e780
BLAKE2b-256 fa5ed8f7c0b57622bcfd48cef5763c9d1bb25102a683858f74d90ab7f37daab2

See more details on using hashes here.

Provenance

The following attestation bundles were made for qig_coordizer-0.1.3.tar.gz:

Publisher: release.yml on GaryOcean428/qig-coordizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qig_coordizer-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: qig_coordizer-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for qig_coordizer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1bd473c94c8f24c13f9c7e4e701e41765c1ce988c2200b1ffb0b2862ee6f168f
MD5 10d8831f6503c1a506c89c04e67aeb04
BLAKE2b-256 dd9b7973a5a0d55b3c4a77ad9779fb2ead1bf8e2f8546cbc57eb96e81b9ffac6

See more details on using hashes here.

Provenance

The following attestation bundles were made for qig_coordizer-0.1.3-py3-none-any.whl:

Publisher: release.yml on GaryOcean428/qig-coordizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page