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

Install the binding for your language from its registry:

pip install semq                                    # Python 3.11+
cargo add semq                                      # Rust 1.77+, with a C compiler and CMake 3.20+
go get github.com/The-SEMQ-Group/semq/bindings/go   # Go 1.21+, with cgo and a C compiler
npm install @semq/sdk                               # Node.js 22+ or a browser bundler

See Installation for each language, and CONTRIBUTING to build from a clone of this repository.

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.1.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.1.0
File Size Uploaded
semq-1.1.0.tar.gz 2.5 MB Details

Built distributions (wheels)

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

Total release size: 2.8 MB

Release files / semq-1.1.0.tar.gz

Download URL semq-1.1.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
2f1480a025915f5cb3415a081e664f8c5dea7afab19a82cb158e662603216fad
BLAKE2b-256 checksum
How to use checksums
da4f415c125404df6a28a2c3380d9e7d796dba9df25464544c898e4fea90272e
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 12, 2026.

Transparency log

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

Download URL semq-1.1.0-py3-none-win_amd64.whl
Size 83.1 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
6ca80f5ba7a43b64197c80a4a48098151f80ba8ff34c20df4cc5a618a469ed7d
BLAKE2b-256 checksum
How to use checksums
bed1a0b1e5e073b29842734b4e0863696afafbebdecb71face62be911c14f5a6
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 12, 2026.

Transparency log

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

Download URL semq-1.1.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 85.3 kB
Tags Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
f503d8f065f4afb5ccce964000906b8b5bd37810d12d1cd6820df21a1a589bad
BLAKE2b-256 checksum
How to use checksums
52d17fd3242b5cb3560353786648738d499facde8aef136cdc03fe2969b26784
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 12, 2026.

Transparency log

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

Download URL semq-1.1.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Size 84.8 kB
Tags Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
84abcabdccf41c792e5a293479a42216cabaf9d75c5622651d618d68409da3ed
BLAKE2b-256 checksum
How to use checksums
37b9d3f22a1307f1031fecf41f71f59bd7467f842a50eeb3ad22d02b1601f291
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 12, 2026.

Transparency log

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

Download URL semq-1.1.0-py3-none-macosx_11_0_arm64.whl
Size 80.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dd75fa196e1860a7589f92fc6ea86be056111480dccddf23ea435f5176b4db60
BLAKE2b-256 checksum
How to use checksums
52ed6eedca1546b22016aa47ef365efcddf238e73e7e218d34ffc3d86052833d
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 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

5 release files

1.0.0

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