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.5

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.5
File Size Uploaded Provenance
winnex_xfactor-1.0.5.tar.gz 18.2 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for winnex-xfactor 1.0.5
File
winnex_xfactor-1.0.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
winnex_xfactor-1.0.5-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.5-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
winnex_xfactor-1.0.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
winnex_xfactor-1.0.5-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.5-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
winnex_xfactor-1.0.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
winnex_xfactor-1.0.5-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.5-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
winnex_xfactor-1.0.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
winnex_xfactor-1.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
winnex_xfactor-1.0.5-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.5.tar.gz

Download URL winnex_xfactor-1.0.5.tar.gz
Size 18.2 kB
Tags Source
SHA-256 checksum
How to use checksums
39ccbead37f212326bbef45411d04b9ead603c83ac5405e59beaf148c4259a44
BLAKE2b-256 checksum
How to use checksums
941d24d1c53be80b45008245bb27e07f7caaa13eeb78d729aaf339f7d1e6625a
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.5-cp313-cp313-win_amd64.whl

Download URL winnex_xfactor-1.0.5-cp313-cp313-win_amd64.whl
Size 116.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
76f2fe50a1abd0afa1523204128a974b8260255ce77f4a5911d07285c62b7af9
BLAKE2b-256 checksum
How to use checksums
5d404dc656ac8e0958fb66c42e4b7436616857557cfe9bcfb791e80bbf256478
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.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.5-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 124.1 kB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
26916be7dd9b2e4ff53f3dea51b342aa98ffa03bfaba6d441c2f61e47fbf13fc
BLAKE2b-256 checksum
How to use checksums
afc0cbe6155a6c562d687086092653ad6a8577ac8d0cb800c6c9319b68ff3e6c
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.5-cp313-cp313-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.5-cp313-cp313-macosx_11_0_arm64.whl
Size 101.4 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d9536906ead875b410141f7785669b389b2c60e5f822baacb95c1a16973fe6b7
BLAKE2b-256 checksum
How to use checksums
f967f9417eda5d2719096fc70fecd02c8555ccaa5aa29af774621c24a3aba38a
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.5-cp312-cp312-win_amd64.whl

Download URL winnex_xfactor-1.0.5-cp312-cp312-win_amd64.whl
Size 116.0 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0ab904de0c304c52f5104d7b27a9cc2da30d1db811af0e8d612280b7669d602a
BLAKE2b-256 checksum
How to use checksums
14713d78725c58440a0a885aac69ade9968b30a99ee1096036561b7627a8fd61
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.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.5-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 124.1 kB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
10308feea5a92603b41eb42e5934c8a85f01edf9425a9337dd7b39a573bd6f37
BLAKE2b-256 checksum
How to use checksums
1550d206b683d05f68b7505d9193c5e463e5992c92ae3b043aa8bcc7580829fc
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.5-cp312-cp312-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.5-cp312-cp312-macosx_11_0_arm64.whl
Size 101.3 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b835219f8537724398d6292f9abe223994d86951b99fbec96a93a6439d32aacc
BLAKE2b-256 checksum
How to use checksums
1bd60d614e9c8b52e1fd2fe733cc4099cca390d978eec14a9a88a716cc692d2f
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.5-cp311-cp311-win_amd64.whl

Download URL winnex_xfactor-1.0.5-cp311-cp311-win_amd64.whl
Size 113.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
94014ec43a8a7fb958f39211e0302f9f77a1764fa9cfb6d4182520b8b697a035
BLAKE2b-256 checksum
How to use checksums
2884f01aa678ce27e9830665a40d5a6cd3b7793e1d995ececc56b77c71fe1216
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.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.5-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 123.1 kB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
eecc827dc3e634077d245469ff8aa4a5c71793f7d871a2d3e5c1d2b9e8b2d297
BLAKE2b-256 checksum
How to use checksums
595bb3f5568dcceb632d4698f25f0921a8e41bc652f2ef8c3c93ec2b4c76f826
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.5-cp311-cp311-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.5-cp311-cp311-macosx_11_0_arm64.whl
Size 100.4 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6a7a1a61502e8e4ac4e7faf624da4ed0f12b5bdcaca1f56dd2e7bc907559e404
BLAKE2b-256 checksum
How to use checksums
480ce221de47b58b79745c0406f2082238756c7f0bfaa49ad671bc57176c740f
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.5-cp310-cp310-win_amd64.whl

Download URL winnex_xfactor-1.0.5-cp310-cp310-win_amd64.whl
Size 112.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e825f52472f7a74b665aa85d791621ebca1d014b64020cbb18b4470ce0a94d3f
BLAKE2b-256 checksum
How to use checksums
2cb0daaf8f0f90f8e219117800653e35c521161b0a9e54e132067bb2e743ccac
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.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL winnex_xfactor-1.0.5-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 121.5 kB
Tags CPython 3.10 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
229794ce6e0af413fe06acd6235aa95d10596fd609ad1b8c7749cb212f62def3
BLAKE2b-256 checksum
How to use checksums
67b64e43d002be343e48056b665e1f5888e4dd6d3306491020354b7f3e4b4824
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.5-cp310-cp310-macosx_11_0_arm64.whl

Download URL winnex_xfactor-1.0.5-cp310-cp310-macosx_11_0_arm64.whl
Size 99.4 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
f526c270a2b4351a24d29c8d09c2466187532a895c02e01de5c9db810c302059
BLAKE2b-256 checksum
How to use checksums
0718d2fc9b88e4e8bfca7b8e3865ff1eb1f728b89f96b3595bfdd15ca478a2bc
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.5

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.5.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