The v0.2.1 architecture is built around explicit interfaces so the repo is useful before hardware validation and adaptable afterward.
- TemperatureSensor
Produces GPU temperature readings. Current implementations are
SimulatedTemperatureSensorandNvidiaSmiTemperatureSensor. - WorkloadSignal Produces modeled request rate, queue depth, and pressure index. The default is a transparent toy workload model.
- PolicyEngine Applies hysteresis, dwell timers, cooldowns, anti-flap protection, and degraded mode logic.
- BatchControllerBackend Applies batch-size changes. The repo ships mock and experimental HTTP adapters.
- KVMigrationBackend Models or applies a KV pressure-relief action.
- MetricsSink Records in-memory metrics for artifact generation and can optionally export Prometheus metrics.
- Artifact Writer Emits config, events, summaries, CSV, and SVG charts for every run.
The original prototype was tightly coupled to assumed admin endpoints. In v0.2.1 the adapter boundary makes the trust model explicit:
- you can exercise the control loop entirely with mocks
- you can swap in
nvidia-smiwithout changing policy logic - you can experiment with HTTP control surfaces without claiming they are validated upstream APIs
throttle_temp_candrecover_temp_cdefine hysteresismin_dwell_sprevents repeated identical actions in rapid successioncooldown_sdelays recovery after a throttle eventmax_actions_per_windowandanti_flap_window_sprevent thrashdegraded_retries_before_holdstops control actions after repeated backend failuresthrottle_step_ratioandrecover_step_ratiobound step sizes
The architecture is meant to be production-possible, not production-proven. The simulated path should be enough to review policy quality. Real deployment should only happen after environment validation plus workload-specific testing.
In particular, the checked-in HTTP adapters are experimental integration points, not validated claims about any upstream serving API.