EmbeddingGemma 2 typed decisions for decision.js (WebGPU)

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.

Files

  • 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.

Changes from the original

Made with decision.js's scripts/export-eg2.py from the original (fp32) weights:

  • the text encoder's linear weights and the token embedding quantized to 8 (or 4) bits in blocks of 32, with f16 scales; the embedding's √512 scale and the per-layer-embedding projection's 1/√512 scale folded in;
  • q / k / v and gate / up fused; the per-layer-embedding projection sliced per layer;
  • norms and the 512 β†’ 768 embedding projection in f16; the decision head (1.1M parameters) in f32;
  • the vision and audio towers left out (text only).

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.

License

Apache-2.0, as the original (see MODEL_CARD.md), built on google/embeddinggemma-2 (Apache-2.0).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Jacqkues/embeddinggemma-2-typed-decision-decisionjs

Finetuned
(2)
this model

Dataset used to train Jacqkues/embeddinggemma-2-typed-decision-decisionjs