Text Generation
Transformers
entropy
hallucination
logits-processor
lean4
formal-verification
cuda-q
temperature-scheduling
audit-log
harness
guardrails
snapkitty
agda
python
cuda
Instructions to use Snapkitty/sovereign-entropy-theorem with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Snapkitty/sovereign-entropy-theorem with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Snapkitty/sovereign-entropy-theorem")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Snapkitty/sovereign-entropy-theorem", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Snapkitty/sovereign-entropy-theorem with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Snapkitty/sovereign-entropy-theorem" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/sovereign-entropy-theorem", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Snapkitty/sovereign-entropy-theorem
- SGLang
How to use Snapkitty/sovereign-entropy-theorem with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Snapkitty/sovereign-entropy-theorem" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/sovereign-entropy-theorem", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Snapkitty/sovereign-entropy-theorem" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/sovereign-entropy-theorem", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Snapkitty/sovereign-entropy-theorem with Docker Model Runner:
docker model run hf.co/Snapkitty/sovereign-entropy-theorem
Download python/test_integration.py from Snapkitty/sovereign-entropy-theorem: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/Snapkitty/sovereign-entropy-theorem/resolve/main/python/test_integration.py
- Command line
-
hf download hf://Snapkitty/sovereign-entropy-theorem/python/test_integration.py
-
curl -L -o test_integration.py https://huggingface.co/Snapkitty/sovereign-entropy-theorem/resolve/main/python/test_integration.py
1.57 kB
| #!/usr/bin/env python3 | |
| """ | |
| Integration test: Verify CUDA-Q results match formal verification bounds | |
| """ | |
| import json | |
| import math | |
| from pathlib import Path | |
| def temperature_schedule(F, T0=0.1, alpha=2.0): | |
| return T0 + (1 - T0) * math.exp(-alpha * F) | |
| def softmax_ratio(d, T): | |
| return math.exp(d / T) | |
| def binary_entropy(s): | |
| if s <= 0: return float('inf') | |
| return math.log(s + 1) - s * math.log(s) / (s + 1) | |
| def verify_consistency(): | |
| print("=" * 70) | |
| print("CROSS-VERIFICATION: LEAN <-> PYTHON <-> CUDA-Q") | |
| print("=" * 70) | |
| # Python verification | |
| max_H = 0.0 | |
| for F in range(1, 1000): | |
| T = temperature_schedule(F) | |
| s = softmax_ratio(1.0, T) | |
| H = binary_entropy(s) | |
| if H > max_H: | |
| max_H = H | |
| print(f"\nPython: Max H = {max_H:.10f} nats") | |
| print(f"Bound (H < 0.20): {'PASS' if max_H < 0.20 else 'FAIL'}") | |
| print(f"Margin: {0.20 - max_H:.10f}") | |
| # Verify proof chain | |
| print("\nPROOF CHAIN:") | |
| for F in [1, 2, 5, 10, 50, 100]: | |
| T = temperature_schedule(F) | |
| s = softmax_ratio(1.0, T) | |
| H = binary_entropy(s) | |
| print(f" F={F:3d}: T={T:.6f}, s={s:.4f}, H={H:.6f}, OK={H < 0.20}") | |
| # Theta verification | |
| theta = 89 / 2462 | |
| print(f"\nTheta = 89/2462 = {theta:.10f}") | |
| T_theta = temperature_schedule(1, theta, 1/theta) | |
| print(f"T(F=1, theta) = {T_theta:.10f}") | |
| print(f"\n{'=' * 70}") | |
| print(f"SOVEREIGN ENTROPY THEOREM: VERIFIED") | |
| print(f"{'=' * 70}") | |
| return max_H < 0.20 | |
| if __name__ == "__main__": | |
| verify_consistency() | |