open-standards/aac/aac-rs/data/ai/index.json
Transaction Science 3e88f9fbc9 feat(aac sentence helper): whole sentences and replies, suggested on the device
The sentence helper is an optional download (Settings → Sentence helper):
Gemma 4 E2B in Google's web build, run by Google's LiteRT-LM web runtime on
the graphics chip, in a worker. ✨ beside the message turns the words chosen
into three sentences, fitting what the partner said if it was typed in, or
suggests four replies when no words are chosen yet. The suggestions take the
word predictions' place, at their height, so no cell moves (SPEC §3); the
person chooses one and speaks it. Nothing is spoken by itself, and nothing
typed leaves the device.

- ai_helper.rs: the catalogue (aac-ai-index/1), prompts, whether a device can
  run it (a WebGPU hardware adapter, never the processor), download, continue,
  remove and re-check, and suggestions that a later request supersedes. The
  model's parts (64 MiB, SHA-256 checked) and the one runtime build this
  browser runs live in the model store; the worker streams the parts from
  there into GPU memory.
- third_party/litert-lm: @litert-lm/core 0.17.1 vendored and pinned (npm
  integrity, each file's size and SHA-256), with our worker bundled by esbuild
  0.28.2; the runtime's CDN default is emptied.
- tools/ai: build_ai.py (the pinned model → parts and catalogue),
  check_packs.py, languages.json (English, Spanish, German and Hindi ready;
  Swahili not yet), and eval/: the 20 exchanges, a harness that runs the
  app's own prompts (a test keeps them word for word), and the judged answers.
- Measured: Chrome on an M5 Max, 0.4-0.7 s an answer. A real iPad Air (M3) in
  Safari 27: 101 s to download and check 2 GB, about 80 s for the first start,
  5.9 s for later starts, 0.8-1.4 s an answer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:52:48 -04:00

412 lines
12 KiB
JSON

{
"schema": "aac-ai-index/1",
"generated": "2026-10-01",
"models": {
"gemma-4-e2b-it-web": {
"name": "Gemma 4 E2B",
"runtime": "[email protected]",
"source": "https://huggingface.co/litert-community/gemma-4-E2B-it-litert-lm/blob/b3ca0d2f076785a8f4b2219ddbd2bdb99954eae1/gemma-4-E2B-it-web.litertlm",
"bytes": 2008432640,
"sha256": "3a08e8d94e23b814ae5414469c370c503813949acb8ceaa17e4ebf8a35af35b5",
"parts": [
{
"url": "gemma-4-e2b-it-web/part-00.dcc68d8cad6a.bin",
"bytes": 67108864,
"sha256": "dcc68d8cad6a75c6bb3f53fc4a31a65c8db856c87d6fd5e94c331b2d32bc6c83"
},
{
"url": "gemma-4-e2b-it-web/part-01.57aaea945f65.bin",
"bytes": 67108864,
"sha256": "57aaea945f653ca617cb868ed349e49c87b1256fd8b03e457403d58cd950ac77"
},
{
"url": "gemma-4-e2b-it-web/part-02.98e961bac7aa.bin",
"bytes": 67108864,
"sha256": "98e961bac7aa6a840efa8d415f998872329081a00b1ddc5e97e06f242f29a177"
},
{
"url": "gemma-4-e2b-it-web/part-03.c11780115da2.bin",
"bytes": 67108864,
"sha256": "c11780115da2dfa5ca9b3f81bec379d23593486780d1bf731e5c9207c29c6006"
},
{
"url": "gemma-4-e2b-it-web/part-04.3abd48f6a494.bin",
"bytes": 67108864,
"sha256": "3abd48f6a4945f4200e81d7746c804d958d1597096bb19f2d4fb977571a8f112"
},
{
"url": "gemma-4-e2b-it-web/part-05.6bd56eb9cf7d.bin",
"bytes": 67108864,
"sha256": "6bd56eb9cf7dd08385b722cd09225e5bebdd353dfae31fb5f89385a2645687c5"
},
{
"url": "gemma-4-e2b-it-web/part-06.7132846fb38d.bin",
"bytes": 67108864,
"sha256": "7132846fb38d0f92b4398031408a5b36e3d3f46b815bd9720573316ff6bc4562"
},
{
"url": "gemma-4-e2b-it-web/part-07.6aa2d48a8219.bin",
"bytes": 67108864,
"sha256": "6aa2d48a82194810a9e1514d3b5295a496a6a9aab3950108796fe0a77bbc08f8"
},
{
"url": "gemma-4-e2b-it-web/part-08.3a05ed54299e.bin",
"bytes": 67108864,
"sha256": "3a05ed54299e0a0eb76f5808bce3ba1b4127800f6d7d1daa4ad549fbee8c5f2f"
},
{
"url": "gemma-4-e2b-it-web/part-09.12cd17e72bf6.bin",
"bytes": 67108864,
"sha256": "12cd17e72bf63df7a1e47b417eda5f5bb1e43cef8416ad5eaf13f1a2d6ea041c"
},
{
"url": "gemma-4-e2b-it-web/part-10.be4e5f8a063f.bin",
"bytes": 67108864,
"sha256": "be4e5f8a063f5b23eaed5454d5b7a7bf0870c413eafc404ebb7bb48fdc984a0b"
},
{
"url": "gemma-4-e2b-it-web/part-11.2fec750a5764.bin",
"bytes": 67108864,
"sha256": "2fec750a5764e0fc4ec05b4d63aec712046dcb6479b1ff8c3afd85412864d620"
},
{
"url": "gemma-4-e2b-it-web/part-12.52a66312207a.bin",
"bytes": 67108864,
"sha256": "52a66312207a7ee49d5d4f3c95f2eff6440be715414b7d1536913c112063e29a"
},
{
"url": "gemma-4-e2b-it-web/part-13.b6ed22637469.bin",
"bytes": 67108864,
"sha256": "b6ed226374699b966cd929be63d4d10d4e4fa8a2d080fe0d6c5f57e9e30c9b74"
},
{
"url": "gemma-4-e2b-it-web/part-14.24de7785d5a1.bin",
"bytes": 67108864,
"sha256": "24de7785d5a133f9e4f2c4eadff72681d310eaf3744718ccaa359f676ed7fc44"
},
{
"url": "gemma-4-e2b-it-web/part-15.8f4a732ae945.bin",
"bytes": 67108864,
"sha256": "8f4a732ae94560d21ec3e86620b7621d8d4dc143322c84abd9781f24d585c511"
},
{
"url": "gemma-4-e2b-it-web/part-16.8ab64ae0a484.bin",
"bytes": 67108864,
"sha256": "8ab64ae0a484fbcd5e1597064d74218d70eaaaeec14e2669bb49e5a6302b8d2e"
},
{
"url": "gemma-4-e2b-it-web/part-17.b3bbd5f93fb7.bin",
"bytes": 67108864,
"sha256": "b3bbd5f93fb713c55a5ab0b2c354f674e1ce943e19a0e8a7b14e8f3a7eead3b1"
},
{
"url": "gemma-4-e2b-it-web/part-18.dc55fbdaa4fd.bin",
"bytes": 67108864,
"sha256": "dc55fbdaa4fdf6c21b016c21fd1ac3626d0b777be065b77bddd6777b5c3700f9"
},
{
"url": "gemma-4-e2b-it-web/part-19.2e951021f639.bin",
"bytes": 67108864,
"sha256": "2e951021f639ca307ee493b4d4e167c462b64b90f47dbd3d7b613dfacc7ae046"
},
{
"url": "gemma-4-e2b-it-web/part-20.885572d36442.bin",
"bytes": 67108864,
"sha256": "885572d36442ddfa3f60ae938b0e8fcbfd7942b8859b0c49457d222c48150ec2"
},
{
"url": "gemma-4-e2b-it-web/part-21.08f895eb2873.bin",
"bytes": 67108864,
"sha256": "08f895eb2873137e00e37e4203159c03dc44182d7e8099d325eda0d7b97e1c87"
},
{
"url": "gemma-4-e2b-it-web/part-22.9bd7290de4d2.bin",
"bytes": 67108864,
"sha256": "9bd7290de4d28e2c3d8892ad20e4e4862e9d0f1566c54489d01797656c5f0b8e"
},
{
"url": "gemma-4-e2b-it-web/part-23.fc7e4338694a.bin",
"bytes": 67108864,
"sha256": "fc7e4338694a834e082e75a62d6960267127b3911e92321da71b47273c8e536e"
},
{
"url": "gemma-4-e2b-it-web/part-24.74d63413c4d8.bin",
"bytes": 67108864,
"sha256": "74d63413c4d8ee388236c79b82b83b65ef9b821ef0dfe845b504510f23860068"
},
{
"url": "gemma-4-e2b-it-web/part-25.0fdb0d686f4d.bin",
"bytes": 67108864,
"sha256": "0fdb0d686f4d82f7519e46d32bac517a0a00ecc033bbed31f8bc0d97c23b3d41"
},
{
"url": "gemma-4-e2b-it-web/part-26.e7a518e22152.bin",
"bytes": 67108864,
"sha256": "e7a518e221529205678fee8ad95b017b2144261c0912d153a18436fd020a9d12"
},
{
"url": "gemma-4-e2b-it-web/part-27.b501080ad482.bin",
"bytes": 67108864,
"sha256": "b501080ad48232f00c95cdcc168d6ff5775e0c80f299f0ef0725e2a0f4d84406"
},
{
"url": "gemma-4-e2b-it-web/part-28.1868f267203e.bin",
"bytes": 67108864,
"sha256": "1868f267203e3da4aa5fc9e67fd9c4c14831420ffc514faa4e57eb537e675f94"
},
{
"url": "gemma-4-e2b-it-web/part-29.ea467cb6920f.bin",
"bytes": 62275584,
"sha256": "ea467cb6920f8b6d7b4e23433e45ff1a5dbec5660a2da444db7902b9629ea851"
}
],
"licence": "Apache-2.0",
"licence_url": "https://ai.google.dev/gemma/docs/gemma_4_license",
"attribution": "Gemma 4 E2B by Google DeepMind, in Google AI Edge's web build for LiteRT-LM (litert-community on Hugging Face)",
"licence_file": "licences/Apache-2.0.c71d239df917.txt",
"gpu_memory_bytes": 1800000000,
"context_tokens": 1024
}
},
"languages": {
"de": {
"status": "ready",
"name": "German",
"model": "gemma-4-e2b-it-web",
"note": "In our test of 20 everyday exchanges, 17 had a usable sentence among the three offered, and its replies were natural.",
"examples": {
"sentence": [
{
"partner": "Guten Morgen!",
"words": "gut du",
"out": [
"Mir geht es gut, und dir?",
"Gut, danke. Und dir?",
"Mir geht's gut, wie geht's dir?"
]
},
{
"partner": null,
"words": "Handy",
"out": [
"Ich brauche mein Handy.",
"Gibst du mir mein Handy?",
"Wo ist mein Handy?"
]
}
],
"reply": [
{
"partner": "Guten Morgen!",
"out": [
"Guten Morgen! Wie geht es dir?",
"Morgen! Ich habe gut geschlafen.",
"Guten Morgen, ich bin heute müde.",
"Hallo! Schön, dich zu sehen."
]
},
{
"partner": "Was brauchst du?",
"out": [
"Ich brauche Wasser, bitte.",
"Ich muss auf die Toilette.",
"Gerade nichts, danke.",
"Kannst du mir helfen, mich aufzusetzen?"
]
}
]
}
},
"en": {
"status": "ready",
"name": "English",
"model": "gemma-4-e2b-it-web",
"note": "In our test of 20 everyday exchanges, 18 had a usable sentence among the three offered, and its replies were natural.",
"examples": {
"sentence": [
{
"partner": "Good morning!",
"words": "fine you",
"out": [
"I'm fine, and you?",
"Fine, thank you. And you?",
"I'm doing fine, how about you?"
]
},
{
"partner": null,
"words": "phone",
"out": [
"I need my phone.",
"Can you give me my phone?",
"Where is my phone?"
]
}
],
"reply": [
{
"partner": "Good morning!",
"out": [
"Good morning! How are you?",
"Morning! I slept well.",
"Good morning, I'm tired today.",
"Hi! Good to see you."
]
},
{
"partner": "What do you need?",
"out": [
"I need some water, please.",
"I need the bathroom.",
"Nothing right now, thanks.",
"Can you help me sit up?"
]
}
]
}
},
"es": {
"status": "ready",
"name": "Spanish",
"model": "gemma-4-e2b-it-web",
"note": "In our test of 20 everyday exchanges, 17 had a usable sentence among the three offered, and its replies were natural.",
"examples": {
"sentence": [
{
"partner": "¡Buenos días!",
"words": "bien tú",
"out": [
"Estoy bien, ¿y tú?",
"Bien, gracias. ¿Y tú?",
"Estoy muy bien, ¿y tú cómo estás?"
]
},
{
"partner": null,
"words": "teléfono",
"out": [
"Necesito mi teléfono.",
"¿Me das mi teléfono?",
"¿Dónde está mi teléfono?"
]
}
],
"reply": [
{
"partner": "¡Buenos días!",
"out": [
"¡Buenos días! ¿Cómo estás?",
"Buenos días, dormí bien.",
"Buenos días, hoy estoy cansado.",
"¡Hola! Qué bueno verte."
]
},
{
"partner": "¿Qué necesitas?",
"out": [
"Necesito agua, por favor.",
"Necesito ir al baño.",
"Nada por ahora, gracias.",
"¿Me ayudas a sentarme?"
]
}
]
}
},
"hi": {
"status": "ready",
"name": "Hindi",
"model": "gemma-4-e2b-it-web",
"note": "In our test of 20 everyday exchanges, 15 had a usable sentence among the three offered, and its replies were natural.",
"examples": {
"sentence": [
{
"partner": "सुप्रभात!",
"words": "ठीक आप",
"out": [
"मैं ठीक हूँ, और आप?",
"ठीक हूँ, धन्यवाद। आप कैसे हैं?",
"मैं बिल्कुल ठीक हूँ, आप सुनाइए?"
]
},
{
"partner": null,
"words": "फ़ोन",
"out": [
"मुझे अपना फ़ोन चाहिए।",
"क्या आप मुझे मेरा फ़ोन देंगे?",
"मेरा फ़ोन कहाँ है?"
]
}
],
"reply": [
{
"partner": "सुप्रभात!",
"out": [
"सुप्रभात! आप कैसे हैं?",
"सुप्रभात, मैं अच्छे से सोया।",
"सुप्रभात, आज मैं थका हुआ हूँ।",
"नमस्ते! आपको देखकर अच्छा लगा।"
]
},
{
"partner": "तुम्हें क्या चाहिए?",
"out": [
"मुझे पानी चाहिए, कृपया।",
"मुझे शौचालय जाना है।",
"अभी कुछ नहीं, धन्यवाद।",
"क्या आप मुझे बैठने में मदद करेंगे?"
]
}
]
}
},
"sw": {
"status": "not-yet",
"name": "Swahili",
"note": "In our test of 20 everyday exchanges, many of its Swahili sentences and replies were not grammatical.",
"examples": {
"sentence": [
{
"partner": "Habari za asubuhi!",
"words": "nzuri wewe",
"out": [
"Nzuri, na wewe je?",
"Salama, asante. Na wewe?",
"Niko vizuri, habari yako?"
]
},
{
"partner": null,
"words": "simu",
"out": [
"Nahitaji simu yangu.",
"Unaweza kunipa simu yangu?",
"Simu yangu iko wapi?"
]
}
],
"reply": [
{
"partner": "Habari za asubuhi!",
"out": [
"Nzuri! Habari yako?",
"Nzuri, nimelala vizuri.",
"Salama, ila nimechoka leo.",
"Habari! Nafurahi kukuona."
]
},
{
"partner": "Unahitaji nini?",
"out": [
"Nahitaji maji, tafadhali.",
"Nahitaji kwenda chooni.",
"Sihitaji kitu sasa, asante.",
"Unaweza kunisaidia kukaa?"
]
}
]
}
}
}
}