From 8610b14d702de7c929e306f8c05fe104c911a3a6 Mon Sep 17 00:00:00 2001 From: Patrick Kappeler <58693036+citizenu03bb@users.noreply.github.com> Date: Mon, 29 Jun 2026 16:34:36 +0200 Subject: [PATCH] fix(python): expose up-vector override binding --- crates/larql-python/src/vindex.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/larql-python/src/vindex.rs b/crates/larql-python/src/vindex.rs index 371d503ef..757a55aa6 100644 --- a/crates/larql-python/src/vindex.rs +++ b/crates/larql-python/src/vindex.rs @@ -1059,6 +1059,13 @@ impl PyVindex { Ok(()) } + /// Low-level: set a custom up vector override for a feature. + /// During inference, this vector is used instead of the model's up weight row. + fn set_up_vector(&mut self, layer: usize, feature: usize, vector: Vec) -> PyResult<()> { + self.index.set_up_vector(layer, feature, vector); + Ok(()) + } + /// Low-level: set feature metadata directly. #[pyo3(signature = (layer, feature, top_token, c_score=0.9))] fn set_feature_meta(