BLOG

mini-AGI: A Byte-Level Language Model for Continual Learning Trained from Scratch on an 8GB GPU

Kael Zhang
open-sourcelanguage-modelscontinual-learning
广告 · Advertisement

技术拆解:解析 AI 技术框架——说明、分析、技术评估、价值判断、落地使用。作者:永亮


Today’s mainstream language models treat training as a one-shot deal: gulp down massive corpora, solidify into a base model, and any new knowledge afterward can only be layered on through rounds of fine-tuning patches — slap on enough patches and you get forgetting; if you truly want to keep learning, you have to retrain from scratch. On September 21, 2026, a project by GitHub author Alexey Borsky called mini-AGI that flips this entire order appeared on Show HN, earning 255 upvotes and 56 comments. Its premise is blunt: reading and being trained are the same thing — the model reads the character stream in chunks, takes a gradient step for each chunk, never freezes, never graduates. This article breaks it down into six things: what it is, why it’s worth watching, how the mechanisms work, the numbers and their limits, who can run it, and who it’s for.

一、它是什么

mini-AGI is a byte-level language model: the alphabet is 256 byte values, with no tokenizer — any data type, whether text, code, chess games, or dialogue, can be fed in without needing a new vocabulary. Its core identity is a “continual learning model”: it continuously reads from a character stream, updates its weights after processing each chunk, and reading, inference, and learning all follow the same code path. The line in the README that defines it is worth remembering verbatim: “There is no separate fine-tuning phase, no frozen base — reading and being trained are the same thing.”

What is most counterintuitive is how it stores its parameters. Weights don’t live on the GPU — they live on disk, paged into VRAM on demand. So the model’s parameter count ceiling is determined by disk capacity, not by VRAM. This is like virtual memory in an operating system: the address space a program sees is far larger than physical memory. Swap it here, and the parameter space the model sees is far larger than VRAM — unused weights lie on disk, and whichever one is needed comes up when called. This reframing is the starting point of all its design — the GPU no longer determines how large the model can grow, only how fast it runs. The entire project is 42 files, 30 Python files, 17M in size, under the MIT license.

But the sense of proportion must be nailed down first, and the author nailed it himself in the README: “as of now this is a small toy-level model. Do not expect a frontier level capabilities.” This is a small experiment proving that continual learning can proceed without catastrophic forgetting, not a capability breakthrough. The weights also have not been released — the first round of corpus hasn’t been finished yet, and it will likely take several more weeks; the author’s meaning is to come back to people after this round is done and the numbers are settled. Reading with these two statements in mind is the correct way to approach it: treat it as a controlled experiment done seriously, not a half-baked product.

二、为什么现在值得看

The reason it’s worth watching isn’t how strong the model is, but that it stands on the opposite side of a current paradigm.

The standard way to get a model today is: freeze the base, then stack a thin fine-tuning layer on top — LoRA, adapters, domain continued pre-training — all variations of this idea. The base is a sacred asset that must not be touched; new knowledge is luggage hung on the outside. This route is mature engineering, but it carries a structural cost: the model never truly “grows” — it just accumulates more and more luggage, until at some point the pieces start fighting each other — catastrophic forgetting.

mini-AGI’s answer is to eliminate the boundary between “training” and “use.” Every second the model is alive, it is learning — reading Wikipedia is learning, reading chess games is learning, and chatting with you is learning too. This is conceptually close to how humans work: no one compresses twenty years of reading into some “pre-training phase” and then seals the disk. The cost of achieving this is performing online gradient updates while carrying optimizer states the entire time, which is far more demanding engineering than train-then-freeze, so it has long remained a paper concept — until someone squeezed it into a consumer-grade 8GB GPU. This compression scheme itself is the main attraction of this article.

The reaction on Hacker News also speaks to the project’s temperament. One supporter said that seeing “Mini-AGI” and “8GB VRAM” in the same sentence felt like a breath of fresh air — running a continual learning model locally seems no longer out of reach. Another developer working on continual learning research said they had been struggling because the schemes on hand were all post-hoc remedies, and they were glad to see a system built from the ground up to prevent catastrophic forgetting, worth cloning and reading line by line. Someone else brought the topic to a historical dimension: before personal computers existed, the older generation of experts thought large organizations should tackle artificial intelligence first, but the mainstream route turned out to be a dead end — after compute democratization, edge exploration actually produced new things. The 255 votes are not given to a product but to a contrarian sample that has been seriously engineered.

三、核心技术机制

