Much of ancient Greek literature has survived in a fragmented and often damaged state, whether due to centuries of manuscript-copying errors or the physical deterioration of texts originally written on papyri, stone tablets, or shards of pottery. Traditionally, restoring these lost or corrupted segments has relied on the specialized knowledge of Classical philologists. Recent advances in machine learning, however, make it possible to train language models on the corpus of extant Greek texts to propose plausible restorations in uncertain situations, thereby significantly aiding philological and textual scholarship (Assael, Sommerschield, & Prag, 2022 on inscriptions).
In a recently concluded NAISS Small Compute project, I successfully instruction-tuned a large pretrained causal language model (Meta’s Llama 3.1 8B) to restore missing or illegible text in ancient Greek inscriptions and documentary papyri. This approach surpassed the previous state of the art for inscriptions that used a specialized model trained from scratch. The model for papyri was the first of its kind. The instruction-tuned LLM not only offers higher restoration accuracy but also handles the challenge of scriptio continua seamlessly.
Now an even more demanding area remains: the restoration of literary ancient Greek texts, which are less formulaic and involve greater stylistic complexity. For authors such as the Athenian tragedians, any textual restoration must be both linguistically and contextually plausible, while also conforming to specific criteria such as metrical schemes (e.g., iambic trimeter, trochaic, anapestic), poetic norms (diction, register, formulaic patterns), and each author’s unique style. Achieving these additional constraints will require further pretraining of LLMs on macronized Greek, along with more specialized inference routines. Moreover, exploring the capacity of larger language models in the 70B-parameter range and above could yield even better performance thanks to their broader linguistic competence.
In this project, I propose fine-tuning Meta’s Llama-3.3-70B and Qwen2.5-72B (and similar open models released over the course of the project) to fill in gaps in literary Greek texts. I will also develop a filtering system to discard metrically untenable or stylistically inappropriate suggestions, in the latter case developing a Modern-Greek-BERT-based classifier (Warner et al., 2024) trained on the preserved works of Aeschylus, Sophocles, and Euripides. This approach has the potential to improve the fidelity and accuracy of computational textual restorations of tragic fragments, while also providing general tools of benefit for metrical analysis and for attributing adespota to known authors.