File size: 1,702 Bytes
14fe01f
ca73534
 
14fe01f
ca73534
14fe01f
ca73534
14fe01f
ca73534
 
 
 
 
 
 
14fe01f
 
ca73534
 
 
 
 
 
 
 
 
 
 
 
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
---
title: System 1 + 2
emoji: 🧲
colorFrom: yellow
colorTo: purple
sdk: static
app_file: index.html
pinned: false
short_description: A small decision model decides when Gemma 4 is needed
models:
  - onnx-community/embeddinggemma-2-ONNX
  - onnx-community/strands-decider-2B-hobson-v19-ONNX
  - onnx-community/GLiNER2.5-Decide-ONNX
  - onnx-community/GLiNER2.5-Decide-mobile-ONNX
  - onnx-community/gemma-4-E2B-it-ONNX
---

# System 1 + 2

Most chat messages don't need a large language model. Here, every message is first matched against your memories (notes, photos and voice memos stuck to a fridge) with **EmbeddingGemma 2**. Then **Strands Decider 2B**, a System One decision model run with [open-jev](https://github.com/nico-martin/open-jev), decides whether one of those memories already answers it. If one does, the answer is the memory itself, in a few hundred milliseconds. If not, **Gemma 4 E2B** writes the answer, with the closest memories as context. A meter counts how often Gemma was actually needed.

<video src="https://huggingface.co/spaces/shreyask/system-one-two/resolve/main/system-one-two.mp4" controls></video>

- Drop photos or voice memos on the fridge: Gemma 4 describes each one once, then it's searchable.
- "How it decided" shows exactly what System One read: memories with match strength in words, never scores.
- "Still ask Gemma" puts the memory answer and Gemma's answer side by side.
- Everything runs in your browser on WebGPU (about 4.5 GB of models on first load, cached after). On phones the memory route runs with the 345 MB GLiNER2.5-Decide mobile build; Gemma 4 needs a desktop.

Built with [Transformers.js](https://github.com/huggingface/transformers.js).