File size: 4,826 Bytes
d7f66ae
18d2d6e
 
 
 
d7f66ae
ae6d0c6
 
d7f66ae
ae6d0c6
 
18d2d6e
ae6d0c6
 
cd2e1fb
ae6d0c6
 
 
0db6652
 
 
 
 
 
 
 
 
 
ae6d0c6
d7f66ae
 
18d2d6e
ae6d0c6
18d2d6e
ae6d0c6
18d2d6e
 
 
 
ae6d0c6
18d2d6e
ae6d0c6
18d2d6e
 
 
 
 
 
 
 
 
ae6d0c6
18d2d6e
 
 
 
ae6d0c6
18d2d6e
 
ae6d0c6
18d2d6e
 
 
 
 
 
 
 
b7a2722
18d2d6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0db6652
 
 
 
 
18d2d6e
0db6652
 
 
 
 
 
 
 
 
18d2d6e
 
 
ae6d0c6
 
18d2d6e
 
ae6d0c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
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
```