Skip to content

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

REPL 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=23

Parameters

Tunable via the set command:

ParameterDefaultDescription
beta7.0Inverse temperature (uses learned β if available)
inits200Random initializations for basin discovery
strength0.1Surgery strength
degree3Polynomial degree
eps0.005Convergence threshold
temp0.8Sampling temperature for generation
tokens50Max tokens for generation
topk40Top-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