Metadata-Version: 2.4
Name: resonance-attention
Version: 0.1.0
Summary: Resonance Attention: Quantum-inspired Epistemic Uncertainty for LLMs
Home-page: https://huggingface.co/PSMoreno
Author: Paulo Moreno
Author-email: paulosmoreno@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: torch>=2.0.0
Requires-Dist: transformers>=4.30.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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

```bash
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.
