add memory importance scoring via prompt logprobs

score_memories() drops each memory from the context one at a time,
runs prompt_logprobs against the full conversation, and builds a
divergence matrix: memories × responses.

Row sums = memory importance (for graph weight updates)
Column sums = response memory-dependence (training candidates)

Uses vLLM's prompt_logprobs to check "would the model have said
this without this memory?" — one forward pass per memory, all
responses scored at once. ~3s per memory on B200.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-02 22:13:55 -04:00
parent dae0cc8191
commit df9b610c7f
3 changed files with 230 additions and 0 deletions

View file

@ -15,6 +15,7 @@ pub mod glob_tool;
pub mod grep;
pub mod memory;
pub mod read;
pub mod training;
pub mod write;
pub use bash::ProcessTracker;