CLI / REPL
The qriton-hlm command launches an interactive REPL for basin surgery.
Usage
bash
# Interactive mode
qriton-hlm
# Load a checkpoint on start
qriton-hlm --checkpoint model.pt
qriton-hlm -c model.pt
# Run a script
qriton-hlm --script program.hlm
# Pipe commands
echo "survey 0" | qriton-hlm -c model.ptREPL Commands
Once inside the REPL, type commands directly:
hlm:model> survey 0
Layer 0: 47 basins found (200 inits, β=7.00)
B0 E=-23.4521 pop=34 ████████████████░
B1 E=-19.8734 pop=28 █████████████░░░░
...
hlm:model> inject 0 42 0.1
Before: 47 basins | target is basin: False
After: 48 basins (+1) | target is basin: True (cos=0.98)
hlm:model> verify 0 42
Basin: True | cos=0.9823 | energy=-15.234 | iters=23Parameters
Tunable via the set command:
| Parameter | Default | Description |
|---|---|---|
beta | 7.0 | Inverse temperature (uses learned β if available) |
inits | 200 | Random initializations for basin discovery |
strength | 0.1 | Surgery strength |
degree | 3 | Polynomial degree |
eps | 0.005 | Convergence threshold |
temp | 0.8 | Sampling temperature for generation |
tokens | 50 | Max tokens for generation |
topk | 40 | Top-k sampling |
Features
- Readline support (arrow keys, command history)
- Checkpoint loading: full HLM3 models or W-only mode
- Operation history tracking
- Backup/restore for all layers