👻 The Séance Engine: Finding the Ghost in the Data with TabPFN & Gemma
Описание и применение
Автоматический скрипт на Python анализирует дневные системные логи, используя TabPFN для обнаружения аномалий и Gemma для генерации рассказа о «призоре» в ноутбуке, всё работает локально.
Задача
Detect anomalous system log entries on a personal machine without sending data externally.
Результат
The pipeline identifies a 3 AM log entry with 98% CPU as anomalous and produces a whimsical narrative about a ghostly process, all running locally in ~1 min.
Рабочий процесс
- Load CSV of 24 hourly log rows
- For each row, perform leave‑one‑out evaluation with TabPFN: train on 23 real rows + noise, predict p_real for held‑out row
- Identify row with lowest p_real as anomaly
- Prompt local Gemma model via Ollama to generate a ghostly story incorporating the anomaly details
- Output story to terminal and record trace in Sentry
- Optional: run with SENTRY_DSN to capture metrics
Доказательства
Everything runs on my laptop: one Python file, about 100 lines.
The anomalous row, including its p_real score, goes into a prompt that asks Gemma to speak as a gossipy, theatrical ghost…
The trace showed me something I didn’t expect: the leave-one-out TabPFN scan (24 small fits on CPU) took 38 seconds, and Gemma took about a minute.
- Дата записи: 2026-11-01T12:29:13.826Z