Reading together, without a keyword
Some connections between documents can be searched for. Others can't, because nobody could name the word. We find them with a cheap judge that asks one open question of a thousand pairs, and compare with an agent that searches.
1The data
One person's app log: 2,637 entries over 15 months, from 16 apps. Each square is one entry, one block per month. The person is user 002 of DynamicMem, a synthetic benchmark persona: a product designer in Amsterdam. Click an app to see where it sits and what an entry looks like.
2The task
Given one entry, find what in the rest of the log, read together with it, reveals something worth acting on. Here the something is a gift:
3What we found
We started from an evening chat on 6 November 2024 where the person asks an AI to render imaginary glass and ice. Our method returned 30 partner entries. Read together, they fall into three groups, each group says one thing, and the three combine into one idea. Click any dot or box to read what is behind it.
4How we did it
A keyword search can't do this: 10 of these 30 entries share no word with the anchor. Instead we name what we want and ask it of every pair. The OpenAI Decisions API answers a yes/no question about a pair with a probability, for about seven cents per thousand pairs, so we fill the question's blank with 1,000 random entries and read only the 30 that score highest.
The exact request, sent fifty times with twenty partners each:
5How grep did it
We gave the same anchor and task to a Claude Opus 5.5 agent with the whole log as files and only Read, Grep and Glob. It made 27 tool calls in two and a half minutes. Routine steps are folded; the entries that mattered are shown with the line it used highlighted.
6What each route used, across the year
7What's different
8Memory for a kernel agent
W4A8 dp4a integration passes correctness in the fused decode kernel
Memory summary
The agent integrated a W4A8 path into the existing one-launch Triton megakernel. It quantizes activations in 128-element groups, packs int8 values, and uses dp4a to accumulate against reordered int4 weights. The correctness check passed for seeds 0–2; the lowest reported hidden cosine was 0.9941, and KDA state and MLA cache cosine were 1.0000. The official score stayed at 15.8653 through this unit.
Relevant prior context
The run already had a correct fused W4A16 megakernel with a 15.8653× official speedup, but its weight-stream bandwidth was the main performance concern. Earlier dp4a measurements were noisy under GPU contention. An interleaved sweep in the preceding unit gave a clearer comparison, motivating this integration:
dp4a at 4 warps/NT=512 gives 906 GB/s vs 451 for the production loop (88% of the 1023 load-only ceiling).
Important non-obvious context
The task described an RTX PRO 6000, but the run’s GPU probe found an H100 PCIe with 114 SMs. The benchmark’s peak_fraction field is a speedup multiple over baseline.py, not a hardware-roofline fraction. The required timed path remains a single custom kernel launch per decode step; weight packing and arena construction happen on the host during model setup.
The dp4a path depends on a specific weight layout. The agent reordered nibble slots so each four-byte mask holds nibbles for four consecutive contraction elements. This lets each masked weight word pair with one packed int32 activation word in a dp4a instruction. Each activation group stores both its quantization scale and the sum of its quantized values, which the GEMV epilogue uses for zero-point correction.
Recording summary
The agent chose NT=512 for the megakernel despite the standalone sweep’s stronger NT=1024 result. At width 1024, output projections with 2304 columns pad to 3072, adding 33% wasted work; the existing width 512 pads to 2560, adding about 11%. The agent also expected the larger tile to increase register and shared-memory pressure. It retained four warps and ILV=1 for the integrated path.
The main GEMV changed from per-nibble fp32 conversion and accumulation to groupwise int8 activation quantization and integer accumulation. For each group of 128 activations, _quant computes xs = max(abs(x))/127, rounds x/xs to int8, packs four values per int32 word, and records the sum of the quantized values. The GEMV uses two dp4a operations per eight weight nibbles, then applies activation scale, weight scale, and zero-point correction:
sum_k (v-z)*s*x == s*xs*(sum_k v*xq - z*sum_k xq)
Host-side repacking changed the nibble order to [0, 2, 4, 6, 1, 3, 5, 7], aligning the low and high nibble masks with separate groups of four consecutive int8 activations. The same order was applied to the specialized MLA kv_b packers.
The agent added quantization at the KDA and MLA projection inputs, the KDA output projection, and the MoE gate/up and down paths. Each silu-up task already produces exactly 128 hidden values, so it quantizes that group once into shared scratch for the down projection instead of having every persistent CTA repeat the work. The per-group scale/sum pairs use a stride of eight floats so concurrent writers land in separate 32-byte sectors; the private quantization scratch uses the same stride.
The MLA absorbed-query path also needed dp4a. It quantizes the transformed query, runs the small GEMV, then applies its scale and the zero-point correction computed from the unquantized query values. For the MLA kv_b value projection, the agent quantizes each of four 128-element chunks and applies each chunk’s scale and quantized-value sum in the epilogue.
The host-side scale arenas were updated for the new formula: the MLA nope scale is stored as s, and its correction term as s*z, rather than the previous s/8 and s*(16+z) representation. The GEMV helper now returns integer accumulators, with scaling and correction deferred to the epilogue.
The unit ended with this correctness output:
seed 0 ctx 2048: out=0.9941 S=1.0000 cache=1.0000 OK seed 0 ctx 8192: out=0.9941 S=1.0000 cache=1.0000 OK seed 1 ctx 2048: out=0.9994 S=1.0000 cache=1.0000 OK seed 1 ctx 8192: out=0.9994 S=1.0000 cache=1.0000 OK seed 2 ctx 2048: out=0.9995 S=1.0000 cache=1.0000 OK seed 2 ctx 8192: out=0.9995 S=1.0000 cache=1.0000 OK PASS
No official benchmark was run in this unit, so the score remained 15.8653. The minimum reported hidden cosine is only 0.0141 above the 0.98 threshold; follow-up benchmarking should preserve correctness checks across contexts and seeds, especially after further numerical or scheduling changes.
Hindsight (written after the run; not known at the time)
- Fate: kept_modified. The final audited solution uses W4A8 dp4a GEMVs and the audit reports output cosine 0.9941 against the 0.98 threshold.
- Contribution: Introduced the main quantized-GEMV speedup path; correctness passed, though score stayed 15.8653 in this unit.
- Audit: relevant: the audit explicitly reviews the W4A8 precision tradeoff and deems it within tolerance.
- Takeaway: Quantizing activations to int8 held up as a legal speed optimization. The final audit confirms state cosines of 1.0000 and output cosine above threshold.
Sections 1 to 7 searched one person's app log. The same idea works on a very different kind of memory: notes on what earlier AI agents did while optimizing GPU kernels, read by a new agent about to do the same job.
The task is 02_kimi_linear_decode from KernelBench-mega. Each agent is Codex running GPT-6.1 Sol, with one H100 and one
hour, starting from scratch. Its score is how many times faster its kernel runs than the benchmark's PyTorch reference.
Can notes from earlier attempts help it write a faster kernel, and does it matter how it gets to them?
What earlier agents left behind
KernelBench publishes the full trajectories of agents working on its tasks. We had an LLM cut 823 of them into stretches, each ending where the agent got a test or benchmark result back, and write one note per stretch: what the agent tried, what it measured, and whether the change survived to the end of the run. Each run also gets a note on its final solution. That makes 33,192 notes, filed by hardware, task and model. Nobody curated them; it is simply a dump of files.
Browse it below and click a note to read it. Every H100 run of 02_kimi_linear_decode is here in full, with one sample run for each other hardware and task.
How the memory reaches the next agent
We compare two ways of handing this memory to an agent, files only and our method, and run each as a loop. In round 0, three agents work with no memory. In rounds 1, 2 and 3, each method starts three new agents from scratch, one per lineage, and each learns from the previous run in its lineage. Every finished run is cut into notes the same way and added to that method's memory (round 0 goes to both).
The diagram shows one step of the loop and where the two methods part ways.
With files only, the next agent gets the whole memory as files and searches it however it likes. Our method does the reading for it, as in the earlier sections: it takes a moment from the previous run and reads every note against it, asking whether the two together suggest something that neither suggests alone. For kernels the question is would reading this note next to that moment suggest a concrete way to make the kernel faster, a useful direction to explore, or a way past the problem? Each run gives five moments, picked where the agent stalled or hit a limit, and each is scored against 5,000 sampled notes plus the notes from earlier rounds. A reader agent then has ten minutes to turn the top 30 for each moment into a one-page brief.
Results
- Both kinds of memory beat no memory. Over rounds 1 to 3, our method averaged 28.7× and files only 27.2×, against 24.0× without memory.
- The best run reached 36.3×, about 1.5 times the best public H100 run (24.29×), which is itself in the memory.
Where the two fastest kernels came from
The two fastest kernels, 34.0× and 36.3×, share a trick that none of the other 19 use, and both came from
our method. The trick is DP4A. This task stores its weights as 4-bit integers, and most agents convert them to
bf16 before multiplying. DP4A goes the other way: it rounds the activations to 8-bit integers too and multiplies integer by
integer with __dp4a, a GPU instruction that does four 8-bit multiply-adds at once. The arithmetic per weight
drops, at a small loss of precision that stays within the benchmark's tolerance.
The first one started from a stuck point in round 0. This is what our method did with it:
wider loads improve the paired measurement by about 0.8%… Shared activations are slower.
The reader put DP4A first in its brief: Prototype groupwise DP4A GEMVs early.
The round-1 agent started on it
8% of the way into its hour and finished at 34.0×, the best result at that point.
The second DP4A kernel came in round 3, from another lineage with different stuck points. Its brief also opened with DP4A, this time drawing on two other notes, an H100 microbenchmark of an int8 dot-product GEMV and a B200 run whose final kernel used DP4A, and it kept an exact bf16 path as a fallback in case accuracy slipped. That agent reached 36.3×, the best kernel in the experiment.
Why files only never reached it
The note behind the first DP4A kernel was in the files-only memory too. None of the nine files-only agents read it, for two reasons: they looked for finished solutions, and the note does not look like one.
They read the ends of runs
Each earlier agent's run is one file in the memory, with its notes in order. The strip below is the best earlier attempt at this task (24.29×), one bar per note. The files-only agents read its final write-up. The note our method picked sits in the middle, where that agent measured DP4A. Read it.
They did the same everywhere. Their searches asked for finished code and scores (class Model,
__global__, Final solution), mostly in the logs of earlier attempts in this experiment. What our
method hands over looks very different:
Two files-only agents even searched for the word dp4a and still never saw the note, because each
search looked inside only one file. A search like this only reads the files you name. Both named a single log from an
earlier agent in this experiment, the file they were already reading for code. The note was in a different file, so it
could not come up. This is one of the two searches, as the agent typed it:
$ rg -an'bf162|lop3|prmt|native|gemv|dequant|prefetch|uint4|v43|dp4a|__hmul2|asm volatile'memory/docs/loop-g1_files_3.txt| tail -65The other search had the same shape, a list of words with dp4a among them, pointed at one log file. It came back with no line about dp4a.
The useful notes don't look useful
The two briefs that led with DP4A drew on three notes. Judged by their titles, none of them is about making this kernel faster:
What ties the first note to the stuck agent is the problem, not the answer: both were limited by how fast the kernel could stream its weights. Our method reads each note against the moment the agent got stuck, so that link shows up. A search for finished solutions never sees it.
Additional baseline: identify bottlenecks, then search the file-system memory
Is it enough to start from the stuck points? This baseline keeps everything in our method except the scoring. The same picker chooses five stuck points in the previous run (in round 1, the exact same fifteen our method used). Then an agent gets those stuck points and the file-system memory the files-only agents had, and has twenty minutes to search it with grep for notes that would help with each one. It writes the same one-page brief, and the next agent gets the brief and the notes it picked.
- Round 1 was a draw: 29.3× against our method's 28.6×, from identical stuck points.
- Then it fell every round, to 26.1× and 23.0× (mean 26.1× over rounds 1 to 3). Its later briefs aimed to reproduce its own round-1 kernel, so the lineages kept rebuilding the same design.
- None of its nine kernels uses DP4A. All three round-1 searchers found the DP4A note and listed it, but no brief led with it.
The searchers did start from the stuck points: they read them first, and their greps used the stuck points' own words. But a grep needs a word to look for, and those words belong to this task. For the same round-1 stuck points, the two methods picked almost entirely different notes (11 in common), and only ours reached into other tasks:
These nine runs went a day after the rest of the experiment, on whichever H100s the queue gave them.
A second task: a W4A16 matrix multiply
We ran the same loop on 07_w4a16_gemm from KernelBench-hard, a matrix multiply with 4-bit weights over five
shapes, with all three methods from the start. The score is the share of the H100's memory bandwidth the kernel achieves
(measured against the 2.0 TB/s of the H100 PCIe that the benchmark is set up for).
- Our method rose every round, and its three round-3 runs, 0.468, 0.462 and 0.461, are the best in this experiment.
- Its dip in round 1 is one run (0.20) that lost much of its hour to the model being at capacity.
What helped: the time around the kernel
By round 2 every method ended up with much the same kernel. What set our method apart was everything around it. The benchmark starts its clock and then calls the model from Python, and most calls take only 15 to 60 µs on the GPU, so a few microseconds of Python and launch work in between is a real share of the score. Skipping PyTorch's per-call bookkeeping and replaying the whole call as one CUDA graph go after exactly this. All 6 of our method's kernels from rounds 2 and 3 do both, against 2 of 6 for filesystem only and 0 of 4 for bottleneck + filesystem.
The useful notes don't look useful
The evidence sat in the middle of the best public H100 run of this task, 158 notes long. Note 38 is titled Measuring Python overhead inside the W4A16 benchmark window. It changed no code and the run's score stayed at 0.156, but it measured the Python path at 8 to 11 µs a call. Note 72 found that replaying the call as a CUDA graph made the kernel 7.4% faster. Our method linked note 38 to a stuck moment about a CUTLASS kernel running short of registers, which says nothing about Python. The brief passed the number on, and the next agent stripped the overhead a quarter of the way into its hour.
Why filesystem only didn't reach them
The same habit as in the first task. Three filesystem-only agents opened this run's file, and all of them searched
it for finished code (Final solution, __global__, code blocks) and kept the end of what came back. That showed them only its last
13 notes, the end of the run. Notes 38 and 72 never came up for any of the 9 agents, whose reading went mostly
to the logs of their own earlier rounds.
Bottleneck + filesystem did find note 72 in round 1, from the same stuck moments. Its later briefs dropped it, and none of its later kernels replays a graph.
9Scientific discovery
In an app log, almost any two entries can be read together in some way. Research papers are a harder test: most pairs have nothing to say to each other. We ran the same pipeline on two collections, 16,615 biology preprints from bioRxiv and 719 research-mathematics manuscripts (openai/math). One connection from each is below, with the documents it was built from.
Biology: a cause in one paper, a measurement in the other
bioRxiv is where biologists post work before peer review. We took every preprint first posted between July and mid-October 2026, which is after the models' training cutoff, so nothing here could be remembered rather than found. The judge read 1,000 other preprints against each of ten recent ones; a reader then received each top 30 with no scores and no ranks, and looked for links inside it. This one joins two preprints from different fields.
Nobody has tied m6A to this choice before. The neighbouring gene is already published with the same enzyme, though, so this is the next step in an active programme rather than a leap.
Three more leads, read against the full abstracts
A later round started from 20 preprints and scored 5,000 partners against each, so a top 30 is the top 0.6% of the pool. Twenty readers returned 136 leads. We took the three that looked strongest and checked each one against every abstract it cites, in full, rather than against the reader's own summary. One survived that reading.
Of eight leads checked in that round, three looked unaddressed, two assembled known pieces into something not written down, and three restated work already published. Reading the three closely left one standing with a broken arm, one narrow experiment, and one mistake of ours. Nothing here has been verified as new, and "nobody seems to have asked this" is a much weaker claim than "this is new".
Mathematics: a chain through three papers
The corpus here is openai/math, 719 manuscripts written by an OpenAI model on open research problems in mathematics and released as a repository. These three are papers on C*-algebras, the mathematical objects used to describe quantum systems. The judge read 5,000 passages against each anchor; a reader then got the top 100 in full.
Two notions appear in all three. A quasitrace is a consistent way of assigning a size between 0 and 1 to the parts of an algebra. An algebra is properly infinite if it contains two non-overlapping copies of itself.
In both examples the link is written in none of the documents, and in section 3 the shared material was not either. A keyword search can bring the documents up. It cannot surface a link that none of them states.
Data: DynamicMem user 002 (synthetic, MIT). Judge: OpenAI Decisions (gpt-6-luna) through the AI Sandbox,
1,000 partners per anchor. The groups, conclusions and our idea were written by Claude Opus 5.5 after reading the 31
entries; the grep agent is one claude -p session (Opus 5.5, Read/Grep/Glob). "Uses the anchor's words" means
the person's own text contains glass, ice, frost, Octane, 20mm, permafrost or crystal.
Section 8: stuck points picked by GPT-6.1 Sol (high); notes scored by OpenAI Decisions (gpt-6-luna,
AI Sandbox), 5,000 sampled notes plus every earlier-round note per stuck point; briefs by a 10-minute GPT-6.1 Sol reader
from the five top-30 lists. All 21 final kernels pass check.py and make one kernel launch and no copies per
step. Trajectory counts come from the agents' shell commands. Keyword search: BM25 (k1 = 1.2, b = 0.75) over the same 5,000 sampled notes, querying with the stuck agent's own messages from that stretch. A note counts as opened by a files-only agent when at least 30% of its distinctive lines (lines found in no other note) appear in the output of that agent's memory commands; one such line alone counts as a grep hit. Grep terms are counted per agent, over grep and rg commands on the memory. Run folder:
experiments/explore_agents/runs/kb_loop_h100_sol61_60min_2026-10-16_144513.
Section 9, mathematics: 127,584 passages from the 719 manuscripts of
openai/math (Apache‑2.0, commit fd4aeeb). The three
papers are A counterexample to Kaplansky's quasitrace conjecture and failure of tensor‑product stable
finiteness, The Kirchberg–Rørdam character criterion and Weak pure infiniteness and
O‑infinity absorption; the first two carry Lean formalizations in that repository. Mathematics: 5,000 partners
judged per anchor and one claude -p reader (Opus 5.5) given the top 100 partners in full and the
corpus as files.
Section 9, biology: the abstracts of the 16,615 bioRxiv preprints first posted 2026-07-01 to
2026-10-15, fetched from the bioRxiv API. Ten anchors were picked from 90 random abstracts posted on or after
2026-09-15; per anchor, 1,000 partners drawn from the rest of the corpus were scored by the judge. One
claude -p reader (Opus 5.5, no tools) per anchor then received the anchor and its top 30 in
snippet-id order, with no anchor label, no scores and no ranks, and proposed leads from any pair it chose; the ten
readers returned 67. For the lead shown, the anchor was A false sense of circularity: hidden variability in RNase R
enzymes confounds reliable circRNA validation, and the two preprints ranked 5th and 26th of its 1,000. The eight
most specific leads were then checked with web searches; the one shown is the lead that survived as unaddressed, and the
second-pass search that found the CDKN2B work is the correction described above. Quotations are cut verbatim from
the passages.