--- title: "First-Principle AI ยท Gotcha Arena" emoji: "๐ŸŽฏ" colorFrom: indigo colorTo: green sdk: gradio sdk_version: "6.14.0" python_version: "3.12" app_file: app.py fullWidth: true header: mini short_description: "Trick-question arena for a small first-principle reasoner" suggested_hardware: zero-a10g models: - build-small-hackathon/phase-3-gguf tags: - gradio - build-small-hackathon - track:wood - sponsor:nvidia - achievement:offbrand - achievement:offgrid - achievement:sharing - reasoning - nemotron - gguf - llama-cpp - zerogpu license: mit --- # ๐ŸŽฏ First-Principle AI ยท Gotcha Arena **A small reasoning model that reads the question, not the pattern.** Big models get fooled by familiar-looking trick questions โ€” a riddle with one word swapped, a decoy distance, a false premise. *First-Principle AI* is a compact ~31.6B Q8 MoE (Nemotron-H) reasoning model built for this hackathon, and this Space is a playground for testing exactly that skill. ## What you can do here - **๐ŸŽฏ The Gauntlet** โ€” pick a trick question from the deck (or hit *Surprise me*), run it, and see whether the model reasons past the trap. A live scoreboard tracks how many traps it caught vs. fell for, and reveals *why* each one is a trap. - **๐Ÿง  Trap It Yourself** โ€” two modes: - *Trap the AI*: write your own trick question and try to fool it. - *Blind-Spot Check*: paste any real plan or "should I X or Y?" decision and the model surfaces the hidden assumption you might be missing. (This is the practical use case โ€” the same first-principle reasoning, pointed at your own decisions.) - **โš™๏ธ Engine Room** โ€” sampling controls and live llama.cpp runtime diagnostics. The trap deck mixes the model's signature **goal-binding** puzzles (the object that must physically move) with classic gotchas: the Moses illusion, the bat-and-ball cognitive-reflection test, unit misdirection, false-premise questions, and language-parsing traps. > The auto-verdict in the Gauntlet is a lightweight keyword heuristic โ€” the real > proof is reading the model's answer. It's there to keep score, not to grade. ## The model | | | | --- | --- | | Repo | [`build-small-hackathon/phase-3-gguf`](https://huggingface.co/build-small-hackathon/phase-3-gguf) | | Base | [`owenisas/nemotron-3-nano-reasoning`](https://huggingface.co/owenisas/nemotron-3-nano-reasoning) (merged) | | Architecture | Nemotron-H hybrid **MoE**, ChatML chat template | | Size | `model-Q8_0.gguf`, ~31.6B params (**under the 32B cap**) | | Context (this Space) | 2,048 tokens (`n_ctx`); the GGUF reports a larger architectural max, but the Space serves 2K for fast, memory-safe startup | | Runtime | official `llama.cpp` `llama-server` (release `b9360`) on ZeroGPU | Because it's a Mixture-of-Experts model, only a small slice of the 31.6B parameters is active per token, which is what makes a model this capable run on a small footprint. ## Runtime notes - The 33.6 GB Q8 GGUF is **not** preloaded during build (it would make startup unreliable). It downloads and loads through `llama-server` on the **first prompt**, which takes about 1โ€“2 minutes; every prompt after that reuses the warm server. - ZeroGPU is primarily documented around PyTorch workloads, so this app runs the GGUF through the official llama.cpp CLI path instead of depending on a Python extension compile at build time. If the runtime can't provide enough memory or a compatible binary, the app shows a visible diagnostic instead of a silent mock answer. ## Hackathon submission โ€” Build Small **Track:** ๐ŸŒฒ Thousand Token Wood (`track:wood`) โ€” a whimsical, AI-native game. **Sponsor model:** NVIDIA Nemotron (`sponsor:nvidia`). **Badges targeted:** Off Brand (custom UI), Off Grid (fully local llama.cpp inference), Sharing (social post). - [x] **Gradio Space inside the org** โ€” `build-small-hackathon/First-Principle-AI` - [x] **Model โ‰ค 32B params** โ€” ~31.6B Q8 MoE (Nemotron-H) - [x] **Track + badge tags in YAML** โ€” `track:wood`, `sponsor:nvidia`, `achievement:offbrand/offgrid/sharing` - [x] **Write-up of idea + technical approach** โ€” this README - [ ] **Demo video** โ€” `TODO: add a public video link (YouTube / Loom / Space) showing the app running` - [ ] **Social post + link** โ€” `TODO: post once about the build and paste the URL here` - [ ] **Team HF usernames** โ€” `owenisas` *(add teammates if any; each must register + join the org)* > The three `TODO`s need a human (record the video, make the social post, confirm > teammates), then paste the links above. Re-run the field-guide validator after editing: > https://build-small-hackathon-field-guide.hf.space/submit ## Local smoke test ```bash cd hf-spaces/phase-3-gguf-lab PHASE3_DISABLE_MODEL=1 python app.py # UI only, no model load ```