Skip to content

Commit 95ad618

Browse files
committed
v63: restore factual chat, stable live dashboard, bounded Windows CPU and gated n-gram memory
Separate live snapshots from ledger audits and guest SSH. Read existing ledgers without writer locks. Enforce idle priority, two CPU affinity slots and host pressure/media cancellation for owned Windows jobs; keep RTX disabled after the reported hang. Preserve goals, checkpoints and independent promotion gates. Add causal hashed n-gram candidate with host-scored ablation and honest financial receipts. Validation: 1134 tests passed, 65 skipped; Ruff and Bash checks passed. No Windows/CUDA execution or verified income claim.
1 parent 41de365 commit 95ad618

35 files changed

Lines changed: 1619 additions & 94 deletions

‎SYNTA_NGRAM_MEMORY.md‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Synta conditional-memory pilot
2+
3+
Primary research: https://arxiv.org/abs/2601.07372 and
4+
https://github.com/deepseek-ai/Engram. Published results use trained
5+
Engram-equipped models and host-memory prefetching; they do not establish that
6+
memory inserted into an existing Gemma GGUF improves a financial goal.
7+
8+
`rlm/v100/ngram_memory.py` implements an original smaller Engram-inspired
9+
candidate: causal rolling byte n-gram addresses, bounded hashed embeddings,
10+
contextual gates and a zero-initialized value projection. It does not reproduce
11+
DeepSeek's tokenizer compression, multi-head hashing, convolution or distributed
12+
prefetching implementation.
13+
14+
`propose_ngram_memory` accepts width 16-64, 1-2 GRU layers, 256-8192 power-of-two
15+
memory slots and orders 2-4. The conservative total pilot parameter limit is two
16+
million. Float32 tables occupy at most 6 MiB. Large disk mapping is not justified
17+
for this pilot: NVMe stores checkpoints, not extra GPU compute or a measured RAM
18+
expansion. The operator's Windows disk type and bandwidth have not been measured.
19+
20+
`test_submodel` uses the existing isolated CPU trial with 2 threads and bounded
21+
time, memory and parameters. The host repeats prediction with memory disabled on
22+
the same trained weights and fixed cases, retains both logs, scores them without
23+
revealing gold answers to the worker, and verifies the weights checksum between
24+
evaluations. `quality.json.memory_ablation` records scores and time. This measures
25+
a component's contribution, not an independently trained equal-capacity baseline.
26+
27+
Scratch-master promotion refuses candidates without measured development
28+
ablation improvement. Existing independent goal, retention, fresh and public
29+
gates still apply. Main GGUF weights are untouched. The Windows RTX helper is
30+
not started or enabled; the operator shutdown remains authoritative. No actual
31+
goal improvement, profitability or RTX hardware acceptance is claimed.
32+
33+
Regressions cover future-token isolation, initial unchanged logits, actual
34+
gradient updates, safetensors round-trip, dimension rejection before allocation
35+
and host scoring with memory on/off on frozen weights.

