ai newsDi., 27. Okt.
EilmeldungForscher ärgern sich über OpenAIs zurückhaltende Kommunikation

Ghostlight: a cabinet of haunted objects powered by local, open-weight AI

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine What I Built Ghostlight gives ordinary objects a fictional afterlife. Name an object, choose a setting and a feeling, and a small language model writes a spooky story fragment in your browser. Keep it i

dev.toDienstag 21:02 · 27.10.3 Min. Lesezeit
Bild: dev.to

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

Ghostlight gives ordinary objects a fictional afterlife. Name an object, choose a setting and a feeling, and a small language model writes a spooky story fragment in your browser. Keep it in a local cabinet or export it as Markdown.

The interpretation of “Ghost in the Machine” is literal: the machine invents the ghost, while a familiar object gives the story somewhere to live. The interface is a midnight-green museum desk with an illuminated bell jar and paper-like story cards. These are invented stories, not historical accounts or simulations of real people.

For a quick look, try the clearly labeled sample. It does not run the model. For actual generation, enter an object, choose the setting and mood, then awaken its story.

First generation downloads roughly 550 MB of model and runtime files. A capable desktop is recommended. Loading and generation can take a few minutes, and mobile performance has not been verified. No account, API key or paid inference service is required.

The application code is MIT licensed. The model and dependencies keep their own licenses.

The generation path uses Qwen2.5-0.5B-Instruct, with 8-bit ONNX weights, through Transformers.js and ONNX Runtime Web. Inference runs in a dedicated browser worker on CPU/WebAssembly, so WebGPU is not required.

The small model is a real constraint. It can repeat itself or ignore details. A live desktop test produced a coherent station story but left out the requested brass key. Generation is limited to 220 tokens; a trailing unfinished sentence is dropped rather than completed with fabricated fallback text. That is why the app calls its output a story fragment.

Verification included 21 automated core tests, type checking, a production build, and live desktop checks of real model generation, cancellation, save, reload, export and deletion. These checks do not establish reliability on every browser or phone.

Open weights make the story engine inspectable and replaceable. The prompt, worker and model choice are visible in the repository instead of hidden behind an inference endpoint. Someone can change the tone or try another compatible model without depending on a hosted text-generation API.

Local execution also changes where the story goes. Object names and generated text are not sent to an inference service. Model downloads still contact Hugging Face/CDN hosts, and the page uses Google Fonts, so this is not a claim of zero network contact. Saved stories are not encrypted, and clearing site data removes them.

There is no per-story API bill, but the cost moves to download size, memory and CPU time on the reader’s device. Offline availability is not guaranteed: the app has no service worker, and browser caches can be evicted. Those tradeoffs are part of the project rather than hidden behind the demo.

An AI coding assistant developed the project and generated this write-up. The included sample was written during that assisted build, not by the on-device model. This post uses DEV’s Fully Autonomous disclosure.

Quelle: dev.to (dev.to). Original öffnen