Metadata-Version: 2.4
Name: natilah-smre
Version: 0.1.2
Summary: SMRE — a free-to-install proprietary agent for AI memory virtualization analysis, connected to the Natilah Cloud Platform.
Author: Natilah Technologies
License: Proprietary
Project-URL: Homepage, https://natilah.com/products/smre
Project-URL: Documentation, https://natilah.com/products/smre
Project-URL: Repository, https://github.com/natilah/Super-Memory-Reduction-Engine-SMRE-
Project-URL: Bug Tracker, https://github.com/natilah/Super-Memory-Reduction-Engine-SMRE-/issues
Keywords: llm,compression,lora,quantization,kv-cache,deduplication,inference,vram
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Provides-Extra: hf
Requires-Dist: huggingface_hub>=0.23; extra == "hf"
Requires-Dist: safetensors>=0.4; extra == "hf"
Requires-Dist: transformers>=4.44; extra == "hf"
Requires-Dist: datasets>=2.20; extra == "hf"
Requires-Dist: accelerate>=0.30; extra == "hf"
Requires-Dist: peft>=0.11; extra == "hf"
Requires-Dist: torch>=2.1; extra == "hf"
Provides-Extra: gpu
Requires-Dist: bitsandbytes>=0.43; extra == "gpu"
Provides-Extra: ollama
Requires-Dist: gguf>=0.9; extra == "ollama"
Provides-Extra: serve
Requires-Dist: vllm>=0.6; extra == "serve"
Provides-Extra: all
Requires-Dist: natilah-smre[hf]; extra == "all"
Requires-Dist: natilah-smre[gpu]; extra == "all"
Requires-Dist: natilah-smre[ollama]; extra == "all"
Dynamic: license-file

# natilah-smre

**Super Memory Reduction Engine for AI workloads.**

SMRE is a free-to-install, closed-source memory virtualization tool for AI
infrastructure. Teams deploy the lightweight SMRE Agent on their own machines,
GPU servers, and clusters to measure memory pressure across model workloads.
Advanced optimization logic, recommendations, benchmarking, dashboards, and
cluster-wide insights are processed through the proprietary Natilah Cloud
Platform.

## Product Model

The public package is the SMRE Agent. It is designed to be frictionless to
install and safe to run on developer machines or production infrastructure.

The SMRE Agent can locally inspect:

- GPU VRAM inventory and utilization when `nvidia-smi` is available
- CPU RAM inventory and utilization
- SMRE vault physical size, logical size, and deduplication ratio
- Base-model and adapter residency accounting
- Basic model-library density signals

Natilah Cloud processes the proprietary layer:

- KV-cache usage analysis
- Fragmentation and allocator efficiency analysis
- Deduplication opportunity discovery
- Model residency efficiency scoring
- Optimization recommendations
- Benchmarking and workload simulation
- Cluster-wide memory insights
- Cost savings reports
- Memory efficiency scores
- Workload density metrics
- Real-time dashboards
- Enterprise integrations

The SMRE engine, algorithms, optimization models, analytics, recommendation
logic, and benchmarking logic remain proprietary.

## Install

```bash
pip install natilah-smre
```

The PyPI package and primary installed command are both `natilah-smre`. Python
imports use `natilah_smre` because import names cannot contain hyphens.

Optional extras are available for environments that need Hugging Face model
inspection or GPU validation:

```bash
pip install "natilah-smre[hf]"
pip install "natilah-smre[gpu]"
pip install "natilah-smre[serve]"
pip install "natilah-smre[all]"
```

Local development install from this checkout:

```bash
pip install -e .
```

## Agent Usage

Run a local scan without a cloud account:

```bash
natilah-smre agent scan
```

Print the full local report as JSON:

```bash
natilah-smre agent scan --json
```

Connect the agent to Natilah Cloud:

```bash
natilah-smre login --key <your-smre-api-key>
natilah-smre status
natilah-smre agent scan --upload
```

API keys are read from `SMRE_API_KEY` or stored in `~/.smre/config`. The default
API base is `https://api.natilah.com`; override it with `SMRE_API_BASE` for
private deployments.

## Local Vault

The agent includes a local model vault for measuring base-model reuse and
adapter residency. It stores one base model once and accounts for adapters or
fine-tunes separately so SMRE can report the difference between naive residency
and base-plus-adapter residency.

```bash
natilah-smre add-base instruct Qwen/Qwen2.5-0.5B-Instruct
natilah-smre add-adapter task13 wuyanzu4692/task-13-Qwen-Qwen2.5-0.5B-Instruct --base instruct
natilah-smre list
natilah-smre load instruct --out ./out
```

The default vault is `~/.smre/vault`. Override it with `--vault` or
`SMRE_VAULT`.

## Repository Layout

```text
natilah_smre/          # Python package for natilah-smre
  agent.py              # lightweight local SMRE Agent telemetry
  cli.py                # natilah-smre command: login, status, agent scan, vault commands
  store.py              # local content-addressed vault accounting
  dedup.py              # local block-level deduplication accounting
  hf_io.py              # optional Hugging Face model loading helpers
  model_store.py        # local base-plus-delta model accounting helpers
  tensor_compression.py # local compatibility utilities
experiments/
  *.py                  # validation and measurement experiments
```

## License

SMRE is proprietary software. Installation and basic local agent usage are free,
but the software is not open source. See [LICENSE](LICENSE).
