Skip to main content

winnex-xfactor

Deterministic manifold embedding for native LLM inference.

The X-Factor is a training-free operator that embeds text into a pretrained model's latent space — computed structurally from embed_tokens, never by running the model.

PyPI Python C++ License: BSL 1.1

What it is

For any model, the X-Factor is the orthonormal basis of the manifold where its token embeddings live:

Ē = E − mean(E)                  (center)
C = ĒᵀĒ / V                       (D×D covariance)
C = U Λ Uᵀ                         (eigh, Λ descending)
r = min{r : cumsum(Λ₁..r)/ΣΛ ≥ τ}  (effective rank)
X = U[:, :r]                       (the X factor: D×r manifold basis)
P = X·Xᵀ                           (orthogonal projector)

The projector is idempotent (P²=P) and symmetric (Pᵀ=P) — the orthogonal projection onto the model's embedding manifold.

Why it is fast

The eigendecomposition uses power iteration with deflation:

O(D²·r·iters)  vs  O(D³) for a full Jacobi/eigh

~2000× faster at D=2048, with the same deterministic guarantee (the Madhava philosophy: bound-guided selection, provable operators, no black boxes).

Install

pip install winnex-xfactor

Requires Python ≥ 3.8 and NumPy. The C++ core ships pre-built in the wheel.

Quick start

import numpy as np
import winnex_xfactor

# 1. Compute the X-Factor from a model's embed_tokens (a sample is enough).
E = np.random.randn(5000, 2048).astype(np.float32)
P, rank, variance = winnex_xfactor.compute_xfactor(E, 5000, 2048, tau=0.95)
print(f"rank={rank}, variance captured={variance:.3f}")

# 2. Embed a spectral token into the model's manifold.
psi = np.ones(64, dtype=np.float32)
h = winnex_xfactor.embed_spectral(psi, P)   # length 2048, on the manifold

API

  • compute_xfactor(embed_tokens, vocab, dim, tau=0.95) -> (P, rank, variance)
  • XFactor(embed_tokens, vocab, dim, tau) — object with .project, .project_batch, .projector, .basis, .rank, .variance_captured, .dim
  • expand_spectral(psi, d, D) — zero-pad + L2 normalize
  • embed_spectral(psi, P) — full text→manifold projection

Benchmark

Run the benchmark on Kaggle — installs winnex-xfactor (and winnex-nano for the safetensors loader) from PyPI and computes the X-Factor from real embeddings of a Qwen model (Kaggle qwen-lm/qwen):

Kaggle

Result: effective rank 118 (D=128, τ=0.95, variance captured 0.954), compute 0.03s — power iteration with deflation (O(D²·r)) on real embeddings.

License

BSL 1.1 | pay@winnex.ai | (c) Winnex Brasil Soluções Empresariais LTDA-ME

Metadata

Release files for winnex-xfactor 1.0.6

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

Source distribution (sdist)

Source distribution for winnex-xfactor 1.0.6
File Size Uploaded Provenance
winnex_xfactor-1.0.6.tar.gz 18.5 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for winnex-xfactor 1.0.6
File
winnex_xfactor-1.0.6-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
winnex_xfactor-1.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
winnex_xfactor-1.0.6-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
winnex_xfactor-1.0.6-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
winnex_xfactor-1.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
winnex_xfactor-1.0.6-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
winnex_xfactor-1.0.6-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
winnex_xfactor-1.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
winnex_xfactor-1.0.6-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
winnex_xfactor-1.0.6-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
winnex_xfactor-1.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
winnex_xfactor-1.0.6-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 1.4 MB

Release files / winnex_xfactor-1.0.6.tar.gz

Download URL winnex_xfactor-1.0.6.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0ca593116f237c670dddab6ef5bf4c7b427f47d581bca1dc456ba6b49a9bb35d
BLAKE2b-256 checksum
How to use checksums
aafec5cb9544148a49f892696918b37351f7cf6945a1a880c4177a773be4a377
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp313-cp313-win_amd64.whl

