consciousness/src/subconscious
Kent Overstreet 2b03dbb200 user: F7 compare screen
Side-by-side model comparison against the current conversation context.
Built on the MindTriggered pattern — F7 drops in as one more
CompareScoring flow next to MemoryScoring / FinetuneScoring.

Motivation: we have the VRAM on the b200 to load two versions of the
same family simultaneously (e.g. Qwen3.5 27B bf16 and q8_k_xl). Rather
than trust perplexity/KLD numbers on a generic corpus, we can measure
divergence on our actual conversations: for each assistant response,
ask the test model what it would have said given the same prefix, and
eyeball the diffs.

 - config.compare.test_backend — names an entry in the existing
   backends map to use as the test model. Empty = F7 reports "(unset)"
   and does nothing.

 - subconscious::compare::{score_compare_candidates, CompareCandidate,
   CompareScoringStats, CompareScoring}. For each assistant response,
   gen_continuation runs with the test client against the same prefix
   the original response saw; pairs stream into
   shared.compare_candidates as they complete.

 - user::compare::CompareScreen — F7 in the screen list. c/Enter
   triggers a run; list/detail layout mirroring F6, detail shows
   prior context / original / test-model alternate.

No persistence yet — each F7 run regenerates. Caching via a context
manifest (so we can re-view without re-burning generation) is the
natural follow-up; for now light usage is fine.

Also reusable later for validating finetune checkpoints: same pattern,
swap the test backend for the new checkpoint, watch where it diverges
from the base.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
2026-04-17 16:12:26 -04:00
..
agents agent: phase-aware bail script for surface-observe concurrency 2026-04-16 15:41:28 -04:00
compare.rs user: F7 compare screen 2026-04-17 16:12:26 -04:00
daemon.rs migrate more files to use index-based node access 2026-04-13 19:37:11 -04:00
defs.rs config: move user_name/assistant_name to AppConfig (top level) 2026-04-16 16:20:17 -04:00
digest.rs Remove .md suffix stripping from key lookups 2026-04-15 02:08:35 -04:00
generate.rs subconscious: lift continuation gen + render helpers into shared homes 2026-04-17 15:20:02 -04:00
learn.rs mind: MindTriggered trait for background scoring flows 2026-04-17 16:12:26 -04:00
mod.rs user: F7 compare screen 2026-04-17 16:12:26 -04:00
prompts.rs migrate more files to use index-based node access 2026-04-13 19:37:11 -04:00