Resonance Attention ⚛️
Resonance Attention is a novel, quantum-inspired neural architecture that replaces the standard Softmax operator in Large Language Models (LLMs) with a Rank-2 Projective Lüders Subspace.
It allows you to organically measure epistemic uncertainty (Spectral Entropy $S(\rho)$) in a single forward pass, eliminating Goodhart's Law collapse and hallucination rabbit-holes.## Installation
pip install resonance-attention
import torch
from transformers import AutoModelForCausalLM
from resonance_attention import apply_resonance
# 1. Load your standard model
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B")
# 2. Inject Resonance Attention!
model = apply_resonance(model, rank=2, use_luders=True)
# Now your model calculates Spectral Entropy natively.
Metadata
Release files for resonance-attention 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| resonance_attention-0.1.0.tar.gz | 5.3 kB | Without provenance | Details for resonance_attention-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| resonance_attention-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for resonance_attention-0.1.0-py3-none-any.whl |
Total release size: 11.3 kB
Release files / resonance_attention-0.1.0.tar.gz
| Download URL | resonance_attention-0.1.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab03545981be1a1909cb2f127d2dbc49a193cdfa6722105e1d7ecc215167b9f8
|
|
BLAKE2b-256 checksum How to use checksums |
13863c7d2c521858f61a19841c5b9eab13f023e0e8dc40452bf29ba36f698f84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / resonance_attention-0.1.0-py3-none-any.whl
| Download URL | resonance_attention-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74b8593ed54d3347dc8cd73a08f4584ce247cb825b6ceec0dc7c8ff9f7003119
|
|
BLAKE2b-256 checksum How to use checksums |
6cd60f73091364d558cd4adcef9da3c3c0aadac6708f025706d7c8df529cfd41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Security for resonance-attention 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.