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.pt
# Other flags
qriton-hlm --version # Print version and exit
qriton-hlm --no-color # Disable ANSI color outputREPL 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 |
Causal Commands
hlm:model> causal scan 5
Causal scan L5: 7 basins, threshold=0.15
Causal edges found: 3
B0 -> B3 drift=0.4231 DESTROYED
B0 -> B5 drift=0.1823 shifted
B2 -> B6 drift=0.2104 shifted
hlm:model> causal intervene 5 0
do(B0) = remove L5
Basins: 7 -> 6 (-1)
Downstream effects: 2 basins affected
hlm:model> causal counterfactual 5 2 shift
Counterfactual: B2 -> shift L5
(non-destructive -- original landscape preserved)
No downstream effects predicted.See the full Causal Programming guide for details.
Guards
hlm:model> guard max-basins 250
Guard set: max-basins = 250
hlm:model> guard strength-cap 0.3
Guard set: strength-cap = 0.3
hlm:model> guards
Active guards:
max-basins 250
strength-cap 0.3
hlm:model> inject 5 99 0.5
BLOCKED by guard: strength-cap (0.5 > 0.3)
Use --force --reason "justification" to override.
hlm:model> history
#1 survey 5 OK
#2 inject 5 99 0.5 BLOCKED (strength-cap)Guard types: max-basins, min-basins, strength-cap, cosine-drift, perplexity-delta.
Features
- Readline support (arrow keys, command history)
- Checkpoint loading: full HLM3 models or W-only mode
- Operation history tracking
- Backup/restore for all layers