In August I wrote a post about the Vesuvius Challenge, the open research effort to read the carbonised scrolls from the Villa dei Papiri at Herculaneum without opening them, and said I intended to contribute (Reading a Library No One Can Open). My new machine, a MacBook Pro with an M5 Max chip and 128GB of memory, arrived last week, and this post is an account of what happened when I started working on real scroll data. It covers what went to plan, what didn’t, and what I learned about joining an established open-source research project. Warning: Nerd talk ahead!

The plan meets the project

My August plan was to work on mesh topology repair: finding and fixing the places where a traced papyrus surface develops holes or slides onto the neighbouring layer of the scroll. Between August and October, other contributors received several prizes for exactly that work. A new tool from me would have duplicated theirs, so I scrapped it.

The second plan was to build the project’s segmentation tool, VC3D, natively for the Mac. That had also already been done, in May, and the project now ships a ready-made Apple Silicon installer. Scrapped that too!

The lesson I took from both was to check what has changed upstream in the last month before deciding what to build. It is now the first step of every piece of work I do on the project.

A first pull request

Building the previous toolchain did turn up one genuine problem. The Python bindings for VC3D’s core library would not load on a Mac, because the build told them to look for their libraries using a convention that only Linux understands. VC3D is a specialized, open-source software application for virtual unwrapping, surface tracing, and segmenting papyrus sheets from 3D CT scans of carbonized Herculaneum scrolls. My fix was a small change to the build configuration, tested on real scroll data before and after.

It was my first pull request to any public repository, after thirty years of writing software mostly for clients and for myself. The project’s contributing guide has a section on AI-assisted work: it welcomes it, provided a person working on real scroll data stands behind the change, writes the explanation themselves and has reviewed the code. I used Claude Code for the builds, tests and drafting, and wrote and checked the parts that carried my name.

Testing someone else’s port, and finding a bug

