Verace Biomime: runtime and engine
A C++ tool engine with biologically themed simulations and a Python runtime for compiler-in-the-loop code generation, byte-level training and serving.
- Master tool registry: Looks tools up by name and times each call
- Timed tool call: Returns a result that serialises to JSON
- Domain tool headers: 8 tool classes per domain, mostly fixed text
Overview
The runtime and engine are the execution layer of Verace Biomime. They contain a C++ engine and a Python runtime. The engine defines a plugin interface for tools, a registry that holds tools across 64 domains, and a set of console simulations built on biological metaphors such as telomeres, CRISPR edits and genome shielding. The runtime contains a websocket daemon, a code generation loop that checks its output by compiling it, training and distillation scripts, and mathematical modules. Together they address one question: how an agent should dispatch tools, bound its own execution, and verify the code it generates.
The engine rests on one abstract interface, ITool. Each tool reports name(), domain() and description(), and returns a ToolResult from execute(); ToolResult serialises to JSON. Each domain header declares 8 tool classes. MasterToolRegistry includes every header, stores each instance in a map keyed by name, and dispatches calls uniformly while timing them. On the runtime side, DebuggerLoop generates code, runs it in a sandbox and feeds the parsed errors back to the generator. CUDASymplecticBridge configures the GPU for mixed precision. The kernel service in the runtime is a copy of Verace FastKernel, which has its own page.
Reading the code shows how far each part goes. Most engine tools return hardcoded result strings and fixed latency values. SymplecticMemoryRing in symplectic_memory.hpp has empty methods. The C++ differential transformer and PonderNet demos print preset telemetry and compute no attention or halting. The genome programs manipulate strings and loop counters while printing scripted messages. The runtime holds more working code. Its training scripts for TinyStories, a dataset released by Eldan and Li of Microsoft Research, use GPT-2 BPE tokens, mixed precision, torch.compile and best-perplexity checkpointing, and stop once perplexity falls below 30. A distillation script trains only the byte head on streamed bytes with 30% random corruption.
The registry, the interface, the debugger loop, the daemon, the training and distillation scripts, and the mathematical modules (holographic reduced representations, a continuous 3-SAT relaxation, a Fréchet barycenter on the sphere) are implemented as code. The 6-layer sheaf memory, adaptive halting in C++, and most domain capabilities exist only as tool names, descriptions and canned outputs. The websocket daemon runs its compile loop on hardcoded sample C++ chosen by intent keywords, not on generated code. Dispatch latency and the biological simulations are untested. A benchmark report on the bundled Verace Soliton model code makes its own unverified claims against a 28M TinyStories baseline; the Verace Soliton page covers it.
Status
Prototype. The runtime has runnable Python components and the engine compiles a registry of tool classes, but most tools return canned strings, several C++ modules only print scripted output, and the only benchmark report concerns the bundled Verace Soliton model code.
Simulator
An agent runs sixty tasks whose steps sometimes fail. Choose whether each step is checked, how often a step fails and how long the tasks are.
- pale: worked first time · colour: caught and repeated · white: failed unnoticed · crossed: given up
- Tasks finished correctly
- 60 of 60
- Finished with a hidden error
- 0
- Given up after three tries
- 0
- Extra work spent on retries
- 11%
Turn the check off: the same failures now finish unnoticed. Lengthen the tasks and see how fast unchecked errors add up.
This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.
Architecture
ITool plugin interface
An abstract C++ interface in
tool_base.hppwithname,domain,descriptionandexecute, and aToolResultstruct that serialises to JSON. Every tool class in the engine implements it.Master tool registry
MasterToolRegistryintool_registry.hppincludes all tool headers and registers every tool across 64 domains in a name-keyed map. It provides lookup and timed dispatch.Domain tool headers
Headers that each declare 8
IToolclasses for one numbered domain, for example Domain 3 formal mathematics and SMT, Domain 8 sheaf memory, Domain 15 neuro-symbolic topology, Domain 30 connectome neuroscience and Domain 42 clinical medicine. Theirexecutemethods return fixed text.Biology simulation programs
C++ console programs,
genomic_agi_engine.cpp,peak_genome_restorer.cppandshielded_agi_execution.cpp, that act out a biomimetic agent lifecycle on DNA strings and countdown counters.Debugger loop
DebuggerLoopgenerates code through the agent swarm, runs it in a sandbox, and feeds the parsed errors back until the code passes or the iteration limit is reached.Websocket daemon
An aiohttp server in
websocket_server.pythat serves an HTML interface and a websocket. The websocket runs the compile loop on sample C++ selected by intent keywords.CUDA precision bridge
CUDASymplecticBridgeselects the device, enables TF32 and cudnn benchmarking, creates aGradScalerand supplies an fp16 autocast context for training.TinyStories training scripts
train_tinystories_full.pyandtrain_tinystories_multiepoch.pytrain on TinyStories with GPT-2 BPE tokens, checkpointing on best perplexity.Byte-head distillation scripts
Scripts that freeze the backbone of the omnimodal model and train only its
byte_headon byte targets, then save only those weights. The omnimodal model code they train is a copy of the lab's Verace Soliton model code, which has its own page.
Implementation
Mechanisms as they are implemented in the source code, with the constants the code uses.
- Name-keyed timed dispatch
- Tools are stored polymorphically in a map from name to instance. A call looks the tool up by name, invokes
executewith an argument map, and times the call. The result returns as aToolResultthat can be serialised to JSON. - Canned stub tool results
- Most
executeimplementations return a hardcoded result string and a fixed latency value instead of computing anything. Some echo their arguments into the message, as the Domain 8 memory tools do. The clinical differential diagnosis tool reads a symptoms argument and does not use it. - Telomere bounded execution
- In
genomic_agi_engine.cpp, a countdown budget called the telomere caps the number of agent loop iterations. When it reaches zero, the program yields cleanly in a step it calls apoptosis. The ribosome loop prints scripted messages until then, and a CRISPR step zeroes a node marked as flawed. - Genome degradation and restoration
peak_genome_restorer.cppmarks every 7th and 13th base of a DNA string as degraded and counts a shear counter down. It then reverts degraded T to C and degraded A to G and prints the restored string.- Shielded core execution
shielded_agi_execution.cppsplits a 68-base string into a 28-base shield, a 12-base core and a 28-base shield. It prints that the shields absorb all stress and decrements a telomere counter by 25 per step.- Compiler-in-the-loop repair
- Generated code counts as valid only after it is actually compiled and run. The stderr output is parsed and fed back to the generator for correction, which repeats until success or a maximum iteration count.
- Byte-level denoising distillation
- Inputs are padded byte sequences from streamed text and audio, with about 30% of bytes replaced at random. Only
byte_headis trained to reconstruct the clean bytes, and only its tensors are saved. A related variant derives UTF-8 byte targets from tokenizer round-trips. - Fourier byte text codec
- Text is encoded tokenizer-free as the FFT of a padded byte sequence. A network maps the input spectrum to the output spectrum, trained by mean squared error on prompt and completion pairs, and the output is decoded by inverse FFT.
- Iterative refinement decoding
- Generation starts from random byte noise. The model repeatedly overwrites the unlocked region with its argmax predictions until the sequence stops changing, a pseudo-diffusion decoding loop.
- Adaptive computation time
- In
native_brain.py, learned halting probabilities let a module vary the number of computation steps for each input. The C++topological_pondernet.cpprefers to the same idea but only sleeps and prints preset telemetry. - Differential attention
- In
native_brain.py, a second softmax attention map is weighted by and subtracted from the first to cancel noise: . The C++topological_diff_transformer.cpponly prints this idea and sets noise to 0 and signal to 100. - Holographic reduced representation memory
hrr_memory.pybinds key and value vectors by circular convolution, , and superposes traces in a single vector. Retrieval correlates the trace with a key.- Continuous 3-SAT relaxation
symplectic_sat_solver.pygives each clause the energy , where is the sign of the literal. Gradient descent runs on a bounded continuous field, and the result is rounded by sign. The code treats this as an incomplete heuristic.- Fréchet barycenter on the sphere
frechet_optimizer.pycomputes a geodesic mean by averaging log maps and stepping along the exp map: , iterated.- Perplexity-gated training
train_tinystories_full.pystreams TinyStories, encodes it with GPT-2 tiktoken BPE, and trains with AMP andtorch.compile. It keeps the best-perplexity checkpoint and stops once perplexity falls below 30. The multi-epoch variant accumulates gradients over micro-batches of 8 x 4.- Multi-format knowledge graph rendering
invent_graph.cppemits one list of nodes as an ASCII tree, a DOT digraph and JSON, so that terminals, graph tools and programs can each consume the same graph.
Results
From the lab's own experiments and records. They have not been independently replicated.
Most engine tools return canned output
The lab's reading of the C++ headers found that domain tools return hardcoded result strings and fixed latency values. The registry and dispatch work, but the domain capabilities they name are not computed.
C++ attention and halting demos only print
topological_diff_transformer.cppandtopological_pondernet.cppprint preset values after a sleep and contain no attention computation or adaptive halting network. The working versions of both ideas live in the Python runtime.Symplectic memory ring is an empty shell
symplectic_memory.hppdeclares a winding-number struct, a soliton waveform vector and aSymplecticMemoryRingclass whose methods are empty.Daemon compiles sample code, not generated code
The websocket daemon runs its compiler loop on hardcoded sample C++ chosen by intent keywords. Generation through the swarm is implemented separately in
DebuggerLoop.Biology programs are scripted simulations
The genome engine, restorer and shielding programs manipulate strings and counters and print scripted messages. They implement the telomere bound and simple base substitutions, not a learning agent.
3-SAT relaxation is an incomplete heuristic
The code treats gradient descent on the product-form clause energy, followed by sign rounding, as a heuristic that can fail to find a satisfying assignment.
Concepts
- Tool domain
- A numbered group of 8 related tool classes, such as Domain 3 for formal mathematics and SMT or Domain 37 for clean energy and fusion. The registry spans 64 such domains.
- ToolResult
- The common return type of every tool. It carries the result and timing information and serialises to JSON for callers.
- Stub tool
- A class that satisfies the
IToolinterface but returns fixed text in place of computation. Most engine tools are stubs of this kind. - Telomere budget
- The engine's name for a countdown that limits how many iterations an agent loop may run, by analogy with the shortening ends of chromosomes.
- Apoptosis yield
- The clean termination step taken when the telomere budget is exhausted, named after programmed cell death.
- Genome shielding
- The idea, acted out in
shielded_agi_execution.cpp, that flanking regions of a sequence absorb stress so that a central core is protected. - Compiler in the loop
- A generation method in which a compiler and a sandboxed run act as the verifier, and their errors become the next prompt.
- Byte head
- The output layer of the omnimodal model that predicts raw bytes. The distillation scripts train only this layer and keep the rest frozen.
- Denoising objective
- A training target in which the model reconstructs clean data from a corrupted copy, here bytes with about 30% replaced at random.
- Adaptive computation time
- A technique in which a network learns a halting probability at each step, so different inputs receive different numbers of computation steps. PonderNet is a later formulation of the same idea.
- Differential attention
- Attention computed as the difference of two softmax maps, the second scaled by , so that noise common to both cancels.
- Holographic reduced representation
- A vector symbolic memory in which items are bound by circular convolution and many bindings are summed into one vector, then read back by correlation.
- Continuous SAT relaxation
- A reformulation of Boolean satisfiability as minimisation of a smooth energy over real-valued variables, followed by rounding. It can miss solutions, so it is incomplete.
- Fréchet mean
- The point on a curved space that minimises summed squared geodesic distance to a set of points, the analogue of an average on a manifold.
- Six-layer sheaf memory
- A designed memory hierarchy of sensory, working, episodic, semantic, long-term and procedural layers with a consistency check. In the engine it exists only as Domain 8 tools that echo their arguments.
- Symplectic invariant
- A recurring theme in the tool outputs: preserved phase-space volume, , together with a cohomology condition . These appear as printed claims, not computed checks.
About this page
Written from the lab's own documents and source code. Figures and results are the lab's measurements as it recorded them at the time, and have not been independently replicated.
Published under the PolyForm Noncommercial License 1.0.0: free for noncommercial use.