mrm8488's EmbeddingGemma 2 fine-tuned for typed decisions, converted for decision.js: typed decisions (yes/no, choice, score) over any text or JSON, in the browser on WebGPU, with no server.
Try it: jacqkues.github.io/decision/playground
import { Decision } from "decision.js";
const model = await Decision.load("https://huggingface.co/Jacqkues/embeddinggemma-2-typed-decision-decisionjs/resolve/main/"); // q8, 293 MB
// or …/resolve/main/q4/ for the 158 MB version
The model embeds the state, each question and each option separately and scores the options against the state and the question. decision.js keeps the embeddings it has computed, so once a schema has been asked, a request costs one pass over its state: about 6 ms per support ticket with 3 questions on an Apple M5 Pro.
manifest.json, weights.bin (293 MB): q8 weights in decision.js's format (d1.js/1), read with HTTP Range requests;q4/: the same with 4-bit weights (158 MB);tokenizer.json, tokenizer_config.json: the original tokenizer;reference.json: the original model's probabilities on decision.js's parity requests;MODEL_CARD.md: the original model card.Made with decision.js's scripts/export-eg2.py from the original (fp32) weights:
On decision.js's parity set it gives the same answer as the original fp32 model on 54 / 54 questions (q8), with embeddings at cosine 1.00000. On the test split of LocalLLaMA/typed-decisions (2,000 decisions) it scores 0.761 in q8 and 0.752 in q4, against 0.764 reported for the original.
Apache-2.0, as the original (see MODEL_CARD.md), built on google/embeddinggemma-2 (Apache-2.0).
weights.bin 279 MiBq4/weights.bin 150 MiB