Repository navigation
Comparing changes
Open a pull request
base repository: volotat/mini-AGI
base: main
head repository: gt50/mini-AGI
compare: main
- 15 commits
- 45 files changed
- 2 contributors
Commits on Oct 4, 2026
-
Port to ROCm / AMD Strix Halo and fix Windows portability
Hardware: - minagi/device.py: one place for backend/arch detection, the unified-memory flag, a configurable GPU memory budget, and env vars torch reads at import (allocator, ROCm AOTriton, TunableOp), driven by a `hardware:` config block - growth's ROOM brake measures against that budget instead of the device's reported size, which on an APU is only the firmware carve-out - the expert RAM tier can live on the device (default on unified memory), so paging onto the card is a device-to-device copy; ram_cache 0 = keep all - serve.py runs its forwards under amp (bf16), as training does - hardware banner at startup of train.py read and serve.py - configs/strix_halo.yaml (continue the released model) and configs/strix_halo_large.yaml (a new, larger run); README section - tools/bench_hw.py: SDPA kernels, expert bmm, a full training step and paging latency at a config's shapes Portability and hygiene: - --config / MINAGI_CONFIG select the config file for every reader - encoding="utf-8" on every text open (cp1252 crashed corpus builds) - plot refresh no longer shells out to bash - npz handles closed so os.replace works on Windows - build_paged/_split_trunk_pool moved to minagi/build.py; the library no longer imports train.py - GradSNR restarts when a watched tensor changes size (crashed on the first growth in a fresh run) - pyproject.toml; .gitignore fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 5e8d1e1 - Browse repository at this point
Copy the full SHA 5e8d1e1View commit details -
Weights-directory lock, serve hardening, shared optimizer, tests + CI
- minagi/lock.py: one writer per weights directory (O_EXCL lock file with pid/host/role, stale-lock takeover). train.py read refuses a held directory; serve.py falls back to read-only instead of learning - serve.py: JSON-only /api/chat, Origin and Host checks (cross-site and DNS-rebinding POSTs were trained into the weights), max_new clamped to 2048, learning off by default when bound to a non-loopback host - minagi/build.py build_adamw: one trunk/pool split for train.py read, live.py and the replication probe; the server now trains routers at the pool rate as training does - torch seed mixed with characters read, so resumes stop replaying one random sequence - corpora/fetch.py keeps the HF datasets cache unless --drop-cache, and honours HF_DATASETS_CACHE / HF_HOME - tests/ (config, device, lock, paged round trip, serve refusal 8000 s) and a CPU CI workflow on Ubuntu and Windows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 796ce8a - Browse repository at this point
Copy the full SHA 796ce8aView commit details -
Ignore every .venv* directory (.venv-rocm for the ROCm build)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 460b347 - Browse repository at this point
Copy the full SHA 460b347View commit details -
Merge pull request #1 from gt50/strix-halo
Port to AMD Strix Halo (ROCm), plus portability, safety and tests
Configuration menu - View commit details
-
Copy full SHA for 91b4c0d - Browse repository at this point
Copy the full SHA 91b4c0dView commit details -
Strix profiles: keep the released model's resident and context, Tunab…
…leOp off Measured on a Ryzen AI Max+ 395 with the released weights: - resident 64 took held-out chat 0.60 -> 0.92 and code 0.71 -> 1.19 nats; the model learned to choose within 32. strix_halo.yaml keeps 32 - context_end 8192 scored 1.66 nats against 0.62 at 4096: held-out is read at the ceiling, past positions the model was trained on. Kept at 4096 - TunableOp re-tunes nearly every call because the expert dispatch's matmul shapes change with every forward; a held-out pass ran past half an hour. Off in both profiles - README "What to expect" rewritten with these and the measured speeds - weights-*/ ignored (weights-strix/, backups) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 9db226b - Browse repository at this point
Copy the full SHA 9db226bView commit details -
Scope the port to Windows: drop the Linux notes and the Ubuntu CI job
The Linux instructions (GTT / ttm.pages_limit memory setup, Linux wheels) were written from AMD and community sources and never run on hardware. The port is tested on Windows only, so the README, the Strix profiles and minagi/device.py now say so, and CI runs on Windows. The code itself stays portable: nothing here stops the project running on Linux as upstream did. The profiles' memory note now records what was measured: torch reported 99.7 GB on the test machine while Windows kept 63.6 GB for itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 4a2f138 - Browse repository at this point
Copy the full SHA 4a2f138View commit details -
Merge pull request #2 from gt50/strix-halo
Strix profiles: measured fixes, and scope the port to Windows
Configuration menu - View commit details
-
Copy full SHA for 119a177 - Browse repository at this point
Copy the full SHA 119a177View commit details -
Faster writing: run only the chosen experts; uncap the large profile
Writing a character was memory-bandwidth bound. Each character is a forward of its own and routes to top_k experts, but the dispatch ran its batched matmuls - and cast fp32 weights to bf16 - over every expert on the card. With 128 on the card that read 604M weights per row to use 8. - pool.py: when at most half the card's experts were chosen, gather just those before the matmuls. Training chunks reach nearly every expert, so they keep the old path (A/B on a training step: 4,794 vs 4,798 ms). tests/test_dispatch.py checks outputs and slot gradients match. - Fewer per-row host syncs and tiny launches (134 -> 67 syncs a character): cached slot index tensor in PagedPool, last_seen read once per _place, telemetry EMAs kept on the device, cap known for a single character, admit() indexes a list instead of a tensor per expert, one write to `ever` per admission. Writing speed on the 8060S (tools/bench_hw.py --weights): large model (128 on the card) 2.4 -> 9.4 char/s trained model (32 on the card) 7.8 -> 11.0 char/s - configs/strix_halo_large.yaml: capacity_factor 1.5 -> 0. At 1.5 a fresh model dropped 59% of routing (76% in a real run); uncapped a step is 27% slower and peaks at 22.8 GB instead of 17.8. - tools/bench_hw.py: a writing benchmark (--weights to use a real directory) and the dropped-routing share on the training-step line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 281b81e - Browse repository at this point
Copy the full SHA 281b81eView commit details -
Merge pull request #3 from gt50/decode-speed
Faster writing: run only the chosen experts; uncap the large profile
Configuration menu - View commit details
-
Copy full SHA for 85f267a - Browse repository at this point
Copy the full SHA 85f267aView commit details -
Grouped expert dispatch: no padding to the busiest expert
Training the large Strix profile slowed to half speed as it went and then crashed. Measured on its checkpoint: routing grows "sink" experts that nearly every character picks among its top 8 - 1,960 of 2,081 characters at a typical row, 15x the fair share with 128 experts on the card. The dispatch padded every expert to the busiest one's load, so uncapped it computed ~16x the routed work and its buffers kept growing; capped, it dropped 30-60% of routing. - minagi/pool.py: the chosen experts are grouped by load (rounded with _bucket) and each group runs its own batched matmuls at its own size. Weights are gathered once per call and split into the groups' views; a gather per group was slower, because each one's backward allocates a gradient the size of the whole card. One character is a single group of top_k experts, so writing reads top_k experts' weights. The old single rectangle stays behind PooledMLP.grouped_dispatch = False. - Buffer capacities are rounded to a few dozen sizes (_bucket). ROCm on Windows ignores expandable_segments, and a new buffer size every call fragmented 17 GB of live tensors into 49 GB reserved. - train.py: allocated / reserved / peak GPU memory in the history file at every checkpoint. - tools/gpu_mem_sampler.ps1: per-process dedicated and shared GPU memory from Windows' performance counters. - Profiles and README: expandable_segments is ignored on Windows ROCm, and why capacity_factor stays 0 on the large profile. On the 8060S, step 1,938 of the large model, uncapped: training step 475 -> 813 char/s, peak 24.6 -> 18.8 GB, 0% dropped writing 5.3 -> 19.8 char/s A 45-minute run held 100-147 steps per 5 minutes (58 before) with reserved memory flat at 22.8 GB; held-out 2.17 -> 2.00. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 6baca7a - Browse repository at this point
Copy the full SHA 6baca7aView commit details -
Merge pull request #4 from gt50/grouped-dispatch
Grouped expert dispatch: no padding to the busiest expert
Configuration menu - View commit details
-
Copy full SHA for 1f32ed4 - Browse repository at this point
Copy the full SHA 1f32ed4View commit details -
Corpus: OpenHermes held out on its own; self-knowledge check finds it…
…s files `python -m corpora all` had two path bugs in the chat lanes: - OpenHermes wrote its held-out set into data/val/chat, and the generated chat lane (primal chat + self-knowledge) runs `expand --only chat` afterwards, which clears the .txt files in data/val/chat - silently deleting OpenHermes' 400 held-out files on every full build. It now holds out into data/val/chat_hermes, the separate held-out subject the README's results already report. Its training data stays in data/train/chat/hermes. - The self-knowledge lane was checked at data/train/self-knowledge, a folder nothing writes, so every build reported "self-knowledge produced nothing" and exited 1 although the lane had been written to data/train/chat. It is checked by glob, data/train/chat/chat-*.txt - not by the folder, which holds hermes/ too and would read as built before the lane ever was. serve.py's priming read the same missing folder, so it served unprimed; it reads data/train/chat now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 9593055 - Browse repository at this point
Copy the full SHA 9593055View commit details -
Merge pull request #5 from gt50/corpus-lanes
Corpus: OpenHermes held out on its own; self-knowledge check finds its files
Configuration menu - View commit details
-
Copy full SHA for 0fa8a9f - Browse repository at this point
Copy the full SHA 0fa8a9fView commit details
Commits on Oct 5, 2026
-
read: score held-out at the reading window, not the ceiling
cmd_read built its FolderEvaluator with cfg.block and never moved it, so held-out was read at the ceiling while the model read at its window - the opposite of what the comment above it says it does. `stream` already sets evaluator.context as its window grows. Measured on the large Strix profile at step 16,335 (window 2,367 of 8,192), the same held-out text: at the window 1.4164 +/-0.0151 at the ceiling 2.2843 +/-0.0280 every subject 0.70-1.12 nats worse at the ceiling. That flattened the reported held-out for a whole night while training loss fell 1.57 -> 1.29, and since growth's HONEST brake compares train with held-out (max_gap 0.4) it likely kept growth shut: the pool sat at 135 experts. The evaluator now starts at the window the run resumes at and is set to the current window before every evaluation - before, each sample round, after. Runs whose window has reached its ceiling, the released model's among them, score exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 20db018 - Browse repository at this point
Copy the full SHA 20db018View commit details -
Merge pull request #6 from gt50/eval-at-window
read: score held-out at the reading window, not the ceiling
Configuration menu - View commit details
-
Copy full SHA for 1716cbd - Browse repository at this point
Copy the full SHA 1716cbdView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...main