Skip to main content

SEMQ

Deterministic symbolic states for float32 vectors.

test docs license Python Rust Go TypeScript

When you re-embed a corpus (new GPU, new batch size, a library bump, a model update), you need to know whether anything actually changed, and if so, where it changed. SEMQ turns unit-norm float32 vectors produced by your embedding or feature pipeline into compact symbolic rows kept under your ids, with an identity for the whole state derived from the rows themselves (a SHA-256). You can measure your pipeline's own rebuild noise (via Floor) and diff new builds against it row by row, so rebuild noise passes and real changes fail with identical results in every binding and on every architecture.

A hash of the raw floats tells you whether the bytes changed, not whether the state did. A rebuild on another device or with another batch size never produces the same bytes, so a float hash fires on every rebuild and says nothing about where. SEMQ encodes each vector as a few quantized symbols, so rebuild noise below the bin width leaves the rows and their state_id unchanged; for the rows that do move, diff against a floor measured on your own null rebuilds tells noise from change, row by row.

Build with our Python, Rust, Go, and TypeScript/WASM bindings, or call the C core directly.

SEMQ does not generate embeddings, train a model, normalize vectors, or search. The input is unit-norm, finite float32.

What the SDK provides

Need SEMQ capability
Compact representation quant, phase and orbit operators, one CodecConfig each
A state with an identity Encoding: sorted ids, canonical rows, a manifest, content_digest and state_id
Persistence The .semq file format, validated on load before any allocation
Change detection Diff: added, removed and changed rows with hamming distances
A rebuild gate Floor measured from null rebuilds (the unchanged corpus encoded again) and bound to its reference; semq diff --floor
Deployment targets Python, Rust, Go, and TypeScript/WebAssembly

The bytes and verdicts are pinned by the shared conformance vectors.

Where it fits

embedding model → float32 unit-norm vectors → SEMQ state (.semq) → diff, floor, verdict

Install

The following source installation keeps the Python binding and core at the same revision. It requires Python 3.11+, a C/C++ toolchain, CMake 3.20+, and Ninja.

git clone https://github.com/The-SEMQ-Group/semq.git
cd semq
python3 -m venv .venv
. .venv/bin/activate
python -m pip install cmake ninja
python -m pip install .

These commands use a POSIX shell. See Installation for Windows setup and the Rust, Go, and TypeScript builds.

Encode, save and compare

Three embeddings of dimension 4 under your own ids, no model or dataset needed. Encode them, save the state, load it back and diff it against a rebuild in which doc-3 changed:

import numpy as np
from semq import Codec, Encoding

vectors = np.array([
    [0.6, 0.8, 0.0, 0.0],
    [0.0, 0.6, 0.8, 0.0],
    [0.0, 0.0, 0.6, 0.8],
], dtype=np.float32)
ids = ["doc-1", "doc-2", "doc-3"]
manifest = {"encoder": "example-encoder", "encoder_revision": "1"}

codec = Codec.quant(dim=4, bins=4)
codec.encode(vectors, ids=ids, manifest=manifest).save("corpus.semq")

reference = Encoding.load("corpus.semq")
print(reference)

rebuilt = vectors.copy()
rebuilt[2] = [0.8, 0.0, 0.0, 0.6]  # doc-3 changed
print(reference.diff(codec.encode(rebuilt, ids=ids, manifest=manifest)))

Expected output:

Encoding(3 rows, quant(dim=4, bins=4), state_id 6e6f8a89bae4...)
1 of 3 rows changed: doc-3 (hamming 3). 0 added, 0 removed.

diff.as_dict() is the machine-readable report. To tell a change like this from the noise of a rebuild that changed nothing, measure a floor from null rebuilds and gate against it: the quickstart does that in four languages, and Gate a rebuild from the command line.

Documentation

Read the SDK documentation site or browse its source landing page.

Task Start here
Understand states, identities, diffs and floors Concepts
Gate an embedding rebuild Gate a rebuild, CLI
Choose a configuration Configuration guide
Look up a binding operation API reference
Read the byte and verdict contracts Core contracts, file format
Compare measured quality and storage Benchmark overview
Check the bytes every binding must produce Conformance vectors
Upgrade an installation Compatibility and migration, changelog
Contribute or maintain the SDK Contributor guide
Report a vulnerability Security policy

License and community

The SDK is licensed under the PolyForm Noncommercial License 1.0.0. Production use by companies, and any other use the license does not permit, requires a separate license from The SEMQ Group Inc.; write to licensing@thesemqgroup.ai. The licensing FAQ answers common questions about permitted use. See NOTICE for the required notice and the Code of Conduct for community expectations. The npm package also includes the third-party components listed in THIRD_PARTY_LICENSES.

Metadata

Release files for semq 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semq 1.0.0
File Size Uploaded
semq-1.0.0.tar.gz 2.4 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for semq 1.0.0
File
semq-1.0.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
semq-1.0.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details
semq-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64, Linux glibc 2.17+ ARM64 Details
semq-1.0.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 2.7 MB

Release files / semq-1.0.0.tar.gz

Download URL semq-1.0.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
8b4d560b37f97b1806ddb8d9c7a9fab2315d03857c8e6fc37570011fce87317f
BLAKE2b-256 checksum
How to use checksums
463ac027005395258c1c18e6dd73fa9addd14f1395deceea6fb40ac3f7a111ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / semq-1.0.0-py3-none-win_amd64.whl

Download URL semq-1.0.0-py3-none-win_amd64.whl
Size 73.6 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
44e2ecb5a1c163cac47dd9183e8201859e6430e82536b0b6c225a0c8617a244f
BLAKE2b-256 checksum
How to use checksums
56bd46d532d461cb3b4e9afdaa1efbae0cbb8cd839a3b8f030eb2f1424da3f2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / semq-1.0.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL semq-1.0.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 74.5 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b28b3009b8a7366f5abfc96d80ddb60c987b63c39f8964c26f0b16b0627518fc
BLAKE2b-256 checksum
How to use checksums
63bda7c8889129636692267e841d7bcd5245fcea0fe3a9793e070750950adb86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / semq-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

Download URL semq-1.0.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 73.5 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
981f8c6a08ed033f7683e0478c95fc9d9bca2f1e7ee0f93ee8899fcd12b03b1d
BLAKE2b-256 checksum
How to use checksums
d2653ae85a9634ee4c2ed650c2830893d137a90e9711fcb6a8a25f1dcc289a5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / semq-1.0.0-py3-none-macosx_11_0_arm64.whl

Download URL semq-1.0.0-py3-none-macosx_11_0_arm64.whl
Size 71.3 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fa4add3cb0affffe82ee7e6e1267cfa8b628b9d4084e50205cb8f77fd24b56ed
BLAKE2b-256 checksum
How to use checksums
b4e9a3d2d56d0aad02be85b0833e848205e7a6ecbdd9410b4c924b8015bb04de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.0

5 release files

This release

1.0.0 This release

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page