We’re excited to introduce Doc-to-LoRA and Text-to-LoRA, two related research exploring how to make LLM customization faster and more accessible.
https://t.co/ApVzVsBuv1
By training a Hypernetwork to generate LoRA adapters on the fly, these methods allow models to instantly internalize new information or adapt to new tasks.
Biological systems naturally rely on two key cognitive abilities: durable long-term memory to store facts, and rapid adaptation to handle new tasks given limited sensory cues. While modern LLMs are highly capable, they still lack this flexibility. Traditionally, adding long-term memory or adapting an LLM to a specific downstream task requires an expensive and time-consuming model update, such as fine-tuning or context distillation, or relies on memory-intensive long prompts.
To bypass these limitations, our work focuses on the concept of cost amortization. We pay the meta-training cost once to train a hypernetwork capable of producing tasks or document specific LoRAs on demand. This turns what used to be a heavy engineering pipeline into a single, inexpensive forward pass. Instead of performing per-task optimization, the hypernetwork meta-learns update rules to instantly modify an LLM given a new task description or a long document.
In our experiments, Text-to-LoRA successfully specializes models to unseen tasks using just a natural language description. Building on this, Doc-to-LoRA is able to internalize factual documents. On a needle-in-a-haystack task, Doc-to-LoRA achieves near-perfect accuracy on instances five times longer than the base model's context window. It can even generalize to transfer visual information from a vision-language model into a text-only LLM, allowing it to classify images purely through internalized weights.
Importantly, both methods run with sub-second latency, enabling rapid experimentation while avoiding the overhead of traditional model updates. This approach is a step towards lowering the technical barriers of model customization, allowing end-users to specialize foundation models via simple text inputs. We have released our code and papers for the community to explore.
Doc-to-LoRA
Paper: https://t.co/87xEEpf0GN
Code: https://t.co/zBfQi2L9LW
Text-to-LoRA
Paper: https://t.co/emLRZ4Vdvo
Code: https://t.co/b9mrdoWWRB
Survival of the fittest code.
Core War (1984) is a game where programs must crash their opponents to survive. Warriors written in an assembly language called Redcode fight for control of a virtual machine.
Our new paper: Digital Red Queen: Adversarial Program Evolution in Core War with LLMs, explores what happens when LLMs drive an adversarial evolutionary arms race in this domain.
We task LLMs to write Warrior programs in Redcode that must out-compete a virtual world full of such programs. Core War is a Turing-complete environment where code and data share the same address space, which leads to some very chaotic self-modifying code dynamics.
This approach is inspired by the Red Queen hypothesis in evolutionary biology: the principle that species must continually adapt and evolve simply to survive against ever changing competitors. In our work, programs continuously adapt to defeat a growing history of opponents rather than a static benchmark.
We find that this adversarial process leads to the emergence of increasingly general strategies, including targeted self-replication, data bombing, and massive multithreading. Most intriguingly, it reveals a form of convergent evolution. Different code implementations settle into similar high performing behaviors, mirroring how biological agents independently evolve similar traits to solve the same problems.
I think this work positions Core War as a sandbox for studying Red Queen dynamics in artificial systems. It offers a safe controlled environment for analyzing how AI agents might evolve in real world adversarial settings such as cybersecurity.
By simulating these adversarial dynamics in an isolated sandbox, we offer a glimpse into the future where deployed LLM systems may start competing against one another for limited resources in the real world.