--- language: - en license: other license_name: mit-and-apache-2.0 license_link: LICENSE tags: - magiceightball - decision-model - rule-engine - onnx --- # MagicEightBall ONNX ![Eight, a black billiards 8-ball, and Relay, a floating chip, light routes across their workbench.](./assets/workbench-motion.webp) MagicEightBall evaluates a fixed support policy and returns a Boolean answer, a category, and a proposed action. The included CPU runner accepts up to **131,072 Needle 3 tokens**. The [ONNX model](./model.onnx) is **192 bytes**. The shared tokenizer, runner, and artwork have separate sizes. Portable radix Gather export. The graph accepts 128 packed INT32 addresses and returns 128 FP32 values that exactly represent the packed lookup words. The included runner builds the addresses from the document evidence and decodes the raw decision bits. CPU verification passed all **128 fact assignments**, **128 short text fixtures**, two exact-limit documents, and rejection at 131,073 tokens. [Verification report](./verification.json) ## Try the policy Download the files together and run the provided CLI from that directory. ```bash python -m pip install numpy sentencepiece onnxruntime python portable_runtime.py model.onnx --text "Duplicate charge. Review authorized." ``` Expect `may_route=true`, `category=billing`, and `action=review_billing`. Try appending `Do not route.` to the same input. The answer becomes false and the action becomes empty. The category remains `billing`. An unrelated request has no category or action. The model finds the policy's declared phrases. The caller receives the proposed action as data for review. [Measured CPU and NCS1 runtimes](https://huggingface.co/tablinum/MagicEightBall#runtime-comparison) For physical Intel NCS1 execution and industry starter packs, use the native model page. [Native NCS1 and industry packs](https://huggingface.co/tablinum/MagicEightBall) · [FP32 Base](https://huggingface.co/tablinum/MagicEightBall-FP32) · [GGUF](https://huggingface.co/tablinum/MagicEightBall-GGUF) · [Still banner](./assets/workbench.webp) ## File size comparison ![Portable CPU model files. ONNX 192 bytes, GGUF 1,024, FP32 dense 1,832.](./assets/size-portable-cpu.webp) [Native and published size comparisons](https://huggingface.co/tablinum/MagicEightBall#size-comparisons) ## License The decision rules and runner are MIT-licensed. The losslessly repackaged Cactus Compute Needle 3 tokenizer is Apache-2.0. [License](./LICENSE) · [Tokenizer provenance](./NOTICE.txt) · [Checksums](./SHA256SUMS.txt)