Metadata-Version: 2.4
Name: hypertensor-core
Version: 1.0.0
Summary: HyperTensor Geometric Core — Riemannian metrics, hallucination guards, geodesic trajectory analysis
Author-email: William Ken Ohara Stewart <nagusamecs@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/NagusameCS/HyperTensor
Project-URL: Repository, https://github.com/NagusameCS/HyperTensor/tree/main/hypercore
Keywords: riemannian-geometry,geodesic,hallucination-detection,tensor,hyperdimensional
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24.0
Provides-Extra: torch
Requires-Dist: torch>=2.0; extra == "torch"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"

# hypertensor-core — HyperTensor Geometric Core

Riemannian geometry primitives for transformer analysis, compression,
hallucination detection, and geodesic trajectory computation.

From the HyperTensor project (Papers I–XVIII).

## Install

```bash
pip install hypertensor-core
```

## Modules

| Module | Description |
|--------|-------------|
| `GeodesicMetric` | Riemannian metric tensor, Christoffel symbols, geodesic integration |
| `HallucinationGuard` | Four-condition hallucination boundary detection |
| `GenerationMetrics` | Token-collapse, geodesic half-life, topological compression |

## Quick Start

```python
from hypercore import GeodesicMetric, HallucinationGuard

# Build a Riemannian metric from hidden states
metric = GeodesicMetric(k_manifold=32)
metric.fit(hidden_states)

# Compute geodesic distance between two points
d = metric.geodesic_distance(h_a, h_b)

# Check if a generation is likely hallucinated
guard = HallucinationGuard(coverage_radius=0.15)
is_hallucination, reason = guard.check(
    query_projection=query_k,
    nearest_trajectories=trajectories,
    jury_confidence=jury_J,
)
```

## Advanced

For the full HyperTensor stack including AxiomGauge, ThermalRank, OnlineOja, TreeDrafter, and safety red-team modules, install the main package:

```bash
pip install hypertensor
```

## License

MIT — see [LICENSE](https://github.com/NagusameCS/HyperTensor/blob/main/LICENSE)
