Ofrenda:以本機 Gemma 2 打造連結內核空間與先人記憶的數碼祭壇
Ofrenda: When Kernel Space Meets Ancestral Memory — A Local Gemma 2 Séance Altar
Ofrenda 將墨西哥亡靈節傳統與本機開放權重 AI 結合,打造以 Gemma 2 驅動的離線數碼紀念祭壇及先人對話體驗。專案設有三層祭壇、先人對話室、語音合成及仿舊終端,並支援建立可列印的紀念卡。程式碼以 MIT License 開源,架構採用本機推理,並提供瀏覽器內備用知識庫。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
🕯️ What I Built
Every terminal has an ancestral lineage; every memory register executes algorithms first conceived on paper, chalkboards, and brass gears over a century ago.
For the final Hacktoberfest challenge — "Ghost in the Machine" — I merged the sacred Mexican tradition of Día de los Muertos (Day of the Dead) with local open-weight artificial intelligence to create Ofrenda: Ghost in the Machine.
Between Halloween (October 31) and Día de los Muertos (November 1–2), tradition tells us that the boundary between our world and the spirit realm grows thin. I asked myself: What if our machines had an ancestral memory? What if you could light digital velas (candles), scatter fragrant cempasúchil marigold petals, and commune directly with the computational spirits who laid the bedrock of our digital world — entirely offline, private, and free of corporate cloud telemetry?
Key Features of Ofrenda:
-
Interactive 3-Tier Altar of Remembrance:
- Tier III (The Celestial Registers): Sacred portraits of computing pioneers — Ada Lovelace (prophetess of poetical science), Alan Turing (father of computer science & universal computation), and Charles Babbage (inventor of the Analytical Engine). Each shelf features lit candles with dynamic flame animations, golden auras, and traditional offering trays (punch card looms, Enigma rotors, brass gear teeth).
- Tier II (The Physical Sustenance): Interactive offerings including Pan de Muerto, Copal incense with wisps of rising smoke, pure water, Calaveras de azúcar, and purification salt.
- Tier I (Cempasúchil Gateway): A glowing golden archway with drifting marigold petal particle physics and gateway candles leading spirits into the machine.
-
The Ancestral Séance Chamber:
- Real-time dialogue with pioneer spirits across four distinct modes:
- Philosophical Dialogue: Delve into the nature of artificial consciousness, mathematical aesthetics, and the soul.
- Bug & Code Exorcism: Present troubled code or memory leaks for historical logical decomposition.
- Ofrenda Blessing: Ancestors acknowledge offerings laid upon their shelf.
- Epitaph Weaving: Generates poetic, heartfelt tributes.
- Ethereal Voice Synthesizer: Reads ancestral words aloud using the Web Speech API with pitch-tuned cadence.
- Real-time dialogue with pioneer spirits across four distinct modes:
-
Haunted Shell Terminal (
spectral-sh):- A retro phosphor CRT terminal interface where developers can run esoteric commands (
ofrenda,summon <spirit>,whisper <query>,offer <item>,exorcise <code>,light) alongside haunted Unix easter eggs (kill -9,whoami,sudo,rm -rf /).
- A retro phosphor CRT terminal interface where developers can run esoteric commands (
-
Custom Memorial Creator & Keepsake Card:
- Users can dedicate an ofrenda space to their own departed family members, mentors, or cherished deprecated open-source projects, and generate an ornate printable keepsake card.
-
Procedural Web Audio Soundscape:
- Zero external audio files — procedurally synthesizes ambient wind whistling through bandpass filters, realistic candle ignition chimes, and ceremonial bell tones.
🎥 Demo
Experience the digital ofrenda locally or explore the repository:
🔗 GitHub Repository: https://github.com/ayushraaj-01/hackweek-4
Interface Highlights:
- Luminous Candle Physics: Click any candle on the altar to ignite or extinguish it with procedural audio chimes and marigold particle bursts.
- Typewriter Dialogue Streaming: Ancestral spirits speak with historic voice cadences, rendered character-by-character.
- Haunted CRT Terminal: Toggle between the candlelit altar and a haunted green-phosphor shell emulator running inside kernel space.
- Día de los Muertos Keepsake Export: Generates high-resolution printable memorial cards with sugar skull and marigold borders.
💻 Code
The complete source code is open source under the MIT License:
🕯️ Ofrenda: Ghost in the Machine
A Día de los Muertos Digital Memorial & Ancestral Séance Powered by Local Open-Weight AI (Gemma 2)
"No hay muerte si hay memoria." (There is no death where there is remembrance.)
💀 Overview
Every terminal has a lineage; every memory register is built upon the theorems of departed minds.
Built for the Hacktoberfest Open-Source AI Challenge Week 4: "Ghost in the Machine", Ofrenda merges the sacred Mexican tradition of Día de los Muertos (Day of the Dead) with local open-weight artificial intelligence.
During this mystical stretch between October 31 and November 2, the line between kernel space and the spirit realm grows thin. Ofrenda provides a digital sanctuary where developers and students can:
- Honor the Computational Ancestors: Commune with the spirits of Ada Lovelace (prophetess of poetical science), Alan Turing (father of computer science & universal computation), and Charles Babbage (inventor of the…
Architecture Overview
Ofrenda is built with an offline-first, local-first decoupled architecture:
mermaid
graph TD
subgraph Client ["Client Browser (Offline PWA)"]
Canvas[Cempasúchil Petal Physics Canvas]
Altar[3-Tier Altar UI & Candles]
Audio[Procedural Web Audio Soundscape]
Seance[Séance Chamber & Ghostly Speech Synthesis]
Shell[Haunted Shell Terminal]
end
subgraph ServerBridge ["Local Node Gateway (server.js :8080)"]
Static[Zero-Dependency Static Asset Server]
Proxy[Local Whisper Gateway - /api/whisper]
Health[Ollama Probe - /api/health]
end
subgraph LocalInference ["Local-First Open-Weight Runtimes"]
Ollama[Local Ollama Daemon :11434]
GemmaModel[(Google Gemma 2 2B / 7B)]
PythonCLI[ofrenda_gemma_engine.py]
MemoryOracle[In-Browser Fallback Knowledge Oracle]
end
Altar -->|Audio Triggers| Audio
Altar -->|Petal Bursts| Canvas
Seance -->|POST /api/whisper| Proxy
Shell -->|Commands| Proxy
Proxy -->|Probe| Health
Health -->|GET /api/tags| Ollama
Proxy -->|Gemma 2 Turn Prompt| Ollama
Ollama -->|Streams Tokens| GemmaModel
Proxy -.->|Offline Fallback| MemoryOracle
PythonCLI -->|Direct Turn-Based Inference| Ollama
來源:DEV Community · dev.to