tqp-readscope
readscope-backed read-operator providers for turboquant-pro.
turboquant-pro has two extension points. turboquant_pro.plugins plugs in
quantizers, the things being certified. turboquant_pro.read_operators
plugs in the read operator P_C they are certified against, so that
D = tr(P_C @ Sigma_delta)
is a number you compute rather than a claim you make. This package supplies
P_C for consumers that have no closed form, by measuring it.
from turboquant_pro.read_operators import (
create_read_operator, consumer_distortion, error_covariance,
)
P = create_read_operator("readscope_jacobian", consumer=my_head).operator(keys)
sigma = error_covariance(keys, codec.decompress(codec.compress(keys)))
consumer_distortion(P, sigma) # what the consumer actually loses
Two providers
| name | consumer shape | recovers |
|---|---|---|
readscope_blind |
vector → scalar margin | E[g gᵀ] |
readscope_jacobian |
vector → vector | E[Jᵀ J] |
Prefer readscope_jacobian where the consumer emits a vector: each probe
direction then returns m numbers instead of one, at the same call cost.
The budget is not a tuning knob
readscope's calibration found that recovery against the direction budget
k/d is a cliff at k = d, and that the cliff is rank independent —
asking for one direction costs the same as asking for sixteen, because below
full dimension the estimate is a projection onto a random subspace and a
projected operator's leading eigenvector is not the operator's.
So both providers default to k = d and warn when given less, rather
than quietly returning a one-direction reading that looks like a
measurement. Full specification, including what is still unmeasured:
readscope SPEC.md.
Neither package depends on the other
turboquant-pro declares the protocol. readscope measures the operator. This adapter is the only code that knows about both, and it is about a hundred lines. readscope stays numpy-only and usable by people with no interest in compression, which is worth more than the convenience of merging them.
Install
pip install -e plugins/tqp-readscope
Discovered automatically through the turboquant_pro.read_operators entry
point. MIT.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tqp_readscope-0.1.0.tar.gz.
File metadata
- Download URL: tqp_readscope-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b348c2761ea8aad06ce2c08c5025d149d96c723a7238653435e1f50051bde2ea
|
|
| MD5 |
4a39038f2f0dc4c5df05ce931e9d47a3
|
|
| BLAKE2b-256 |
894990856ec1533e5404b562b004d33cfc73829874443bdc4b85bd833be937e9
|
File details
Details for the file tqp_readscope-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tqp_readscope-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3f817f2a4c2790fc3c961e1bbc55078adbad3b631c21748ce4695300ebbe21d
|
|
| MD5 |
3d305196b3dc5a8ef541a01bb829f2c2
|
|
| BLAKE2b-256 |
817c60b6cf459f4572908fd79d9ee20872cdae39eee287f348c3ae6d4d1ddf45
|