Skip to main content

Asynchronous Self-Healing KV Cache for Silicon-Native LLMs by GDI Nexus

Project description


title: MLX-ASH-KV emoji: ⚡ colorFrom: green colorTo: gray sdk: gradio sdk_version: 5.16.0 app_file: app.py pinned: false license: apache-2.0

ASH-KV: Dynamic Attention Steering & KV-Cache Integrity Middleware

Hardware License Version Company

ASH-KV (Asynchronous Self-Healing KV Cache) is a high-performance middleware layer designed for Runtime Manifold Integrity Enforcement. It leverages silicon-native kernels to monitor the mathematical uncertainty (Varentropy) of the Attention Manifold and surgically prunes logical drift at the hardware level.


Technical Methodology

Varentropy-Proxy Monitoring

ASH-KV implements a deterministic uncertainty detector by analyzing the mathematical variance across the KV-Cache. This real-time analysis identifies Manifold Collapse—the mathematical state where a model's transition probability distribution becomes unstable—allowing for intervention before semantic errors materialize.

Real-Time Attention Steering

When uncertainty exceeds the threshold, ASH-KV executes a Gaussian Manifold Mutation directly within the compute graph.

  • Apple Silicon: Leverages @mx.compile Fused Metal kernels for sub-millisecond mutation.
  • NVIDIA: Implements synchronized PyTorch/CUDA tensor operations via the Hardware Abstraction Layer (HAL).
  • Latency: Verified at < 0.9ms on Apple M4 hardware (negligible inference overhead).

Infinite Horizon (NVMe Paging)

To bypass physical VRAM constraints, ASH-KV utilizes an LRU-based paging protocol. Inactive context chunks are offloaded to NVMe storage using zero-copy memory mapping, enabling 100k+ token windows on consumer-grade hardware.


API Reference

protect(model, sensitivity=0.85, critic_model_path=None)

Initializes the ASH-KV Hypervisor for a given neural model.

Parameter Type Default Description
model nn.Module Required An MLX or PyTorch model instance.
sensitivity float 0.85 The Varentropy threshold (0.0 to 1.0).
critic_model_path str None Optional path for ANE-accelerated manifold critics.

Research & Reproducibility

Our benchmarks use time.perf_counter_ns() to track the exact overhead of the Fused Metal Mutations.

ash-kv install    # Platform driver verification
ash-kv benchmark  # Unified Latency & Integrity suite

Hardware Abstraction Layer (HAL)

  • MLXHealer: Fused Metal backends for macOS.
  • CudaHealer: Synchronized tensor backends for NVIDIA/Linux.
  • UniversalTensorCritic: Pure mathematical manifold evaluation.

DISCLAIMER

ASH-KV is a probabilistic reliability layer. It is NOT a substitute for professional clinical or legal judgment. All AI-generated outputs must be verified by qualified human professionals.


© 2026 GDI Nexus Software Solutions LLP. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlx_ash_kv-8.3.1.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mlx_ash_kv-8.3.1-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file mlx_ash_kv-8.3.1.tar.gz.

File metadata

  • Download URL: mlx_ash_kv-8.3.1.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mlx_ash_kv-8.3.1.tar.gz
Algorithm Hash digest
SHA256 c6cea2962340e79c4b1ea49aea3093aa69a488c723cfb5d14e87ce002beae432
MD5 88b93f52dfd41f6e5835ae9296736729
BLAKE2b-256 de5b14fcf12e6acdb2daefdad44fdf0b547f82081cffd59fb6526074b9f9ebdf

See more details on using hashes here.

File details

Details for the file mlx_ash_kv-8.3.1-py3-none-any.whl.

File metadata

  • Download URL: mlx_ash_kv-8.3.1-py3-none-any.whl
  • Upload date:
  • Size: 16.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for mlx_ash_kv-8.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f58d74909d13a225d889c14edf2a46b39ac5ba8fabf54c80836ccc0ad5f9d26
MD5 f7085119dcc26dcbbc5a1cadc6cf71b9
BLAKE2b-256 1ca3337bac1f17fc0b1464deb33b33ac103fed1d4d2f51689e64c0cdacc315ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page