|
| 1 | +# OpenEntropy Profile |
| 2 | + |
| 3 | +Runs vLLM with qr-sampler using **OpenEntropy** — a local hardware entropy |
| 4 | +source that collects noise from 63 hardware sources on Apple Silicon (thermal, |
| 5 | +timing, microarchitecture, GPU, etc.). This is a **native-only profile** — no |
| 6 | +Docker, no network dependency. |
| 7 | + |
| 8 | +## Why not Docker? |
| 9 | + |
| 10 | +Docker containers cannot access Metal GPU or native hardware entropy sources on |
| 11 | +macOS. Apple's Virtualization.framework has no GPU passthrough, and hardware |
| 12 | +noise sources (thermal sensors, CPU timing, GPU state) are not exposed to |
| 13 | +containerized processes. OpenEntropy requires native execution. |
| 14 | + |
| 15 | +## Quick start |
| 16 | + |
| 17 | +1. Install OpenEntropy and qr-sampler: |
| 18 | + |
| 19 | + ```bash |
| 20 | + pip install openentropy |
| 21 | + pip install -e /path/to/qr-sampler |
| 22 | + ``` |
| 23 | + |
| 24 | +2. Configure your environment: |
| 25 | + |
| 26 | + ```bash |
| 27 | + cd deployments/openentropy |
| 28 | + cp .env.example .env |
| 29 | + ``` |
| 30 | + |
| 31 | + Edit `.env` if needed — set `HF_TOKEN` if using a gated model. |
| 32 | + |
| 33 | +3. Start vLLM: |
| 34 | + |
| 35 | + ```bash |
| 36 | + source .env |
| 37 | + vllm serve $HF_MODEL \ |
| 38 | + --port $VLLM_PORT \ |
| 39 | + --logits-processors qr_sampler |
| 40 | + ``` |
| 41 | + |
| 42 | +## Available entropy sources |
| 43 | + |
| 44 | +OpenEntropy provides 63 entropy sources across 13 categories. For the full |
| 45 | +catalog with physics explanations, see the |
| 46 | +[OpenEntropy Source Catalog](https://github.com/amenti-labs/openentropy/blob/master/docs/SOURCES.md). |
| 47 | + |
| 48 | +List all available sources on your hardware: |
| 49 | + |
| 50 | +```bash |
| 51 | +python -c "from openentropy import detect_available_sources; print([s['name'] for s in detect_available_sources()])" |
| 52 | +``` |
| 53 | + |
| 54 | +Sources span thermal, timing, microarchitecture, GPU, IPC, scheduling, and more. |
| 55 | +Some notable ones for research: |
| 56 | + |
| 57 | +| Source | Category | Physical mechanism | |
| 58 | +|--------|----------|-------------------| |
| 59 | +| `counter_beat` | Thermal | CPU counter vs audio PLL crystal beat frequency | |
| 60 | +| `dual_clock_domain` | Microarch | 24 MHz x 41 MHz independent oscillator beat | |
| 61 | +| `gpu_divergence` | GPU | Shader warp execution order divergence | |
| 62 | +| `dvfs_race` | Microarch | Cross-core DVFS frequency race | |
| 63 | +| `clock_jitter` | Timing | Timing jitter between readout paths | |
| 64 | +| `dram_row_buffer` | Timing | DRAM row buffer hit/miss timing | |
| 65 | + |
| 66 | +To sample from a specific source, set `QR_OE_SOURCES`: |
| 67 | + |
| 68 | +```bash |
| 69 | +export QR_OE_SOURCES=counter_beat |
| 70 | +``` |
| 71 | + |
| 72 | +## Conditioning modes |
| 73 | + |
| 74 | +OpenEntropy supports three conditioning strategies: |
| 75 | + |
| 76 | +| Mode | Use case | Properties | |
| 77 | +|------|----------|-----------| |
| 78 | +| `raw` | Research (default) | Preserves hardware noise signal; minimal processing | |
| 79 | +| `vonneumann` | Debiased entropy | Von Neumann debiasing; slower, more uniform | |
| 80 | +| `sha256` | Cryptographic | SHA-256 hashing; suitable for security-critical applications | |
| 81 | + |
| 82 | +Set `QR_OE_CONDITIONING` in `.env` or override per-request: |
| 83 | + |
| 84 | +```python |
| 85 | +# Per-request override |
| 86 | +extra_args = {"qr_oe_conditioning": "sha256"} |
| 87 | +``` |
| 88 | + |
| 89 | +## Parallel collection |
| 90 | + |
| 91 | +By default, `QR_OE_PARALLEL=true` collects from multiple sources simultaneously, |
| 92 | +increasing entropy throughput. Set to `false` for sequential collection (slower, |
| 93 | +lower memory overhead). |
| 94 | + |
| 95 | +## When to use this profile |
| 96 | + |
| 97 | +- **Consciousness research**: Study whether intent influences quantum-random |
| 98 | + processes using native hardware entropy. |
| 99 | +- **Local experiments**: No network latency, no external dependencies. |
| 100 | +- **Apple Silicon development**: Leverage Metal GPU and native hardware sensors. |
| 101 | +- **Research baseline**: Compare hardware entropy against system entropy |
| 102 | + (`/dev/urandom`). |
| 103 | + |
| 104 | +## Web UI (optional) |
| 105 | + |
| 106 | +This profile includes [Open WebUI](https://github.com/open-webui/open-webui), a |
| 107 | +ChatGPT-style web interface. To use it, you'll need to run it separately (not |
| 108 | +included in this native profile): |
| 109 | + |
| 110 | +```bash |
| 111 | +docker run -d -p 3000:3000 --name open-webui ghcr.io/open-webui/open-webui:latest |
| 112 | +``` |
| 113 | + |
| 114 | +Then point it at your vLLM instance running on `localhost:8000`. |
| 115 | + |
| 116 | +A pre-built filter function for controlling qr-sampler parameters from the UI is |
| 117 | +available at [`examples/open-webui/`](../../examples/open-webui/). See that |
| 118 | +directory's README for import instructions. |
| 119 | + |
| 120 | +## Next steps |
| 121 | + |
| 122 | +Once this profile works, you can: |
| 123 | +1. Adjust `QR_OE_SOURCES` to use specific entropy sources. |
| 124 | +2. Experiment with different conditioning modes (`raw`, `vonneumann`, `sha256`). |
| 125 | +3. Compare results against the `urandom` profile (gRPC-based) or `system` profile |
| 126 | + (fallback). |
| 127 | +4. Browse the full [OpenEntropy Source Catalog](https://github.com/amenti-labs/openentropy/blob/master/docs/SOURCES.md) |
| 128 | + for detailed physics explanations of each entropy source. |
0 commit comments