Skip to content

Gatherlight v1.3.0

Choose a tag to compare

@github-actions github-actions released this 23 Sep 16:12
· 261 commits to master since this release

Gatherlight v1.3.0

记忆检索升级到 Lyntai 3.2

记忆检索底下的库(Lyntai)从 3.0.2 升到 3.2。大部分改动在库内部,家里能感觉到的是下面几件。

按「这条事实是关于什么的」来问,现在和其它结果一起排序。 开着「判断」时,每条事实写入时都会被标上
主题(比如「配偶」「证件」)。以前按主题命中的结果是应用自己在排好的结果后面追加的,所以它没有「记得多
牢」这个数,只能标一句 matched:"subject"。现在由检索引擎本身按主题取候选、和其它结果一起排名,这类结果
也带上了真实的记忆程度,那个标记就不再需要了。

如果「语义」用的是本机模型(llama.cpp 或内置),升级后第一次启动会重建一次事实索引。 Lyntai 3.2 改了
向量的存放位置,旧位置上的向量不会再被读到;不重建的话,语义检索会悄悄地什么都找不到。重建会让这些事实
的「常用 / 久未用到」记录和彼此的关联从头开始积累。没有开本机模型语义的家庭不受影响,索引原样保留。
重建只在本机模型真的能响应时进行:如果那次启动时它没有响应,索引保持原样、启动时会提示,下次启动再重建 ——
不会在模型不可用时把重建记成「已完成」。

评分器不会再意外用到本机的判断模型。 以前为了让本机判断模型能被调用到,应用必须把它加进一个全局的
候选列表,副作用是评分器在 Claude CLI 失败时可能退到那个本机模型上。库已经修好了根本问题,这个绕法已删除。

库里顺带带来的两处变化:

  • 本机判断模型响应慢(超时)时,以前会让这条事实这次没能进索引,要等下次启动才补上;现在只是这次少了
    主题标注,事实照常入索引。
  • 检索排序不再让「显著性」参与排名(库在多种语言和语料上测过,这样漏检更少),结果顺序可能有细微变化。

更新 Claude CLI 时不会再因为「正在使用」而失败

应用自己安装的 Claude CLI 可以在「资源 · Resources」里一键更新。以前如果更新时它正在运行(聊天进行中、
后台任务、或者应用刚好在检查登录状态),更新会失败,只显示「下载失败:Access to the path is denied.」——
Windows 不允许覆盖正在运行的程序。本来就有一个退路(把旧文件改名挪开,再放入新版本),但它从来没有
生效过。现在更新会在后台完成,正在进行的对话不受影响;旧文件会在下一次更新时自动清理。

用自己装的 Claude CLI(没有通过「资源」安装)的家庭不受影响,应用也从不替你更新它。

判断 可以改用本机的「重排模型」

「校准 · Cortex → 记忆检索 → 判断 → 本机模型」里,llama.cpp 的模型列表现在可以选重排模型:LAMAR 600M
或 BGE Reranker v2 M3,在「资源 · Resources」面板下载,每个约 470 MB。选好后重启服务生效。

它只接管检索时的判断:在本机完成,不消耗账号额度,不联网,每次检索也不用再等 9–17 秒的 CLI 启动。
写入事实时的主题标注由 Claude CLI 完成:每条事实一次调用,消耗账号额度,事实内容会发给 Claude ——
重排模型只会打分,不会写标注。如果你之前用本机的对话模型做判断,换成重排模型后,事实会从这时起开始发给
Claude。没有已登录的 Claude CLI 时,只是不做主题标注,检索时的判断照常 —— 这时「判断」一栏、选用时的提示和
启动提示都会直接说明主题标注现在没有在做,以及原因。

在 llama.cpp 已经运行时才下载的模型,也可以直接选用。 llama.cpp 只在启动时读取模型目录,所以选用一个它还
不认识的新模型时,应用会重启它自己启动的 llama.cpp(几秒钟)再做自检。如果「语义」正在通过这个 llama.cpp 生成
向量,为了不让这几秒里写入的事实丢掉向量,应用不会自动重启,而是请你重启服务后再选。如果 llama.cpp 不是本应用
启动的,应用不会去关它,会告诉你该怎么做。

很长的事实不会再让整次判断失效。 重排模型一次只能读有限长度的文字,以前一条超长的事实会让包含它的每次
检索都整批失败(判断悄悄不起作用)。现在每条候选只把开头约 1000 个字送去打分。

选用前会先做一次自检。 用一道问题和两段文字测它:答案放在后面,另一段文字和问题用词更像、却没有回答。
答案排不到前面的模型文件会被拒绝,并说明原因 —— 有些转换出问题的模型文件能正常打分,却把顺序排反了。

