Installation

Install AletheionGuard Python package to audit LLM outputs locally

Quick Install

Install AletheionGuard with a single pip command:

pip install aletheion-guard

That's it! The package includes pre-trained models and all dependencies.

System Requirements

Python Version

  • Minimum: Python 3.8+
  • Recommended: Python 3.10+
  • Tested on: 3.8, 3.9, 3.10, 3.11, 3.12

Hardware

  • CPU: Any modern processor
  • RAM: 2GB minimum, 4GB+ recommended
  • GPU: Optional (CUDA supported for faster inference)
  • Storage: ~500MB for models and dependencies

Verify Installation

Quick Test

Test your installation with this simple script:

from aletheion_guard import EpistemicAuditor
# Initialize auditor (models load automatically)
auditor = EpistemicAuditor()
# Audit a simple statement
audit = auditor.evaluate("Paris is the capital of France")
print(f"Verdict: {audit.verdict}") # ACCEPT
print(f"Q1 (aleatoric): {audit.q1:.3f}")
print(f"Q2 (epistemic): {audit.q2:.3f}")
print(f"Height (confidence): {audit.height:.3f}")

✓ Expected Output

Verdict: ACCEPT
Q1 (aleatoric): 0.082
Q2 (epistemic): 0.045
Height (confidence): 0.906

Optional: GPU Support

By default, AletheionGuard auto-detects your hardware (CPU/GPU). You can explicitly configure the device:

Auto-detect (Recommended)

auditor = EpistemicAuditor(device="auto")
# Uses GPU if available, falls back to CPU

Force CPU

auditor = EpistemicAuditor(device="cpu")

Force GPU

auditor = EpistemicAuditor(device="cuda")
# Requires CUDA-capable GPU

Note: GPU support requires PyTorch with CUDA. Install with: pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Advanced: Install from Source

For development or to use the latest unreleased features:

git clone https://github.com/AletheionAGI/AletheionGuard-Pypi.git
cd AletheionGuard-Pypi/pypi
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode
pip install -e .

Warning: Installing from source may include unstable features. For production use, install from PyPI with pip install aletheion-guard.

What Gets Installed

AletheionGuard automatically installs these core dependencies:

ML Libraries

  • • torch (PyTorch)
  • • transformers (Hugging Face)
  • • sentence-transformers
  • • numpy, scipy

Utilities

  • • pydantic (data validation)
  • • tqdm (progress bars)
  • • Pre-trained models (~2.3MB)

Troubleshooting

ModuleNotFoundError: No module named 'aletheion_guard'

Make sure you've installed the package:

pip install aletheion-guard

CUDA out of memory

Force CPU mode if you don't have enough GPU memory:

auditor = EpistemicAuditor(device="cpu")

Slow first run

The first run downloads sentence-transformers models (~90MB). Subsequent runs are fast.

# First run: ~30 seconds (downloads models)
# Subsequent runs: <1 second

Import errors after upgrade

Reinstall to ensure all dependencies are up to date:

pip install --upgrade --force-reinstall aletheion-guard

Alternative: Use Cloud API

Don't want to install anything? Use our hosted API instead:

# Python with requests
import requests
response = requests.post(
"https://aletheionguard.onrender.com/v1/audit",
headers={"X-API-Key": "your_api_key"},
json={"text": "Paris is the capital of France"}
)
print(response.json())

✓ Local Package (pip)

  • • No API key needed
  • • Works offline
  • • No rate limits
  • • No network latency
  • • Free forever

✓ Cloud API

  • • No installation needed
  • • Always up-to-date
  • • Managed infrastructure
  • • Scales automatically
  • • 1,000 req/month free

Next Steps

Need Help?

Having installation issues? We're here to help