Repository navigation
One-command launchers for Linux and Windows, retrieve-twice by default, and GPU results at 1.5B/4B/24B - #11
Merged
Merged
Conversation
…t most that rank) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…for a host without the llama.cpp converter Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…there made every key alike) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…96 vs 44/96 retrieval only Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…h transformers (GPU hosts), with the agent's retrieved facts and prompt layout Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…s with a second retrieval
A question that needs two linked facts ("Which city does my brother live in?"
needs "Your brother's name is Yusuf" and "Yusuf's city is Ghent") shares words
with only one of them; one hop put both in the prompt for 3 of 24 such
questions. RecallHops queries "<name> <question>" for each name in the top
rag_k facts (HopSeed: the value of a my-fact, the owner of a named one) and puts
the best new fact that mentions the name after the fact that named it, at most
hop_k (default rag_k) more. Off by default until the benchmark says otherwise.
bench_integration.py --hops N.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…d (withheld 28 bound answers) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…l vs retrieval + deep sleep vs weights Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…: drift 1.04, bridge 23/24, verify 5/24 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…ts; retrieve twice by default; gentler 24B training; warn when the gate keeps rejecting scripts/run.sh detects cores, RAM and NVIDIA GPUs, picks a preset (cpu-lite, cpu, gpu8, gpu12, gpu40, 2gpu), builds memagent and llama.cpp (CUDA when there is a GPU and nvcc) and installs the Python trainer only when missing, writes run/<preset>.ini and starts memagent with background training on. - [retrieval] hops=2 by default: 40 -> 58 of 96 integration questions (1.5B) - large profile: 2 epochs at lr 2e-4 (8 at 5e-4 drifted x16, so every deep sleep would have been rejected); medium gate allows drift 1.5 (its best run, 77/96 and the top score, drifted 1.39) - after two rejected runs in a row the agent says why (drift or recall) and what to change, instead of burning compute silently - bench/README.md: edited facts, GPU deep sleep at 1.5B/4B/24B, retrieve twice, and what the presets rest on Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…are dry-run in CI; no background training at 1.5B - scripts/run.ps1 + run.cmd: the same presets as run.sh for Windows PowerShell 5.1. In a release folder (next to memagent.exe) or a clone. The Windows llama.cpp is CPU-only, so GPU presets answer through the Python engine; it installs PyTorch with CUDA (pip's default on Windows is CPU-only), the trainer and bitsandbytes when missing, and writes the ini without a BOM. - run.sh also works in an extracted release, and falls back to the Python engine on a GPU without a CUDA llama.cpp. --dry-run writes nothing. - Releases: run.sh in the Linux tarball; run.cmd/run.ps1 in the Windows zip and installer, with a "memagent (best settings for this PC)" Start menu entry. release.yml dry-runs each launcher in its release folder on every PR. - cpu and gpu8 presets (1.5B) set [consolidate] auto=0: in the agent with two hops, the GPU-trained 1.5B memory scored 32/96 against 58/96 for retrieval. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds one-command launchers for Linux and Windows and turns on retrieve-twice by default. It also changes defaults based on today's GPU results, and adds the benchmarks and results behind them. It follows #10; these commits came after that merge.
One-command launchers
Each launcher detects CPU cores, RAM and NVIDIA GPUs and picks a preset. It installs only what is missing, writes
run/<preset>.ini, and starts memagent. Both work from a clone and from an extracted release.scripts/run.sh.scripts/run.cmd/run.ps1, written for Windows PowerShell 5.1. The installer adds a "memagent (best settings for this PC)" Start menu entry.cpu-litecpu/sleepon demand)gpu8/sleepon demand)gpu12gpu402gpuWhen llama.cpp has no CUDA, GPU presets answer through the Python engine. That covers the Windows release and machines without
nvcc. On Windows the launcher installs PyTorch with CUDA, since pip's default there is CPU-only.Default changes, each backed by a measurement
[retrieval] hops=2(retrieve twice). Each name in the first hits gets a second retrieval (Mem.Recall.RecallHops). In the 1.5B agent, bridge questions had both facts in the prompt 100% of the time instead of 12.5%. The score went from 40/96 to 58/96.models.json.Results (details in
bench/README.md)Python benchmark on an RTX A6000:
bench/bench_integration_hf.py, with the same retrieved facts at every model size.The trained memory combines facts with retrieval: retrieval supplies "your sister is Hana", and the weights know Hana's city. But it also teaches a format: yes/no questions get answered with fact sentences. Varied question formats in the training data are the next fix and aren't in this PR.
Fact editing:
trainer/edit_facts.pywrites facts with MEMIT and saves them as a LoRA. It is fast, at 7–12 minutes, and barely changes the model, with drift 1.01–1.02. Recall is 0.83 at 1.5B and 0.94 at 4B. It does not help combine facts. It also fixes a bug where the attention sink at position 0 made every person's key look alike.Testing
make test: extraction 710/710, priors 39/39, retrieval, HTTPS, and Python unit tests all pass.run.sh: a real start here (thecpupreset) stored two facts and answered a two-fact question. Dry runs pass in a clone, a mock release folder and a realscripts/package.shtarball.run.ps1/run.cmd: not run in this session, because the sandbox does not allow installing PowerShell.release.ymlnow dry-runs both on the Windows runner for this PR, under Windows PowerShell 5.1. The checks: preset choice, the Python engine for GPU presets in the release, and no files written.Generated by Claude Code