clj-bdh: a Clojure port of the Baby Dragon Hatchling model
A Clojure port of Pathway's brain-inspired "Baby Dragon Hatchling" language-model architecture, where the model is a plain function over a map of tensors and every run is tracked end-to-end.
What it proves
That a novel brain-inspired language-model architecture. Pathway's "Baby Dragon Hatchling" (BDH) — can be run and studied in Clojure, expressed as a plain function over plain data and tracked from weights to evaluation, without leaving the reference model's behaviour behind.
Built with
Clojure · libpython-clj2 · PyTorch
clj-bdh is a friendly companion port. The architecture it runs: the “Baby Dragon Hatchling” (BDH), a brain-inspired language-model design, is the work of Pathway, published as arXiv:2509.26507, with a reference implementation in Python. clj-bdh takes that reference and asks a narrow question: what does this model look like, and how does it behave, when it is expressed in Clojure and tracked end-to-end? The credit for the model and the paper belongs to Pathway; this is a study of their architecture, not a claim to it.
What it is
An MIT-licensed project (© Flexiana s.r.o.) that ports Pathway’s BDH reference implementation to Clojure. In the port, the model becomes what Clojure makes natural: a plain function over a plain map of tensors. There is no hidden object graph: the forward pass is a function, its parameters are data, and both are inspectable at the REPL.
Crucially, the port keeps faith with the reference. Its .pt checkpoints are byte-compatible with
the Python original, so weights swap freely in both directions, you can load a checkpoint trained by
the reference into the Clojure port and back again. That compatibility makes it a study
rather than a look-alike: the two implementations are talking about the same weights.
Why it lives here
clj-bdh is the first downstream consumer of chachaml. Each run, checkpoint and evaluation is automatically tracked, which makes the port double as a working proof that our Clojure-native MLOps layer holds up against a moving research workload rather than a toy. Porting an unfamiliar architecture is exactly the situation where tracking earns its keep, and dogfooding it here is part of the point.
Its boundary
The evidence status is reproduced, and the scope is deliberately modest. clj-bdh is early and a Clojure re-expression. The tensor operations run on PyTorch via libpython-clj2. Clojure expresses and orchestrates the computation, but the numerics are the established backend, not a rewrite. And it is a port of others’ research: the architecture is Pathway’s, the contribution here is the Clojure re-expression and the end-to-end tracking. Presented as a study and a dogfood of chachaml, it is honest about being a companion to someone else’s model rather than a model of our own.
Method disclosure
The method is published.
A port built to test a method in the open; nothing here is proprietary.
We publish selectively and say which. Open-source, academic and pro bono work is published in full. Where the mechanism is the commercial asset we publish the result, the evidence grade and the boundary, and state that the mechanism is withheld, and never write around the gap.
Limitations & novelty boundary
Tensor operations run on PyTorch through libpython-clj2, so this is a Clojure re-expression of the computation rather than a from-scratch numerical stack. It is a port of others' research, Pathway's BDH, presented as a study of that architecture and a dogfooding of chachaml, not an original model of ours.