{"id":50488108,"url":"https://github.com/spfunctions/ttt-conv-memory","last_synced_at":"2026-06-02T00:04:09.842Z","repository":{"id":354461021,"uuid":"1223724554","full_name":"spfunctions/ttt-conv-memory","owner":"spfunctions","description":"TTT (Test-Time Training) fast-weight updates as a multi-turn conversation memory substrate — empirical validation against ByteDance-Seed/In-Place-TTT","archived":false,"fork":false,"pushed_at":"2026-04-28T18:12:14.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-28T18:14:33.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spfunctions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-28T15:39:04.000Z","updated_at":"2026-04-28T18:12:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/spfunctions/ttt-conv-memory","commit_stats":null,"previous_names":["spfunctions/ttt-conv-memory"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/spfunctions/ttt-conv-memory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fttt-conv-memory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fttt-conv-memory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fttt-conv-memory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fttt-conv-memory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spfunctions","download_url":"https://codeload.github.com/spfunctions/ttt-conv-memory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spfunctions%2Fttt-conv-memory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33798943,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-01T02:00:06.963Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T00:04:06.850Z","updated_at":"2026-06-02T00:04:09.828Z","avatar_url":"https://github.com/spfunctions.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ttt-conv-memory\n\nEmpirical validation of the question:\n\n\u003e **Can test-time training (TTT) fast-weight updates serve as a multi-turn conversation memory mechanism, replacing the context window?**\n\nWe feed a model a dialogue containing facts, let TTT update its fast weights during ingestion, then **drop the conversation from context** and ask probe questions. The fast-weight state is the only place the facts could persist. We measure how many of them the model can still answer.\n\nThe vehicle is the [In-Place TTT](https://github.com/ByteDance-Seed/In-Place-TTT) architecture from ByteDance-Seed (ICLR 2026 oral) on Qwen3-8B.\n\n## Verdict\n\n**NEGATIVE under our minimum-scale (B-mini) training.** EM(A) = 0.929 with conversation in context, EM(B) = 0.000 with TTT memory only, EM(C) = 0.016 no-memory baseline. `memory_efficiency_ratio = EM(B)/EM(A) = 0.000`. The TTT-modified weights actively *degrade* the model below the no-memory baseline — they are perturbation noise, not encoded memory. Full report in [`RESULTS.md`](RESULTS.md).\n\nThis is not a refutation of In-Place TTT at paper scale (5000 steps × seq 65536 × 8×H100, joint base+TTT training); it is an answer to the literal experimental question under realistic single-GPU constraints.\n\n## Documents\n\n- [`SPEC.md`](SPEC.md) — refined experimental design\n- [`DECISIONS.md`](DECISIONS.md) — every research-level fork in the road and why\n- [`STATE.md`](STATE.md) — full chronological run log\n- [`RESULTS.md`](RESULTS.md) — final report with numbers, figures, interpretation\n\n## Layout\n\n```\nttt-conv-memory/\n├── README.md             # this file\n├── SPEC.md               # detailed experimental spec\n├── STATE.md              # live state — updated after every step\n├── DECISIONS.md          # every fork + rationale\n├── RESULTS.md            # final report (written at end)\n├── requirements.txt      # pinned Python deps for the GPU host\n├── setup.sh              # bare-metal Linux GPU host install\n├── modal_app.py          # Modal serverless entry point\n├── build_benchmark.py    # generate the 300-sample benchmark\n├── benchmark_v1.json     # the generated benchmark (committed)\n├── model_utils.py        # model loading + TTT cache / fast-weight control\n├── train_minimal.py      # minimal continual-pretrain to bring TTT params out of init\n├── run_experiment.py     # main 4-condition pipeline\n├── evaluate.py           # metrics + figures\n├── results/              # per-condition outputs + final report\n│   ├── condition_a.json\n│   ├── condition_b.json\n│   ├── condition_c.json\n│   ├── condition_d.json\n│   ├── report.json\n│   └── figures/\n└── logs/                 # raw run logs (training, inference, sanity checks)\n```\n\n## Quick reference\n\n| Question | Answer |\n|---|---|\n| Hardware | Single A100-40G via Modal |\n| Cost budget | ~$25-30 (covered by Modal $30/mo free credit) |\n| Model | Qwen3-8B (base) + In-Place TTT layers |\n| Checkpoint | Self-trained minimal (see `DECISIONS.md` D-001) |\n| Dataset | 300 synthetic conversations × 5-10 facts each |\n| Conditions | A: context baseline / B: TTT memory / C: no memory / D: TTT + distractor |\n| Verdict bar | Memory efficiency ratio = EM(B) / EM(A) \u003e 0.7 ⇒ \"this path works\" |\n\n## Reproduce\n\n```bash\n# 1. Build the benchmark (CPU-only, ~30s)\npython build_benchmark.py\n\n# 2. End-to-end on Modal\nmodal run modal_app.py::full_pipeline\n\n# OR step-by-step on a Linux GPU host\nbash setup.sh\npython train_minimal.py\npython run_experiment.py --condition all\npython evaluate.py\n```\n\n## License\n\nMIT (see `LICENSE`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspfunctions%2Fttt-conv-memory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspfunctions%2Fttt-conv-memory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspfunctions%2Fttt-conv-memory/lists"}