Skip to main content

Module validate

Module validate 

Source
Expand description

Model file validation (CONTRACT: apr_model_validity).

Jidoka boundary check: validate model file BEFORE entering inference. APR files must have embedded tokenizer. GGUF files must have valid magic. Broken models are rejected with actionable error + re-conversion command.

Used at two boundaries:

  1. RealizarDriver::new() โ€” reject at load time (hard error)
  2. ModelConfig::discover_model() โ€” deprioritize at discovery (PMAT-150)

Functionsยง

is_valid_model_file
Quick validation for model discovery โ€” returns true if the model file passes basic structural checks (APR tokenizer present, GGUF magic valid).