‎SYNTA_RECOVERY.md‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,76 @@ serving readiness failure, not a failed income experiment.
154154
This release does not certify fees unavailable from the actual retrieved page,
155155
income, demand, novelty, CUDA utilization or browser behavior on the operator's
156156
machines. The existing Windows CPU limit and disabled RTX preference are retained.
157+
158+
## v63 rebuilt recovery
159+
160+
The interrupted publication did not reach the remote branch. The local workspace
161+
was subsequently restored from the exact public v62 tree before these fixes were
162+
rebuilt. Old test counts are not acceptance evidence for this rebuilt release.
163+
164+
- Financial read-only questions use current host reports without waiting for a
165+
model, modifying plans or inventing ROI. Historical losses, scoring metrics,
166+
zero forward paper fills, hypotheses and verified actual income are separate.
167+
An uninitialized paper ledger reports unknown fills rather than fabricated zero.
168+
- Explicit test-now/history requests execute a transparent BTC hourly commissioning
169+
comparison with one shared source acquisition, two predetermined rules and
170+
documented assumed costs. Cash, buy-and-hold, doubled costs and chronological
171+
windows reject weak candidates. This is not broad autonomous strategy discovery.
172+
A comparison is reused for one hour with report digest checks; source failures
173+
have their own blocked receipt and no invented ROI. Actual income remains unknown.
174+
- Hypothetical-capital research is an archived operator policy, distinct from
175+
spending/account/outreach/order authorization. Existing explicit goals remain
176+
literal. Research jobs are goal-bound, deduplicated and bounded. Windows RTX
177+
remains disabled and the bounded CPU mailbox is retained.
178+
- Native serving readiness waits have durable SQLite timing and a limit of 600
179+
seconds or 20 checks. Other requests can complete during the wait. Actual model
180+
generation timeouts stay terminal. A plan, inspection or queued job cannot prove
181+
implementation. Receipts distinguish failures, reads, queues and publication.
182+
- Full admitted drone assignments replace the old 300-character SQL preview.
183+
Backend finish_reason and measured tokens are separate; length marks an
184+
incomplete response. Archive previews remain bounded and labelled.
185+
- Internal generation instructions and built-in UI labels use English. Chat follows
186+
the current operator language. Archived evidence and literal goals stay verbatim.
187+
- Layout publication cannot reload the reading page automatically. A manual button
188+
loads a new layout when the reader is ready. Existing keyed DOM and disclosure
189+
preservation remain; viewport anchoring is expanded. Reload once after upgrade
190+
to replace already-loaded old JavaScript.
191+
- The separate n-gram memory pilot is documented in SYNTA_NGRAM_MEMORY.md. It is
192+
not a modified Gemma GGUF and cannot activate without measured gates.
193+
194+
Runtime evidence is stored under research/market-research, research/backtests,
195+
research/income-policy-history and research/architecture-candidates. Code tests do
196+
not assert operator-browser, Windows/CUDA runtime acceptance or actual income.
197+
198+
## v63: independent live refresh and conservative Windows CPU
199+
200+
- Live file snapshots refresh every five seconds without running `mission-report`
201+
in that loop. A separate serial collector performs the aggregate audit with its
202+
existing 20-second bound. Delayed audits have their own state and timestamp;
203+
GPU/activity/mission reads continue. Guest SSH layout polling is a third loop,
204+
so its timeout cannot stop live data. Historical aggregate values stay scoped
205+
to the same run and visibly stale; unavailable values are never invented.
206+
- Financial questions in chat read stored same-run evidence and its original
207+
timestamp without launching another aggregate audit. Missing fills and
208+
blockers remain unknown. Old-run counters are discarded.
209+
- Paper and competition reports open existing SQLite ledgers read-only with a
210+
one-second lock wait. They no longer request WAL/schema writer locks just to
211+
display a report. Paper hash-chain validation is retained.
212+
- `install-synta-low-load.ps1` replaces only the isolated owned CPU worker, retains
213+
its authenticated mailbox, sets autostart, and opens a visible log console.
214+
It retires the isolated RTX helper without changing board power, clocks,
215+
unrelated processes, firewall rules or desktop applications.
216+
- Windows children get idle priority and at most two CPU affinity slots, plus
217+
two-thread BLAS/Torch limits. One job runs at a time. The worker checks host
218+
CPU, free RAM and foreground browser/media/game every two seconds and kills
219+
its owned experiment when CPU exceeds 40%, free RAM falls below 6 GiB, or
220+
foreground activity needs the computer. Child RSS is sampled against 4 GiB;
221+
this is a monitored cutoff, not a Windows kernel allocation quota.
222+
- The earlier code noticed CPU pressure but ignored it during running jobs.
223+
This is fixed and tested with an owned child cancellation receipt.
224+
225+
Per-process duty cycles cannot bound a 3090's instantaneous board power. After
226+
the reported black-screen hang, this preset uses Windows CPU and leaves RTX off;
227+
it does not promise to diagnose hardware or prevent all crashes. The V100
228+
remains the main model/GPU. N-gram memory runs as a bounded experimental candidate
229+
with paired host-scored ablation and existing independent promotion gates.

‎SYNTA_REQUIREMENTS_AUDIT.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,33 @@ Final v62 verification: 1098 tests passed, 65 skipped, one existing PEFT warning
116116
no deselections. Ruff for Python/scripts/tests excluding the unchanged notebook,
117117
upgrade shell syntax and diff whitespace checks pass. No Windows, CUDA or
118118
operator-browser runtime acceptance is asserted by this result.
119+
120+
## v63 rebuilt verification
121+
122+
After interrupted publication and workspace rollback, the exact public v62 tree
123+
was restored and this release was rebuilt. Final rebuilt test run: 1125 passed,
124+
65 skipped, one existing PEFT warning, 68.64 seconds. These results supersede the
125+
pre-interruption v63 test count. The causal n-gram memory pilot adds real gradient,
126+
checkpoint and paired host-ablation regressions. All network transports are test
127+
fixtures; no V100/Windows/browser hardware acceptance or verified income is claimed.
128+
See SYNTA_RECOVERY.md and SYNTA_NGRAM_MEMORY.md for scope and admission limits.
129+
130+
## v63 final collection and Windows limits
131+
132+
Aggregate auditing and guest SSH synchronization no longer block the five-second
133+
live collector. Existing ledgers are read without writer/schema locks. Delayed
134+
aggregate audits remain explicitly labeled rather than masquerading as live
135+
financial data. Tests include a deliberately blocked collector and a concurrent
136+
SQLite writer.
137+
138+
Windows now has a dedicated conservative installer with verified isolated
139+
process replacement, CPU pressure cancellation, idle priority, two affinity
140+
slots, monitored four-GiB child RSS, six-GiB host reserve and foreground
141+
browser/media yielding. GPU power is not changed globally; the RTX helper stays
142+
off after the reported hang. This uses Windows CPU for admitted jobs, not pooled
143+
RAM/VRAM or guaranteed GPU safety. Actual Windows execution and V100 profit or
144+
accepted weight updates have not been demonstrated in this workspace.
145+
146+
Final v63 validation: 1134 passed, 65 skipped, one existing PEFT warning.
147+
Ruff, formatting, shell syntax and whitespace checks pass. PowerShell has
148+
static contract tests; this Linux workspace does not execute Windows APIs.

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "rlms"
33
authors = [
44
{name = "Alex Zhang", email = "altzhang@mit.edu"},
55
]
6-
version = "0.1.3+v100.62"
6+
version = "0.1.3+v100.63"
77
description = "Recursive Language Models."
88
readme = "README.md"
99
license = "MIT"

