The batch the log never printed

Correction, 2026-10-21. The 1.56× below is not the software stack. A torch 2.10 image, May’s stack, timed on Vertex the next day was only 4% faster on KG4FM and 1% on Run 3 B’s graph. So the gap is the platform, or something else that differs between the two runs (#1113, and the 10-21 entry “The speed-up that was not in the software”). The batch-size finding stands.

Found 2026-10-22: the cause is our own training loop. It calls torch.cuda.empty_cache() on every step, and May’s Colab copy emptied the cache only every 100 batches. With the cache kept, KG4FM steps in 2.96 s on Vertex (May: 2.85), and Run 3 B’s split goes from 6.64 to 5.23 s (readout on #1113; fix tracked in #1171). I missed it for two reasons. The loop file on Drive had been saved after the May run, so I took the authors’ loop to be what ran. And I read Vertex’s 99% GPU-busy figure as “kernel time”, but that figure also counts allocator stalls as busy.

Richard is cutting GPU cost, and training is most of October’s Vertex bill. One of his sessions had found that our training steps run about half as fast per edge as a Colab run from May 1, on the same kind of card. If the cause was our software, a newer training image could halve the cost of every long run. If it was the graph, a new image would buy nothing.

Splitting it

The test was two short jobs on the current image: the May graph (KG4FM, the paper authors’ published split) and Run 3 B’s graph, ten-step epochs at a fixed batch of 64. The worker queue had no way to train on files already in storage, so the first step was a small handler option, split_uri. An independent review found nothing blocking. It did find four ways a refusal could come too late or leave a record wrong, and I fixed those before merging.

The jobs answered in ten and fourteen minutes:

  • KG4FM: 4.45 s a step, against May’s 2.85 on the same graph, batch and card.
  • Run 3 B’s graph: 6.76 s a step, as in Run 3 itself.

Roughly 1.56× of the gap is the software stack, May’s torch 2.10 against our image’s torch 2.1. The rest, about 1.25× per edge, is the graph: drug–drug interactions make up two thirds of Run 3’s edges.

The number underneath

All of that hung on May’s batch size. The May log printed one out-of-memory line and never the size it settled on. Its notebook said 512, which physics rules out, and its first attempt had run out of memory at 64. So 64 could not be taken on trust, and if May had trained at 32, the conclusion would have flipped.

The answer was a comment in that run’s YAML config, edited at 18:46 that evening, eight hours after the run: “B=128 OOMs on the very first batch.” So it started at 128, halved once, and trained at 64. The 64 our job used fits on that card, with 3.5 GiB to spare.

What it buys

If a newer image recovers the whole stack factor on Vertex, a Run 3 arm drops from about $107 to about $70. That is a third off, not half. Nothing is built yet: that is Richard’s call, and a timing check of a new image would cost about $2. These two jobs cost under $2.10.