Write Once, Run Everywhere: The Axon DSL for Shape-Safe and Framework-Agnostic LLM Architectures

2026-08-23

Authors: Jacob Nielsen, Danial Namazifard, Lukas Galke Poech, Peter Schneider-Kamp

ArXiv: 2608.19889v1

PDF: Download PDF

Imagine if every open-source language model on the planet — Llama, Mistral, Qwen, all of them — depended on a single company's software library to even load. If that library disappeared tomorrow, a huge chunk of the AI ecosystem would grind to a halt. That's roughly the situation today: the vast majority of open models are defined in code that targets one specific Python framework (Hugging Face's transformers), and porting a model to run efficiently on different hardware or in a different training system is a painful, error-prone manual job.

This paper introduces Axon, a small programming language purpose-built for describing neural network architectures — particularly large language models — in a way that isn't chained to any single framework.

The core ideas:

The why matters more than the what. Right now, when a researcher invents a new attention mechanism or a hardware team builds a new accelerator, everyone has to reimplement the same models over and over, and each reimplementation risks subtle bugs that silently degrade quality. Axon tries to break this cycle by making the model architecture a portable, verifiable artifact — closer to a mathematical specification than a piece of PyTorch code.

The key insight is treating model architectures as a compilation problem rather than a scripting problem. Once you have a typed intermediate representation, you unlock the same benefits compilers give traditional software: portability across targets, catch-bugs-at-compile-time safety, and machine-checkable optimizations.

Why it matters: If open-source AI is going to remain genuinely open, model architectures need to escape single-framework lock-in — Axon is a serious attempt to make that happen.

All newsletters