实测的取舍(本应用 240 题的双语测试集,完整数据在 docs/judge-bench.md):

  • 重排模型让正确的事实出现在前八条结果里的次数多得多:从不开判断的 125 题增加到 203–208 题。问法和事实
    不是同一种语言时尤其明显 —— 跨语言的 60 题里,从 6 题增加到 48–49 题。
  • 但它很少把答案排到第一:只从 79 题增加到 86–90 题。它决定哪八条出现,先后还是按原来的排序。
  • Claude CLI 判断正好相反:排第一的从 79 题增加到 132 题,前八条里却只到 133 题;而且每次检索要慢约 20 倍
    (约 9.5 秒;重排模型约 0.5 秒,是在有显卡、模型已加载时测的,只用 CPU 的机器可能慢得多)。
  • 两个候选模型在这套测试里没有测出差别(「带进前八」这一项略偏向 LAMAR,但不足以下结论)。推荐 BGE
    只是按事先定好的规则取较小的文件,两个文件只差 1.4 KB。

判断现在看得到事实本身

以前开着「判断」时,Claude 判断一条检索结果有没有回答问题,看到的只是这条事实的主题(比如「周末市场」),
看不到事实本身(比如「周六周日早上七点开门」),所以常常判断成「没有答到」。现在它看到的是事实的内容(连同
主题)。在同一套 240 题的测试上,排第一的答案从只看主题时的 120 题增加到 132 题。

本机运行时不在了,判断退回 Claude CLI 时不会再向 Claude 要本机模型

如果「判断」用的是本机的对话模型,而本机模型运行时后来不在了(被删掉,或更新失败),判断会退回到 Claude CLI。
以前退回之后,应用还拿那个本机模型的名字去问 Claude —— Claude 不认识它,主题标注和检索时的判断就悄悄地都没有
了,没有任何报错,面板上还写着「Claude CLI · 那个本机模型」。现在退回后用的是 Claude CLI 自己的模型(默认
haiku),面板上显示的也是它。

选模型时直接看到它的说明

在「记忆检索」里选模型时,选中的模型下面会直接显示它的说明 —— 比如重排模型只接管一半的判断、它实测的数字。
以前这些说明只在「资源」面板的「本机模型」表格里。列表里的模型也按名称显示(比如「LAMAR 600M(Q5 · 判断 ·
重排)」),自己放进去的模型文件会标出它是重排模型还是对话模型。

All changes in this release

New features

  • 判断 can verify with a llama.cpp reranker — screened before binding, tagging stays on the CLI
  • rerankers get reranking = true + a whole-pair batch, and warm through /v1/rerank
  • a GGUF has three kinds — chat, embedding, reranking — and two pinned rerankers
  • rerankers are labelled 重排 · 判断, and the picker shows the chosen model's note
  • judge-bench re-analyses saved runs, pairs across runs and rerankers, and states equivalence with an interval
  • judge-bench measures judge noise with an A/A twin of the content arm
  • judge-bench — every way of judging a recall, on one fixture, from identical snapshots
  • measurement-only knobs for the verdict combination and the judge's input

Fixes

  • llama.cpp refusals reach the 语义 bind and the startup warning, and the 判断 group claims only what was measured
  • llama.cpp start and restart are serialized, and a restart never runs while anything writes through it
  • an upgrade no longer strips every vector — llama.cpp starts first, and nothing indexes while the embedder is down
  • the 判断 picker names a model by what it is — catalogue names, and a kind on a dropped-in GGUF
  • the reranker pair note says what its "6" counts — six distinct questions, and on which metric
  • the measurement knobs are logged as Warnings, not only printed to a stdout the Host drops
  • cap what the reranker is sent per candidate — one long fact failed every recall that surfaced it
  • a reranker judge with a signed-out CLI says tagging is not happening — row, toast and warning
  • a model downloaded while llama.cpp runs can be bound — our router restarts, an adopted one is explained
  • the 本机模型 group sentence on 判断 no longer promises no quota — a reranker's tagging spends it
  • review of the reranker docs — one mechanism, configuration-bound LoCoMo, 内置 on 判断 is unbuilt
  • check-doc-refs checks a qualified Type.Member against the type, outside comments
  • stale user-visible text — no retired Ollama, the reranker's tagging spends quota, 内置 means one thing
  • a reranker binding says the facts go to Claude, and ChecksOnly is stated rather than inferred
  • the reranker screen uses a pair that overlap ranks BACKWARDS, measured on both real rerankers
  • model notes compare with the option a household actually has, not a retired Ollama one
  • the reranker screen answers every failure with a sentence — timeouts, refusals, short replies
  • what a reranker binding moves is said from the source — the checking, never the tagging
  • a judge that fell back to the CLI asks for the CLI's model, not the GGUF it fell back from
  • judge-bench uses a paired (Agresti–Min) interval, saves before it analyses, and can recover a run from its row stream
  • judge-bench's equivalence interval accounts for the disagreement rate, not only its split
  • judge-bench — paired significance, stricter fail-open detection, verified seed reuse
  • judge-bench measures what it claims — errors, pinned knobs, shuffled order, serial latency, A/A noise floor, reusable seed
  • questions name their language, and a Japanese fact's third language is Chinese
  • askAll validates the trimmed questions, like askIn; drop a dead constant
  • judge input read once, content-only mode for the bench, and review fixes
  • the Claude judge saw fact TOPICS, never the facts
  • a CLI update over a RUNNING binary failed; claude 2.1.28x system events duplicated

Download the zip, extract, and run Gatherlight.exe. On first run the launcher installs the .NET 10 runtime if it's missing (one-time). Windows 10/11 (x64).