Skip to content

Engineering documentation ​

This section is for people who modify Retrograd. To train a model or tune a run, start with the Getting started, Training and Reference guides instead.

Contributing ​

Backends and RIR ​

Performance notes ​

Diagnostic environment variables ​

These switch off a runtime check or optimization, to compare against it or to work around it on a given device.

VariableEffect
RETRO_UBATCH_FINITE_CHECK=0Skip the load-time check that the micro-batch produces finite logits on the GPU.
RETRO_PACKED_SEQ_PROBE=0Trust the model's packed multi-sequence declaration instead of probing it.
RETRO_RECURRENT_ROLLBACK=autoApply the derived recurrent-state rollback depth (off by default).
RETRO_RECURRENT_ROLLBACK_BUDGET_MBMemory budget for that depth (default 64).
RETRO_GENERATION_PREFIX_CACHE=0Re-decode the whole prompt at every agentic turn instead of reusing the KV cache.

Interface contracts ​

Retrograd documentation