‎rlm/v100/architectures.py‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,10 @@ def run_candidate(
406406
if pool.stat().st_size > 8 * 2**20:
407407
raise ValueError("Architecture corpus exceeds 8 MiB pilot budget")
408408
train, validation = load_records(pool, root / "research/state/architecture-splits.sqlite3")
409+
from rlm.v100.morphology import read_shape
410+
411+
shape = read_shape(output / "source/model.py")
412+
memory_ablation = None
409413
run = output / "trial"
410414
with resource_lease(root, budget["device"]):
411415
run.mkdir(exist_ok=False)
@@ -447,6 +451,29 @@ def run_candidate(
447451
eval_time = phase(output, run, inputs, budget, "predict")
448452
if file_hash(weights) != weights_sha:
449453
raise ValueError("Architecture changed weights while being evaluated")
454+
if shape and shape.get("memory_kind") == "causal-hashed-ngram-v1":
455+
shutil.copyfile(run / "predict.log", run / "memory-enabled.log")
456+
configuration["ablate_ngram_memory"] = True
457+
atomic_json(inputs / "config.json", configuration)
458+
ablation_time = phase(output, run, inputs, budget, "predict")
459+
if file_hash(weights) != weights_sha:
460+
raise ValueError("Architecture changed weights during memory ablation")
461+
shutil.copyfile(run / "predict.log", run / "memory-disabled.log")
462+
if (run / "memory-disabled.log").stat().st_size > 2 * 2**20:
463+
raise ValueError("Ablation output exceeds protocol budget")
464+
ablation_predictions = [
465+
json.loads(line)
466+
for line in (run / "memory-disabled.log").read_text().splitlines()
467+
if line.startswith('{"id":')
468+
]
469+
ablation_cases = score_predictions(rows, ablation_predictions)
470+
memory_ablation = {
471+
"disabled_passed_cases": sum(row["passed"] for row in ablation_cases),
472+
"disabled_evaluation_seconds": ablation_time,
473+
"cases": ablation_cases,
474+
"scope": "Same trained weights with memory disabled; feature ablation only, not an independently trained capacity-matched baseline",
475+
}
476+
shutil.copyfile(run / "memory-enabled.log", run / "predict.log")
450477
if (run / "predict.log").stat().st_size > 2 * 2**20:
451478
raise ValueError("Architecture prediction output exceeds its protocol budget")
452479
predictions = [
@@ -471,6 +498,12 @@ def run_candidate(
471498
"status": "scored full-weight submodel pilot; main serving model was not replaced",
472499
"scope": "Finite development suite; sampled resource monitoring is not hardware partitioning or proof against malicious code",
473500
}
501+
if memory_ablation is not None:
502+
memory_ablation["enabled_passed_cases"] = report["passed_cases"]
503+
memory_ablation["development_improvement"] = (
504+
report["passed_cases"] > memory_ablation["disabled_passed_cases"]
505+
)
506+
report["memory_ablation"] = memory_ablation
474507
atomic_json(run / "quality.json", report)
475508
from rlm.v100.experiments import SharedLab
476509

‎rlm/v100/backtesting.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def simulate(
113113
}
114114

115115

116-
def run(root: Path, branch: str, arguments: dict) -> dict:
116+
def run(root: Path, branch: str, arguments: dict, *, source_snapshot: tuple | None = None) -> dict:
117117
from rlm.v100.research_tools import download_page
118118

119119
if set(arguments) != {"price_url", "event_url", "rule", "fee_bps", "slippage_bps"} or arguments[
@@ -124,7 +124,9 @@ def run(root: Path, branch: str, arguments: dict) -> dict:
124124
value = arguments[field]
125125
if type(value) not in (int, float) or not math.isfinite(value) or not 0 <= value <= 1000:
126126
raise ValueError("Backtest costs must be explicit bounded assumptions")
127-
price_url, body = download_page(arguments["price_url"])
127+
price_url, body = (
128+
source_snapshot if source_snapshot is not None else download_page(arguments["price_url"])
129+
)
128130
now = datetime.now(UTC)
129131
bars = bars_from_source(price_url, body, now)
130132
sources = [

‎rlm/v100/chat_facts.py‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
"""Local factual answers do not depend on model availability or narratives."""
2+
3+
import re
4+
from pathlib import Path
5+
6+
from rlm.v100.income_policy import normalized
7+
8+
9+
def language(message: str) -> str:
10+
return (
11+
"Polish"
12+
if re.search(
13+
r"\b(?:co|czemu|jak|czy|kiedy|gdzie|zarab|zarabianiem|zrob|zmien|przetestuj|poszukaj|zbieraj|hej|czesc|odpowiedz)\w*\b",
14+
normalized(message),
15+
)
16+
else "English"
17+
)
18+
19+
20+
def requested(message: str) -> bool:
21+
return bool(
22+
re.search(
23+
r"zarab|income|profit|backtest|minus|paper|opportunit|candidate|brier|kandydat",
24+
normalized(message),
25+
)
26+
)
27+
28+
29+
def response(root: Path, message: str) -> dict:
30+
from rlm.v100.income_opportunities import status
31+
from rlm.v100.progress import snapshot
32+
33+
value = snapshot(root)
34+
board = status(root)
35+
pl = language(message) == "Polish"
36+
paper = value.get("paper", {})
37+
lines = [
38+
"Brak potwierdzonego rzeczywistego dochodu. Nie ma wiarygodnej daty pierwszego zarobku."
39+
if pl
40+
else "No actual income verified. There is no verified date of first income.",
41+
("Faza: " if pl else "Phase: ") + str(value.get("phase")),
42+
("Wykonania paper: " if pl else "Paper fills: ")
43+
+ str(paper.get("executed_fills", "unknown")),
44+
"Zero wykonań nie potwierdza strategii. Prognozy nie są transakcjami."
45+
if pl
46+
else "Zero fills do not validate a strategy. Forecasts are not trades.",
47+
("Blokady: " if pl else "Blockers: ")
48+
+ (", ".join(value["paper_blockers"]) if "paper_blockers" in value else "unknown"),
49+
("Czas zapisanej kontroli: " if pl else "Stored audit timestamp: ")
50+
+ str(value.get("updated_at", "unavailable")),
51+
("Zarejestrowane hipotezy dla celu: " if pl else "Registered current-goal hypotheses: ")
52+
+ str(len(board["candidates"])),
53+
"Ujemny zwrot backtestu jest stratą symulacji historycznej. Nie jest wynikiem Brier ani benchmarku."
54+
if pl
55+
else "A negative backtest return is a historical simulated loss, not a Brier or benchmark score.",
56+
]
57+
for row in value.get("recent_exploratory_backtests", []):
58+
net = row.get("development_test", {}).get("net_return")
59+
lines.append(
60+
str(row.get("parameters", {}).get("rule"))
61+
+ ": "
62+
+ (f"{net:.2%}" if type(net) in (int, float) else "unknown")
63+
+ " | "
64+
+ str(row.get("report"))
65+
)
66+
return {
67+
"answer": "\n".join(lines),
68+
"actions": [],
69+
"applied": [],
70+
"facts": value,
71+
"responder": {"model": "controller-financial-evidence"},
72+
"scope": "Read-only host evidence; no plan, weight, order or spending changes",
73+
}
74+
75+
76+
def test_response(root: Path, message: str) -> dict:
77+
from rlm.v100.market_research import compare
78+
79+
value = compare(root)
80+
lines = [value["state"], value.get("error", value["scope"])]
81+
for row in value["comparisons"]:
82+
net = row["development_test"].get("net_return")
83+
lines.append(
84+
row["parameters"]["rule"]
85+
+ ": "
86+
+ (f"{net:.2%}" if type(net) in (int, float) else "unknown")
87+
+ " | "
88+
+ row["triage"]["state"]
89+
+ " | "
90+
+ row["report"]
91+
)
92+
return {
93+
"answer": "\n".join(lines),
94+
"actions": [],
95+
"applied": [value],
96+
"responder": {"model": "controller-historical-comparison"},
97+
"scope": "Historical research executed; no future edge, verified income or orders claimed",
98+
}

0 commit comments

Comments
 (0)