This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Every developer has a graveyard: the side project whose last commit says wip, the library that was cool in 2014, the API that got sunset with a polite blog post.
On DΓa de los Muertos, Mexican tradition has a beautiful way to talk about death without being sad: calaveras literarias, short, funny rhyming poems where La Catrina (Death) comes to take someone away. They tease, but with affection.
Calaveras for Dead Code is a tiny ofrenda for software. You type the name of the departed code and one line about what it did in life, and a small open-weight language model, running entirely inside your browser tab, writes it a calavera and lays it on the ofrenda with candles, marigolds and pan de muerto.
It's for every developer who wants to say goodbye to Flash, left-pad, jQuery UI, or that todo app they swore they'd finish.
Demo
π Live: https://asosa933.github.io/calaveras-for-dead-code/
The first visit downloads the model (~500 MB, cached afterwards). Then it works with Wi-Fi off.
In software creation,
Eleven lines that padded strings,
Never lost sight of the good old times,
And npm's promise.
Always ready to pad your string.written locally in ~30 s by Qwen2.5-0.5B on a CPU-only machine
Code
asosa933
/
calaveras-for-dead-code
DΓa de los Muertos ofrenda for dead software: an open-weight model writes calaveras literarias entirely in your browser (Transformers.js + Qwen2.5-0.5B)
π Calaveras for Dead Code πΌ
A DΓa de los Muertos ofrenda for abandoned software. Type the name of a dead project, deprecated API or forgotten side project, and a small open-weight model running entirely in your browser writes it a calavera literaria, the playful rhyming epitaph that Mexicans write every November.
- Demo: https://asosa933.github.io/calaveras-for-dead-code/
- Model: Qwen2.5-0.5B-Instruct (Apache-2.0, ONNX q4/q4f16)
- Runtime: Transformers.js v3 (Apache-2.0), WebGPU when available, WASM otherwise
- No server, no API key, no build step. After the first load the model is cached and the app works offline.
Run locally
python3 -m http.server 8765 # then open http://localhost:8765
Headless check (Playwright + Chrome): npm i playwright-core && node test.mjs generates a calavera and saves screenshots.
Author
Alessio Sosa β MIT License (see LICENSE).
How I Built It
-
Model: Qwen2.5-0.5B-Instruct, Apache-2.0, quantized ONNX (
q4f16on WebGPU,q4on WASM). - Runtime: Transformers.js v3 loaded from a CDN as an ES module. It picks WebGPU if the browser exposes a GPU adapter, otherwise falls back to WebAssembly on the CPU.
-
App: one
index.htmland oneapp.js, no framework, no build step, hosted on GitHub Pages. - Prompting: a system prompt sets the calavera style (4 rhyming lines, La Catrina must appear, funny but kind), and a light post-processor removes "Sure, here isβ¦" preambles.
- Testing: a Playwright script opens the page in headless Chrome, clicks a preset, waits for the generation, and saves screenshots.
What I learned: I first tried SmolLM2-360M. It was faster, but it drifted into broken Spanish as soon as it saw "Mexican" and "calavera" in the prompt. Moving to Qwen2.5-0.5B and saying "English only" explicitly fixed that. The rhymes from a 0.5B model are wobbly, and honestly that adds to the charm: a calavera is supposed to be a bit clumsy and a bit funny.
Why Does Open Innovation Matter?
This project is about software that died because someone else switched it off. It would be a strange joke to build it on a closed API that could be deprecated next year.
- It can't be sunset. The model weights, the runtime and the app are all open and static. As long as a browser can open an HTML file, the ofrenda keeps its candles lit.
- It works with the lights off. After the first load, everything runs offline. No server, no API key, no quota, and no monthly bill for me.
- It's private. What you write about your dead projects (or the colleague's code you're secretly mourning) never leaves your device.
- It's free to fork. Anyone can swap in a different open model, translate the prompt into Spanish, or host their own copy in one click.
A closed API would have been faster and the rhymes would be better. But then the whole thing would depend on a key and on a company's roadmap, which is exactly how most of the code on this ofrenda died.
The Spirit of It
The calavera tradition says we laugh at death because we remember. The software we lose shaped how we learned to code, so it seemed right to give it a little altar, a candle, and a bad rhyme. π―οΈπΌ

Top comments (0)