The entire design was shaped by three hard constraints: it must fit into 8GB of VRAM, must not be quantized, must not forget, and must be able to read any kind of data. No quantization is a hard rule — training requires gradients, and gradients plus optimizer states are roughly three times the weight volume, so weights must live on disk and only the working set resides on the GPU. Being able to read anything dictates byte-level input — no vocabulary means no problem of “encountering unfamiliar data requires expanding the vocabulary and retraining embeddings.”

The architecture is a three-layer structure: two dense prelude blocks plus one loop block, which applies to the same batch of characters up to 24 times. The depth is PonderNet-style adaptive halting: a halting head scores each character at every row, judging whether computing one more row would change the answer — simple characters stop after one row, difficult characters automatically compute more. This turns “compute follows difficulty” from a slogan into a per-character execution strategy.

Routing is a variation of the mixture-of-experts idea: across 26 block applications, each one independently selects its own top-8 experts; the same character can select the same expert repeatedly at different depths. Experts have no human-annotated topics — soft top-k routing spontaneously allocates different capabilities to different experts. Paired with growth and pruning mechanisms — new capacity is added when it’s insufficient, and experts unused for a long time are pruned. The author added a vivid explanation on Hacker News: this is very “organic” — beyond traditional backpropagation, there is a layer of natural selection running in the background, with each new expert having 16 “parents.”

The positional encoding chosen is rotary, with no learned parameters — this directly serves continual learning: the context window doesn’t need reinitialization and can be expanded through continued training. For a model that is always reading new data, this is a necessity rather than an optimization: if the window is fixed via learned position embeddings, expanding it would be equivalent to making the model forget half its coordinate system and start over. Read-write symmetry is another design worth remembering: reading and writing share the same forward pass, but writing is more depth-demanding than reading — averaging about 9.9 rows per character for writing versus about 8.0 for reading — generating a character requires repeated deliberation, while understanding a character is accomplished in one step; this asymmetry lines up well with human experience. The working set is re-selected every 64 characters; greedy decoding is fully deterministic, producing the same sentence when run twice. In an era where everyone talks about randomness, a small model that is willing to write “reproducible” into its design goals is a breath of fresh air.

四、数字与边界

According to the README as of the record: the model has read 318.1M characters and grown 169 experts; the held-out loss across all eight subjects is 0.8336 ± 0.0331 nats/char, equivalent to 1.2026 bits/byte. By subject the differences are large: chess 0.796, stories 0.919, arithmetic 0.948, code 1.066, reasoning 1.145, chat 1.199, chat_hermes 1.699, wikipedia 1.847 — structured, rule-defined data is easy to chew, while open text is hard, and this ordering is consistent with intuition. Notably, the two chat categories differ by nearly 0.5, showing that “chatting like a human” is precisely the most expensive subject for this small model, while rules are cheap.

The measurement itself has noise: expert scheduling on CUDA is non-deterministic, and two runs of the same configuration differ by about 0.014; the author recommends treating 0.03 as the threshold for “real difference.” This honesty in writing error bars into the README deserves explicit praise.

The data scaling table is the one with the most research flavor in the project: loss follows a power law with respect to data volume, exponent -0.239, with R²=0.96 — falling between Kaplan’s 0.095 and Chinchilla’s 0.28. The control group speaks even more clearly about efficiency: MambaByte-353M, at the same parameter scale and similar FLOPs, needed 94x more data to reach a comparable level; Transformer-320M needed 251x more. The author extrapolates from this: reaching 1.00 BPB would require about 0.75B characters and 6 days; reaching 0.80 BPB would require about 1.92B characters and 24 days — all within a single pass of the 7.87B character corpus. The time scale from days to weeks comes from a laptop GPU.

But the limits must be stated plainly: “being able to learn continually” does not equal “being able to generalize.” A skeptic on Hacker News directly asked: can this architecture generalize, or does it rely mainly on memorization? Have basic tasks like doing addition been tried? The author’s answer was unambiguous: the model is too small and undertrained, no generalization claims are made, and benchmarks will be run after the entire corpus is finished. A loss of 1.2 bits/byte is also still far from production-ready. This extrapolation table is an extension of the author’s own experiment, not a promise.

五、怎么跑、谁能玩

The barrier is lower than expected, but there is one hard prerequisite: a CUDA GPU with at least 8GB of VRAM. The reference machine is an RTX 3070 Laptop — a gaming laptop GPU, not laboratory equipment. The software only requires Python 3.10 or above, the code is MIT licensed, and you can clone and start training. No clusters, no queues, no quotas, no cloud bills — how far you train and how much electricity you burn is entirely within your sight.

