Summary
Changing steering-vector alpha while its model is unloaded can overwrite a persisted vector as a one-element vector.
Evidence
MemoryStore::user_vector_load(name, hidden_size) reads the saved blobs but ignores the stored hidden_size column and pads/truncates them to the caller-provided size.
user_vector_set_alpha uses size 1 when no LLM is loaded, then saves the returned state.
user_vector_set_alpha_named first loads at size 1, observes a reported hidden_size of 1, loads again at that size, then saves.
Moving an alpha slider can therefore destroy a learned LLM, 768-dimensional SD 1.5, or 2048-dimensional SDXL vector.
Proposed resolution
- Add a load-existing API that reads and validates the persisted dimension.
- Represent the caller's expected dimension as optional validation, not a replacement dimension.
- Refuse model-dimension mismatches unless an explicit migration/reset is requested.
Acceptance criteria
- Alpha/status operations with an unloaded engine preserve every vector element.
- Tests cover persisted 768-, 2048-, and arbitrary LLM-hidden-size vectors.
- A cross-model dimension mismatch returns a clear error or follows a documented migration path.
Summary
Changing steering-vector alpha while its model is unloaded can overwrite a persisted vector as a one-element vector.
Evidence
MemoryStore::user_vector_load(name, hidden_size)reads the saved blobs but ignores the storedhidden_sizecolumn and pads/truncates them to the caller-provided size.user_vector_set_alphauses size1when no LLM is loaded, then saves the returned state.user_vector_set_alpha_namedfirst loads at size1, observes a reportedhidden_sizeof1, loads again at that size, then saves.Moving an alpha slider can therefore destroy a learned LLM, 768-dimensional SD 1.5, or 2048-dimensional SDXL vector.
Proposed resolution
Acceptance criteria