Comes out of sentinel-ai Finding 6 (defrag produced a model that loads in transformers/vLLM but not llama.cpp because of an unstated `q_proj.shape == [hidden_size, hidden_size]` invariant in the GGUF loader).
Schema addition
```rust
pub struct AlloyTarget {
// ... existing fields
pub runtimes: Vec,
}
pub enum DeploymentRuntime {
Transformers,
VLLM,
LlamaCpp,
MLX,
TensorRTLLM,
CoreML,
Triton,
}
```
New stage type
```
validate-runtime
inputs: model artifact, runtime: DeploymentRuntime
action: load model in runtime, run a tiny smoke prompt, verify sane output
pass: emit alloy link with runtime + load-time + output-hash
fail: hard-fail the chain
```
A forge that declares `runtimes: [transformers, llama_cpp]` MUST pass validate-runtime against both before any final-stage link is signed.
Why this matters
Validation is a contract between producer and consumers. The current alloy spec only validates against the training framework. That's not validation in the sense the user cares about. This is the schema-level fix that makes Layer 7 of the sentinel-ai harness a first-class concept rather than a test convention.
Cross-reference: sentinel-ai Finding 6, VALIDATED-TENSOR-SURGERY §6.
Comes out of sentinel-ai Finding 6 (defrag produced a model that loads in transformers/vLLM but not llama.cpp because of an unstated `q_proj.shape == [hidden_size, hidden_size]` invariant in the GGUF loader).
Schema addition
```rust
pub struct AlloyTarget {
// ... existing fields
pub runtimes: Vec,
}
pub enum DeploymentRuntime {
Transformers,
VLLM,
LlamaCpp,
MLX,
TensorRTLLM,
CoreML,
Triton,
}
```
New stage type
```
validate-runtime
inputs: model artifact, runtime: DeploymentRuntime
action: load model in runtime, run a tiny smoke prompt, verify sane output
pass: emit alloy link with runtime + load-time + output-hash
fail: hard-fail the chain
```
A forge that declares `runtimes: [transformers, llama_cpp]` MUST pass validate-runtime against both before any final-stage link is signed.
Why this matters
Validation is a contract between producer and consumers. The current alloy spec only validates against the training framework. That's not validation in the sense the user cares about. This is the schema-level fix that makes Layer 7 of the sentinel-ai harness a first-class concept rather than a test convention.
Cross-reference: sentinel-ai Finding 6, VALIDATED-TENSOR-SURGERY §6.