116 lines
4.6 KiB
JavaScript
116 lines
4.6 KiB
JavaScript
/* ==================================================================
|
||
Natural Memory v2 — restart.js
|
||
「重启实验」互动装置的数据层。
|
||
|
||
⚠️ 本文件的每一个数值都逐字取自工程内的原始 JSON,未做任何改写、
|
||
换算或估算。两个来源文件:
|
||
A. dynamic_memory_lab\natural_memory_v2_restart_test_v7.json (修复前)
|
||
B. dynamic_memory_lab\natural_memory_v2_restart_test_v7_final.json (修复后)
|
||
两次运行使用同一条事实、同一个问题、同一份协议,唯一差别是
|
||
「写入是否真的落库」(write_changed: false → true)。
|
||
|
||
修改此处等于修改一个「证据」页面,请先核对原始 JSON 再改。
|
||
================================================================== */
|
||
window.NM_RESTART = {
|
||
eyebrow: "Evidence · 重启实验",
|
||
h2: "把历史扔掉,它还记得吗?",
|
||
lede: "下面不是示意动画,是工程里两次真实运行的逐字回放。同一条事实、同一个问题、同一份协议;" +
|
||
"两次之间唯一的差别,是写入有没有真的落库。",
|
||
|
||
fact: "我正在开发一个长期项目,项目内部代号是NM-V2-RESTART,使用中文。",
|
||
query: "我正在开发的长期项目内部代号是什么?只回答代号。",
|
||
expected: "NM-V2-RESTART",
|
||
historyPassedToRestart: false,
|
||
|
||
/* 读取路径的四个节拍(两次运行共用同一套节拍名) */
|
||
beats: [
|
||
{ i: "01", t: "写入", s: "automatic_write: true —— 事实作为一条带地址的记录进入记忆库" },
|
||
{ i: "02", t: "重启", s: "history_passed_to_restart: false —— 重启不携带任何对话历史" },
|
||
{ i: "03", t: "召回", s: "路由器在当前问题与有界候选之间定位证据记录" },
|
||
{ i: "04", t: "作答", s: "命中的短证据作为模型内部前缀注入 Qwen,再由普通生成产出答案" }
|
||
],
|
||
|
||
variants: [
|
||
{
|
||
key: "before",
|
||
label: "修复前",
|
||
tone: "bad",
|
||
file: "natural_memory_v2_restart_test_v7.json",
|
||
/* --- 写入 --- */
|
||
writeChanged: false,
|
||
/* --- 重启后模型看到的内部状态 --- */
|
||
prefixLength: 0,
|
||
prefixUsed: false,
|
||
/* --- 路由决策 --- */
|
||
needMemory: false,
|
||
pageIds: [],
|
||
recordIds: [],
|
||
pageScores: [],
|
||
recordScores: [],
|
||
hopCount: 1,
|
||
confidence: 0.5,
|
||
stopReason: "below_read_threshold",
|
||
/* --- 生成结果 --- */
|
||
response: "Project Phoenix",
|
||
recalled: false,
|
||
correct: false,
|
||
/* --- 存储快照(before_save) --- */
|
||
store: {
|
||
records: 0, active_records: 0, pages: 0, resident_records: 0,
|
||
coarse_index_buckets: 0, gpu_cache_records: 0, gpu_cache_tokens: 0,
|
||
gpu_cache_bytes: 0
|
||
}
|
||
},
|
||
{
|
||
key: "after",
|
||
label: "修复后",
|
||
tone: "ok",
|
||
file: "natural_memory_v2_restart_test_v7_final.json",
|
||
writeChanged: true,
|
||
prefixLength: 45,
|
||
prefixUsed: true,
|
||
needMemory: true,
|
||
pageIds: ["page_00000001"],
|
||
recordIds: ["mem_3f5823eb77810b49"],
|
||
pageScores: [0.48235471503517796],
|
||
recordScores: [0.5923714575763567],
|
||
hopCount: 1,
|
||
confidence: 0.7961857287881784,
|
||
stopReason: "evidence_found",
|
||
response: "NM-V2-RESTART",
|
||
recalled: true,
|
||
correct: true,
|
||
store: {
|
||
records: 1, active_records: 1, pages: 1, resident_records: 1,
|
||
coarse_index_buckets: 1, gpu_cache_records: 1, gpu_cache_tokens: 45,
|
||
gpu_cache_bytes: 1429
|
||
}
|
||
}
|
||
],
|
||
|
||
/* 常量:出自同一份 JSON 的存储与预算字段(两次运行相同) */
|
||
limits: {
|
||
maxPages: 32768,
|
||
pageCapacity: 32,
|
||
capacityRecords: 1048576,
|
||
kvBudgetTokens: 32768,
|
||
kvTriggerTokens: 29491,
|
||
gpuCacheLimitRecords: 256,
|
||
gpuCacheLimitTokens: 131072,
|
||
gpuCacheReserveMB: 2048,
|
||
gpuCacheDevice: "cuda:0"
|
||
},
|
||
|
||
/* 同一个实验的另外两次运行,用于说明「不是每次都成功」 */
|
||
otherRuns: [
|
||
{ file: "natural_memory_v2_restart_test.json", date: "2026-09-04 23:16",
|
||
writeChanged: true, prefixLength: 36, recalled: true, quarantined: 2 },
|
||
{ file: "restart_memory_natural_v7.json", date: "2026-09-04 09:15",
|
||
note: "另一条事实(工作地点代号 R7)。复位 token 后 memory_norm 归零,模型随即答不出——" +
|
||
"这条记录的是「清掉记忆会怎样」的对照组。" }
|
||
],
|
||
|
||
note: "两次运行的判定字段(router_recalled_after_restart / generated_contains_expected)分别为 " +
|
||
"false / false 与 true / true。我们没有为发布页润色过任何一条模型输出,包括修复前那次编造出来的答案。"
|
||
};
|