Download URL winnex_xfactor-1.0.6-cp313-cp313-win_amd64.whl
Size 116.2 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
2807bd62089ed3b672534c59882af27c75f42dcfe4f41d23811fca36708ea4b2
BLAKE2b-256 checksum
How to use checksums
e251030c864fbf36506a9aff4ac8fd13366ac4dbab1eb0288e3b28c6d4266ddc
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.6-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 124.2 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
661e94b31d7e13e0880da8bee8ad5e69c04b2107670ebf0a66936ca8238acc64
BLAKE2b-256 checksum
How to use checksums
823aee5a7960e3354395870f22982c51cde0c20c38953302b8edd24ef3233587
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp313-cp313-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.6-cp313-cp313-macosx_11_0_arm64.whl
Size 101.5 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b8a70ff56d66f0d59f4b23d9a43bb9b4919c309f3ee83b20a94b2ec2f7c876d3
BLAKE2b-256 checksum
How to use checksums
bc8754ab061f24c828dc116863e3984036cc6e5cfea18651989c9e46c757aa5c
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp312-cp312-win_amd64.whl

Download URL winnex_xfactor-1.0.6-cp312-cp312-win_amd64.whl
Size 116.1 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
af8506d0ac489da62c71b4272b8692f6b3e73c43e0189877b24db60a52981109
BLAKE2b-256 checksum
How to use checksums
8de99470a4ae608b4788aa7ca95c7746a26f4f9c25cc745caebb7bf6c6219fe9
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.6-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 124.2 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
1336f20106fcb3acb0531025b04fd1d1536c07a9dd192e5f6900a3d96fed6a42
BLAKE2b-256 checksum
How to use checksums
40ce6684a5894729bccb569ba62c4ce9731e5ab4cd83b2b60dcdd98dc03ddd0d
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp312-cp312-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.6-cp312-cp312-macosx_11_0_arm64.whl
Size 101.5 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
cb863f3fd0de1a75ea9b1892ebefb7db772df984264a2c0adee0277f0cae2d0a
BLAKE2b-256 checksum
How to use checksums
1f4dcf37acdf11313c774a9fce1c993f5fc4b01e216868ba9ac894673a1d49fc
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp311-cp311-win_amd64.whl

Download URL winnex_xfactor-1.0.6-cp311-cp311-win_amd64.whl
Size 113.9 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
fee43e96145c51f59833f5d9615efbcef43e307560b3c79c72c837f7b24949c8
BLAKE2b-256 checksum
How to use checksums
7c09aa99e5b790973c1f07d5717db5d4144d71740095a78e89243e4847ff7261
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 123.2 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
36916c136656af3ce76a2c1847a2db534880937ff11a969576ce25ec077d6fee
BLAKE2b-256 checksum
How to use checksums
e26c5ebb2c98028f552eea2f8f4ec58f414f580d9ba0f627aa25011bbcdd7062
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp311-cp311-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.6-cp311-cp311-macosx_11_0_arm64.whl
Size 100.5 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
aa6938f22011748d87953b3396adb13f581b62ea38c80f18b316c6afa39d9e3d
BLAKE2b-256 checksum
How to use checksums
35dd87be6f00cbf32c8dc7baf3cacc1c892677277998a2185f744c5c2ed8beae
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp310-cp310-win_amd64.whl

Download URL winnex_xfactor-1.0.6-cp310-cp310-win_amd64.whl
Size 112.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f26cd76e6a92826d083005c3d5ec248504b4d4e67dcc15c1aaa708874cff7b60
BLAKE2b-256 checksum
How to use checksums
fea8da93b08cf295eb329fd37b04020859933cf367cb163373733ee9e48dc725
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.6-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 121.7 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f64d92fa6b56b1b530f8b1423ba26f8802d7d0c64fa38fd3abc51caba14d4119
BLAKE2b-256 checksum
How to use checksums
49cc654c171826672473f493ac25face47827aadb39b44f3c31a908ec0f91c20
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 19, 2026.

Transparency log

Release files / winnex_xfactor-1.0.6-cp310-cp310-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.6-cp310-cp310-macosx_11_0_arm64.whl
Size 99.5 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
44b6288b2b25ee353ebc275a655837bfa130a1ced9bb8321fe11e25b139066bc
BLAKE2b-256 checksum
How to use checksums
a5b8698c61ee62c8986233dbbbcc31f4a2de2a1dbe56c3644d2f29af6ff967d0
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 19, 2026.

Transparency log

Security for winnex-xfactor 1.0.6

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.

Full provenance

All 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for winnex_xfactor-1.0.6.tar.gz

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 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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