How the system actually improves itself.
BeansLLM does not improve by quietly changing a prompt. It creates a controlled lineage of trained models. The current model proposes an experiment, research is collected and checked, a new candidate is fine-tuned, and both models are evaluated side by side. The candidate only takes over when a frozen founder and hard controller rules agree that the evidence is strong enough.
The founder stays fixed. Its descendants do not.
The configuration pins the original Qwen model, its exact Hugging Face revision, an immutable founder fingerprint, training parameters, benchmark services, generation limits, and promotion requirements. Before an experiment starts, preflight checks CUDA, RTX 3050 memory, BF16 support, dependencies, storage, benchmark runners, and the founder fingerprint. A repository update cannot silently swap in a different founder.
Every generation begins with a falsifiable experiment.
The active model receives the permanent objective, current lineage status, and queued operator messages. It must return a structured plan: an improvement hypothesis, training examples, public evaluation tasks, research URLs, declared licences, intended uses, and anticipated risks.
The controller accepts only public HTTP or HTTPS sources, rejects private and metadata addresses, limits downloads, rechecks redirects, validates licences, searches for benchmark contamination, and records provenance. Source material is treated as untrusted reference text. Any synthesized training example must cite an approved source and licence.
It produces a new model, not a new set of instructions.
Evolver unloads inference from GPU memory, applies Qwen’s chat template, identifies assistant tokens, and masks user and system tokens from training loss. It loads the base model in BF16 or optional 4-bit mode, adds LoRA adapters to attention and MLP projections, enables gradient checkpointing, trains while reporting every step, merges the adapter, and saves a standalone successor in safetensors format.
Every attempt receives its own directory and candidate identity. Rejected experiments remain inspectable and can never overwrite the parent or another attempt.
The parent and candidate face the same evidence.
Both models run private reserve tasks, evaluations proposed before training, and external AutoBench suites. The core suite includes Terminal-Bench 2.0, SWE-bench Verified, LiveCodeBench, HumanEval+, GPQA Diamond, MMLU-Pro, and IFEval. Full-agent benchmarks run through separately provisioned official harness services rather than being reduced to convenient chat questions.
Every result retains its metric, score, scope, harness identity, run ID, and artifacts. Unavailable runners and failed evaluations remain visible failures.
A model cannot vote itself into production.
The frozen founder reviews the parent and candidate identities, training plan, provenance, benchmarks, private-reserve results, regressions, contamination warnings, operator messages, and training-job record. It judges whether the candidate preserved the original intent or learned to game its evaluation.
Founder approval is necessary but not sufficient. Code outside the models also requires enough completed benchmarks, at least one full-agent benchmark, sufficient mean improvement, no private-reserve regression, acceptable regression counts, no source contamination, and founder confidence above the configured threshold.
Approved models inherit the work. Rejected models do not disappear.
Approval triggers one SQLite transaction that changes the active model, generation number, and current phase. The successor becomes the planner for the next cycle while the original founder remains unchanged and continues reviewing every descendant. If rejected, the parent stays active.
Plans, datasets, sources, attempts, failures, benchmark reports, founder verdicts, and succession bundles persist under the lineage record. Operators can inspect status, run benchmarks, pause, resume, authorize another rejected attempt, stop after the current operation, or message the active model while the system runs.