Spaces:
Runtime error
Runtime error
demo video and writeup
Browse files- .gitattributes +8 -3
- README.md +9 -0
- demo/out/whatfirst-small-demo-loud.mp4 +3 -0
- demo/out/whatfirst-small-demo-poster.jpg +3 -0
- submission/whatfirst-small-writeup.md +100 -0
.gitattributes
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
# Linux container target β keep LF endings so shell scripts run in Docker.
|
| 2 |
* text=auto eol=lf
|
| 3 |
-
|
| 4 |
-
*.
|
| 5 |
-
*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
*.ttf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
# Linux container target β keep LF endings so shell scripts run in Docker.
|
| 2 |
* text=auto eol=lf
|
| 3 |
+
# Binary assets via Git LFS β Hugging Face Spaces rejects in-tree binaries.
|
| 4 |
+
*.gguf filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ttf filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 11 |
*.ttf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -23,6 +23,15 @@ keys, runs on a laptop.
|
|
| 23 |
Built for the [Hugging Face Build Small hackathon](https://huggingface.co/build-small-hackathon)
|
| 24 |
(Backyard AI track).
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## Why this exists
|
| 27 |
|
| 28 |
Deciding *what to do first* is a real, daily problem β and most "AI to-do" apps
|
|
|
|
| 23 |
Built for the [Hugging Face Build Small hackathon](https://huggingface.co/build-small-hackathon)
|
| 24 |
(Backyard AI track).
|
| 25 |
|
| 26 |
+
## Demo
|
| 27 |
+
|
| 28 |
+
<video
|
| 29 |
+
controls
|
| 30 |
+
width="100%"
|
| 31 |
+
poster="https://huggingface.co/spaces/build-small-hackathon/whatfirst-small/resolve/main/demo/out/whatfirst-small-demo-poster.jpg"
|
| 32 |
+
src="https://huggingface.co/spaces/build-small-hackathon/whatfirst-small/resolve/main/demo/out/whatfirst-small-demo-loud.mp4">
|
| 33 |
+
</video>
|
| 34 |
+
|
| 35 |
## Why this exists
|
| 36 |
|
| 37 |
Deciding *what to do first* is a real, daily problem β and most "AI to-do" apps
|
demo/out/whatfirst-small-demo-loud.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4abfed4ef18a94e345ce0cfb2321eb4e2ae18bc3395b00039b5e0564f86a1d3
|
| 3 |
+
size 10236415
|
demo/out/whatfirst-small-demo-poster.jpg
ADDED
|
Git LFS Details
|
submission/whatfirst-small-writeup.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: "whatfirst Β· small β what to do first, on a 3B model, fully offline"
|
| 3 |
+
thumbnail: /blog/assets/whatfirst-small/thumbnail.jpg
|
| 4 |
+
authors:
|
| 5 |
+
- user: optiquant
|
| 6 |
+
date: June 13, 2026
|
| 7 |
+
tags:
|
| 8 |
+
- hackathon
|
| 9 |
+
- build-small-hackathon
|
| 10 |
+
- local-first
|
| 11 |
+
- llama-cpp
|
| 12 |
+
- gradio
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# whatfirst Β· small β what to do first, on a 3B model, fully offline
|
| 16 |
+
|
| 17 |
+
**Dump everything on your mind β get back what to do _first_, with the math shown.** No cloud, no API keys, runs on a laptop.
|
| 18 |
+
|
| 19 |
+
<!-- Build Small hackathon Β· Backyard AI track -->
|
| 20 |
+
|
| 21 |
+
<gradio-app src="https://build-small-hackathon-whatfirst-small.hf.space"></gradio-app>
|
| 22 |
+
|
| 23 |
+
> Live Space: [build-small-hackathon/whatfirst-small](https://huggingface.co/spaces/build-small-hackathon/whatfirst-small)
|
| 24 |
+
|
| 25 |
+
## The problem
|
| 26 |
+
|
| 27 |
+
Deciding _what to do first_ is a real, daily problem β and most "AI to-do" apps answer it with a black box. You get a reordered list and no idea why. The whole category bet on opaque intelligence and lost the one axis that actually builds trust: _I understand why this is at the top._
|
| 28 |
+
|
| 29 |
+
whatfirst keeps the AI where it earns its keep β turning vague human language into structured fields β and makes the **prioritization itself legible**: two competing scores, an urgency curve that explodes as a deadline nears, a quick-win boost for short ready tasks, and deadlines treated as a hard constraint rather than a number folded into a blob.
|
| 30 |
+
|
| 31 |
+
## The small question
|
| 32 |
+
|
| 33 |
+
The problem β and the approach β come from **[what-first.com](https://what-first.com)**, a full web app the same team built in June 2026. There, a frontier cloud model (Claude) does the language work β reading your tasks and proposing their impact, readiness, and effort β and a deterministic engine ranks them.
|
| 34 |
+
|
| 35 |
+
This entry asks a smaller question:
|
| 36 |
+
|
| 37 |
+
> **Can a 3B model running offline on a laptop do that same language work?**
|
| 38 |
+
|
| 39 |
+
The ranking engine here is a clean-room Python reimplementation with its own tests β not a copy of the original β so the only variable being tested is the model.
|
| 40 |
+
|
| 41 |
+
## How it works
|
| 42 |
+
|
| 43 |
+
```
|
| 44 |
+
brain-dump / photo βββΆ Qwen2.5-VL-3B (llama.cpp, localhost) βββΆ structured tasks
|
| 45 |
+
β
|
| 46 |
+
score.py (deterministic)
|
| 47 |
+
β
|
| 48 |
+
ranked list + "do this first"
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
- **`llm.py`** β client for the local llama.cpp server (brain-dump parse, image extract, single-task re-score). Every model output is treated as untrusted: parsed tolerantly, then **re-clamped to its domain** before it reaches the scorer.
|
| 52 |
+
- **`score.py`** β the scoring + deadline-ranking engine. Pure standard-library math, fully deterministic.
|
| 53 |
+
- **`prompts.py`** β the system prompts that pin the model to strict JSON.
|
| 54 |
+
- **`app.py`** β the Gradio UI: capture, ranked table, and sliders to correct any score and re-rank live.
|
| 55 |
+
|
| 56 |
+
## The model
|
| 57 |
+
|
| 58 |
+
[`ggml-org/Qwen2.5-VL-3B-Instruct-GGUF`](https://huggingface.co/ggml-org/Qwen2.5-VL-3B-Instruct-GGUF) (Q4_K_M weights + f16 mmproj) β β€ 32B and laptop-runnable. One model serves all three flows over an OpenAI-compatible llama.cpp `llama-server`, including the vision path: snap a photo of a sticky-note pile and the same model reads it.
|
| 59 |
+
|
| 60 |
+
## The part that isn't AI: a scoring engine you can read
|
| 61 |
+
|
| 62 |
+
The model's job ends at structured fields. The ranking is deterministic, and **every number is shown on screen**. Two scores compete and the higher one displays:
|
| 63 |
+
|
| 64 |
+
- **do** = `(Impact Β· Urgency Β· Readiness_eff Β· QuickWin) / 10` β the case for doing it now.
|
| 65 |
+
- **prep** = `(Impact Β· Urgency Β· (10 β Readiness)) / 10 Β· 0.7 Β· QuickWin` β the case for de-risking it first (wins only when a task is valuable but not ready).
|
| 66 |
+
|
| 67 |
+
**Urgency** climbs as a deadline nears and _explodes_ once it's within a day, so a looming deadline can't be buried by a shiny far-off task. **QuickWin** rewards short, ready tasks. And deadlines act as a **constraint**, not just a term: anything overdue, or that genuinely won't finish in time given everything ahead of it, is lifted above the value pack.
|
| 68 |
+
|
| 69 |
+
Disagree with a score? Drag a slider and the list **re-ranks live** β the model proposes, you decide.
|
| 70 |
+
|
| 71 |
+
## Demo
|
| 72 |
+
|
| 73 |
+
<video
|
| 74 |
+
controls
|
| 75 |
+
width="100%"
|
| 76 |
+
poster="https://huggingface.co/spaces/build-small-hackathon/whatfirst-small/resolve/main/demo/out/whatfirst-small-demo-poster.jpg"
|
| 77 |
+
src="https://huggingface.co/spaces/build-small-hackathon/whatfirst-small/resolve/main/demo/out/whatfirst-small-demo-loud.mp4">
|
| 78 |
+
</video>
|
| 79 |
+
|
| 80 |
+
## Merit badges
|
| 81 |
+
|
| 82 |
+
**π Off the Grid.** All inference is local llama.cpp over localhost. Nothing leaves the box at runtime β no cloud, no API keys. Your to-do list, including a photo of it, never travels.
|
| 83 |
+
|
| 84 |
+
**π¦ Llama Champion.** The whole language stack is a llama.cpp `llama-server`, built from source in the container, serving a Qwen2.5-VL GGUF (text **and** vision) behind an OpenAI-compatible API.
|
| 85 |
+
|
| 86 |
+
**π Field Notes.** This write-up β including the honest part below.
|
| 87 |
+
|
| 88 |
+
## What worked, and what didn't
|
| 89 |
+
|
| 90 |
+
**Worked:** The deterministic engine is the easy hero β it's instant, transparent, and identical to the production logic it reimplements; `test_score.py` keeps it honest. Treating every model output as untrusted and **re-clamping before scoring** turned out to be the load-bearing design decision: even when the 3B model returns a wobbly number or a malformed date, the score can never go NaN or out of range.
|
| 91 |
+
|
| 92 |
+
**Didn't, or only just:** A 3B model is not Claude. It mis-reads the occasional relative date ("next Wednesday") and gets jittery on effort estimates β the re-clamp and the editable sliders exist partly to absorb that. And **CPU inference is slow**: on a free CPU Space, expect a few seconds per task, and the vision path is heavier still (Qwen2.5-VL's dynamic resolution turns a screenshot into thousands of vision tokens, so the longest image edge is capped before encoding). That's the honest cost of staying fully on the grid-less side β and it's exactly the tradeoff the "small" question was meant to surface.
|
| 93 |
+
|
| 94 |
+
## Try it
|
| 95 |
+
|
| 96 |
+
- **Space:** [build-small-hackathon/whatfirst-small](https://huggingface.co/spaces/build-small-hackathon/whatfirst-small)
|
| 97 |
+
- **Model:** [ggml-org/Qwen2.5-VL-3B-Instruct-GGUF](https://huggingface.co/ggml-org/Qwen2.5-VL-3B-Instruct-GGUF)
|
| 98 |
+
- **The full app this comes from:** [what-first.com](https://what-first.com)
|
| 99 |
+
|
| 100 |
+
Stop deciding. Start doing.
|