Three groups can start playing now: graduate students in continual learning — this is a reference implementation that can be run and modified, with all mechanisms in plain sight, at far lower cost than reproducing a paper from scratch; engineers who want to study mixture-of-experts routing and adaptive computation depth — the combination of 26 applications, top-8 routing, and PonderNet halting is decoupled and readable in this codebase, so you can modify one thing and observe one thing; and hardware enthusiasts who simply want to verify “what can 8GB train?” — you can also observe how 169 experts grow from the data themselves.

Two groups should wait: those who want ready-made weights for evaluation — weights are not released, you’ll need to wait for the first round of corpus to finish, expected in several weeks; and those expecting an out-of-the-box product experience — this is research code, not a service, no interface, no API, everything starts from the command line.

六、价值判断与适合谁

Separating research-sample value from productivity value makes the project’s profile clear.

Research-sample value: high. It is a complete engineering sample that squeezes “continual learning without catastrophic forgetting” from a paper concept into 8GB of consumer-grade VRAM. Disk-based weights with working-set paging, rotary encoding with no learned parameters, growth and pruning — every design directly serves the single goal of “learning without downtime,” and it is all open-source and all readable. The scaling table showing the exponent falling between Kaplan and Chinchilla is itself first-hand data worth citing. Anyone doing continual learning or efficient architecture research should read its README once.

Productivity value: currently zero, and the author is on the same page. Weights not released, capability self-rated as toy-level, loss level of 1.2 bits/byte, generalization ability unclaimed — using it for anything today would be neither reliable nor appropriate. Any claim that turns this into an “AGI achievement” is a misreading of the project itself. The name is just a name; what the author has proven is that “continual learning can avoid forgetting,” not that “intelligence has arrived.”

Who it’s for: researchers in continual learning and efficient architectures, developers who want to understand the full engineering implementation of online learning, and observers following the thread of “what can a small VRAM do.”

Who it’s not for: teams looking for ready-made model productivity; people expecting generalization breakthroughs upon training completion — the author explicitly says generalization will be tested after the entire corpus is finished, and until then, every answer about “what it can do” is unfinished.

参考来源

  • GitHub Repository: volotat/mini-AGI (README, LICENSE), as of 2026-09-22
  • Hacker News: Show HN “Mini-AGI – Dynamic continual learning model trained on 8GB VRAM”, story 49783133, 255▲ / 56💬, 2026-09-21
  • README benchmark and scaling tables (318.1M characters / 169 experts, held-out 1.2026 BPB, per-subject bits/byte, power law -0.239, extrapolation table); author’s response to generalization skepticism in HN discussion
广告 · Advertisement

Frequently Asked Questions

What is the fundamental difference between mini-AGI and ordinary large language models?

Ordinary models are frozen after training; new knowledge can only come through fine-tuning patches, and too many patches lead to catastrophic forgetting. mini-AGI eliminates the boundary between "training" and "use": the model reads the character stream in chunks, takes a gradient step for each chunk it reads, and follows the same code path for reading, inference, and learning — never frozen, never graduated. The cost is performing online updates while carrying optimizer states the entire time, which makes the engineering difficulty high, so the fact that the author squeezed it into an 8GB GPU is itself the main attraction.

What is special about its architecture?

Three designs directly serve continual learning: first, PonderNet-style adaptive depth — two dense prelude blocks plus one loop block applied up to 24 times; simple characters stop after one row while difficult characters automatically compute more. Second, each of the 26 block applications independently selects its own top-8 experts; experts have no human-annotated topics, paired with growth and pruning — new experts are added when capacity is insufficient, and unused ones are pruned. Third, rotary positional encoding has no learned parameters, and the context window can be expanded through continued training without reinitialization.

What do the current numbers indicate about how far it has come?

According to the README as of the record: 318.1M characters read, 169 experts, held-out average loss of 1.2026 bits/byte across eight subjects, chess best (0.796), wikipedia worst (1.847). Loss follows a power law with respect to data volume, exponent -0.239, falling between Kaplan's 0.095 and Chinchilla's 0.28; the comparable model at the same scale, MambaByte-353M, needed 94x more data to reach a similar level. But "being able to learn continually" does not mean "being able to generalize": the author explicitly states the model is too small and makes no generalization claims, and this is a toy-level experiment with weights not yet released.