The project’s main tool for unrolling a whole scroll is the spiral fitter. It models the scroll as one sheet wound in a spiral and fits that model to everything known about the scan. It was written for NVIDIA graphics cards. A contributor, AndreasHad04, had opened a pull request porting it to Apple Silicon (villa #1925), tested on a small region with a reduced set of inputs. With 128GB of memory, I could test it on much larger regions with the full inputs: verified surface patches, surface normals and papyrus fibres.

Every run completed. But from about 4,000 slices upwards, the fitter on the Mac’s GPU silently discarded hundreds to thousands of verified patches that the same fit on the CPU kept. One run crashed with an index of 191 million into a table of 33,216 entries.

The cause was a single setting on four data copies. When the code copies data to the GPU with non_blocking=True, the copy can still be in progress when the program frees the memory it is copying from. On NVIDIA hardware the copy is effectively finished by then. On the Mac, the GPU could read whatever had overwritten the freed memory. A 20-line script reproduced it 20 times out of 20 with the setting and 0 times without it. Below about 4,000 slices the data fits in a single upload batch, which is why small tests never saw it.

I posted the findings and a small fix to those four copies on the pull request in GitHub. AndreasHad04 reproduced the bug independently on his own Mac (between 40 and 42 million of 63 million vertices came back wrong, and none after the fix), traced it to a known PyTorch bug (pytorch #189690) that newer versions of PyTorch avoid, added a test, and took the fix into his pull request with me as co-author.

How far one laptop can go

With the fix in place, these are the measurements on PHercParis4, one of the scrolls with published fitting inputs, at 401 optimiser steps:

SlicesTime per stepTotal timeGPU memory peakTotal memory peak
1,0000.32 s2.7 min12.3 GiB21.0 GiB
2,0000.50 s4.5 min18.7 GiB31.5 GiB
4,0000.87 s9.3 min32.5 GiB56.9 GiB
8,0001.87 s20.8 min73.7 GiB114.4 GiB
13,00014.85 s111 min155.5 GiB204.6 GiB

At 1,000 slices the Mac’s GPU is 2.74 times faster than its CPU. The full 13,000-slice region, the whole written part of the scroll, does finish, but only by swapping to disk, so about 8,000 slices is the practical limit on 128GB. The scripts, results and fix are public in spiral-mac-bench, and one command reproduces the whole set of runs.

Looking inside the scroll

The most enjoyable part of the week used my film background more than my programming. Santiago Pelufo maintains Velend, an extension that brings the scans into Blender, the 3D software I know from visual effects work. It streams the scan from the project’s public data and draws it on cutting planes that you can move through the scroll.

The opening image of this post is PHerc. 1447, a scroll that has never been opened, rendered on Velend’s cutting planes. The scanned volume is 8,343 by 8,343 by 24,297 voxels at 8.64 micrometres each, a block about 7 centimetres across and 21 centimetres tall with the scroll inside it.

The scroll with Velend's level colours turned on: red where the scan is loaded at full resolution, through orange, yellow, green and blue, to purple at the coarsest level
The scroll with Velend's level colours turned on: red where the scan is loaded at full resolution, through orange, yellow, green and blue, to purple at the coarsest level

Velend only loads full detail near the point you are looking at, and progressively coarser data further away, which is what lets a laptop explore a volume of this size. Turning on its level colours shows this directly: red is full resolution, purple the coarsest.

Velend can also import segments, the traced surfaces that follow one layer of papyrus through the scroll. The outlined shape below is one published segment of PHerc. 1447, sitting inside the scroll where it was traced.

The same scroll with one traced segment, outlined in orange, sitting on a layer inside the scan
The same scroll with one traced segment, outlined in orange, sitting on a layer inside the scan

Close up, the segment shows the structure of the papyrus itself: the horizontal and vertical fibres of the two layers of plant stem that papyrus is made from, and cracks and gaps from two thousand years of compression. The grey rectangles are places where the tracing software was not confident enough to continue.

A close view of the traced segment surface, showing the crossed papyrus fibres, cracks and gaps
A close view of the traced segment surface, showing the crossed papyrus fibres, cracks and gaps

The project’s data licence does not allow publishing any newly revealed text outside its own community, so these images show the structure of the papyrus rather than writing. Reading the ink requires further machine-learning models and review by papyrologists, and is not something these views show.

A dead end worth recording

I also spent an afternoon scoping a standalone tool to detect sheet switches, the places where a traced surface slides onto the wrong layer. It was a clear no. There is no set of confirmed examples to test against, my prototype raised far more false alarms than real finds, and a maintainer had recently asked contributors, and specifically AI assistants, to stop concentrating on that problem. I mention it because the project runs on documented dead ends, and because it repeated the lesson above about checking the current state of the project first.

What I learned

The things that made a difference in the first week were not the ones I expected. The 128GB of memory mattered, but the useful contribution came from running someone else’s work on real data at a larger scale than they could, and checking the result against a second device rather than trusting that it finished. The community is open about AI-assisted work as long as a person takes responsibility for it, and it is relaxed about overlap: one experienced contributor told another that duplicated effort doesn’t matter until someone has something that works very well. And reading the last month of activity on a project is worth more than any amount of planning from outside it.

What’s next

Next I want to send Santiago Pelufo some feedback on Velend from a week of real use, and keep testing the Apple Silicon work as it is reviewed. Whatever I find, including the dead ends, I’ll write up here.

Credits

  • The Vesuvius Challenge and its contributors, for the open data, the villa codebase and the spiral fitter.
  • AndreasHad04, for the Apple Silicon port of the spiral fitter (villa #1925), and for reproducing and adopting the fix.
  • Santiago Pelufo, for Velend.
  • Data: the scan images of PHerc. 1447 and the PHercParis4 fitting inputs are Vesuvius Challenge open data, used under the project’s data licence. PHercParis4 is Scroll 1 of the EduceLab-Scrolls dataset. Data used in the preparation of this work were obtained from the EduceLab-Scrolls dataset (Parsons et al., 2023).

References

Angelotti, G., Parsons, S., Johnson, S., Dal Prà, E.R., Rudolph, J., Tafforeau, P., Mirone, A., Henderson, P., Schilling, H., McDonald, F., Josey, D., Nader, Y., Parker, C.S. and Seales, W.B. Vesuvius Challenge: CT Scans of Herculaneum Papyri. Vesuvius Challenge. Available at: https://scrollprize.org/data.

Parsons, S., Parker, C.S., Chapman, C., Hayashida, M. and Seales, W.B. (2023) ‘EduceLab-Scrolls: verifiable recovery of text from Herculaneum papyri using X-ray CT’, arXiv preprint arXiv:2304.02084.

PyTorch (2026) ‘[MPS] non_blocking CPU-to-MPS copy can read released source storage and silently corrupt data’, issue #189690. Available at: GitHub.

Vesuvius Challenge (2026) ‘Open problems: why reading every Herculaneum scroll is still a challenge’. Available at: scrollprize.org (Accessed: 6 October 2026).