open-standards/aac/aac-rs/third_party/hf-tokenizers/NOTICE.txt
Transaction Science 8b736713dc feat(aac first letters): abbreviation expansion on WebGPU, GPU only
abbrev.rs is first letters' engine, built like the listener: a
content-named catalogue read and kept for offline use, files downloaded one
at a time into the model store and SHA-256 checked, install / stop /
continue / remove, a first-run check (it finds sentences once), a newer
model kept only once it has run here, and other tabs followed.

- Runtime: the listener's onnxruntime-web 1.30.0 JSPI build, stored once for
  both and never removed while the other's record uses it (listen.rs now
  keeps what first letters uses, and the other way round). Without JSPI,
  it says the browser cannot run it yet. Its own worker and Hugging Face's
  @huggingface/tokenizers 0.2.0 (the latest; Apache-2.0) are vendored and
  pinned by third_party/hf-tokenizers/vendor.sh into
  vendor/hf-tokenizers-0.2.0-aac1/, so a change to the worker never makes
  anyone download the 17 MB runtime again.
- The worker is the prototype's engine: one session, every node on WebGPU,
  session.disable_cpu_ep_fallback; the weights read one tensor at a time
  from the model store (a file stored in two parts read as one); a beam
  search that keeps only words starting with the letters typed, in order,
  with what the partner said in the prompt, and slips to a neighbouring key
  forgiven when asked. A later request supersedes one in flight at its next
  model run.
- fit() is the listener's: a hardware adapter that is not refused, with
  shader-f16, and JSPI.
- Sharing the graphics chip with the sentence helper and the listener: no
  two load at once (each waits for the others' loads and first-run checks;
  the helper looks at both again if it had to wait), and where they take
  turns (every device that does not say it has 8 GB, so every iPad), each
  lets the others go first. It lets go after 10 minutes unused.

prerender-static.sh vendors it (and the runtime, when the listener is not in
the build) and ships ae/ after tools/ae/check_packs.py, or says AAC_AE=none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 00:51:00 -04:00

32 lines
1.7 KiB
Text

First letters in the AAC reference app (abbreviation expansion) turns the
first letters of words the person types into whole sentences, on their
device, with a small language model on onnxruntime-web. The app serves the
pieces of it that are not the model from its own site, under
vendor/hf-tokenizers-<version>-<revision>/, put there by
third_party/hf-tokenizers/vendor.sh. When someone downloads first letters,
the app copies these files into their model store and runs them from there,
in a worker on their device, on its graphics chip. Nothing typed is sent
anywhere.
Tokenizers.js (@huggingface/tokenizers, the version in the directory name),
by Hugging Face.
tokenizers.min.mjs: unchanged from the npm package. It turns text into the
model's tokens and back.
Licensed under the Apache License, Version 2.0: LICENSE.txt beside this
file (the package's LICENSE, verbatim).
Source: https://www.npmjs.com/package/@huggingface/tokenizers
(package.json "license": "Apache-2.0"),
https://github.com/huggingface/tokenizers.js (read 2026-10-01).
ae-worker.js is the app's own worker (worker.js beside vendor.sh), part of the
AAC reference app and under its licence (Apache-2.0). It drives the runtime
and the tokenizer; it is not part of either.
The runtime it drives, onnxruntime-web (MIT), is the one the listener uses,
vendored once, with its licence and notices, under
vendor/onnxruntime-web-<version>-<revision>/ by
third_party/onnxruntime-web/vendor.sh. The model (Qwen3 0.6B, Apache-2.0,
fine-tuned with conversations under CC BY 4.0 and Apache-2.0) is not part of
this directory and is not covered by LICENSE.txt. The app publishes it
separately, with its licences and attribution, in first letters' catalogue
(Settings > First letters).