classif: shell scripts branch on meaning via one token's logprobs on a local 12B

piotr1215 · reddit · 2026-10-06

Inspired by Jev, the author built classif, a shell tool that branches on semantics: it asks a local model one question and reads the answer from a single token's logprobs, returning a label, probability and exit code so if and && work on it (e.g. pipe git diff --staged to check for secrets, then conditionally trigger claude for a security review). One /api/chat call with numpredict 1, 0.3s on a 12GB card using his Gemma fine-tune Winnow-12B (GGUF 8GB). Long text never truncates: it splits text, uses embeddinggemma + BM25 to pick passages — 772KB Pride and Prejudice judged in 17s, 3s with cached index. Python 3.12, no third-party dependencies.

Original post →

More from coding & agent

coding & agent channel →