Instructions to use graphemetech/understanding-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use graphemetech/understanding-v2 with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Uns understanding model (EmbeddingGemma, on-device)
The on-device sentence embedder of the Uns app: it reads what a person writes in a check-in (in English, Indonesian, Malay, Turkish, Bengali, Arabic, Urdu or Persian) and places it among a closed set of feelings and life situations, so the app can choose among human-reviewed verses. It produces vectors only β it does not generate text.
Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms
Use is subject to the restrictions in Section 3.2 of those terms and the Gemma Prohibited Use Policy. Copies of both are in this repository (
GEMMA_TERMS_OF_USE.md,GEMMA_PROHIBITED_USE_POLICY.md).
Modified files β notice
These files are modified from google/embeddinggemma-300m. Modifications:
- Fine-tuned on a multilingual feeling/situation taxonomy (batch semi-hard triplet loss, margin 0.5, lr 2e-5, 4 epochs; ~4,000 labelled phrases and sentences in 8 languages).
- Weight-averaged 50/50 with the original checkpoint (WiSE-FT), to keep its general and religious vocabulary.
- Converted to LiteRT (
model.tflite): the whole sentence-transformers pipeline in one graph β encoder β mean pooling β Dense 768β3072 β Dense 3072β768 β L2 β with int8 dynamic-range weights. Key/value heads are broadcast rather than copied in attention (numerically identical; works around a converter mistranslation). Parity with PyTorch: cosine β₯ 0.998. tokenizer.binis Gemma's tokenizer (tokenizer.json) re-encoded as integers (pieces, merges, added tokens); token-for-token identical on 36,081 test texts.centroids.jsonis new: the mean vector of each feeling / situation's labelled phrases.
Files
| File | What |
|---|---|
model.tflite |
int8 LiteRT model. Inputs args_0 input ids, args_1 attention mask, int32 [1,128]; output float32 [1,768], L2-normalised |
tokenizer.bin |
GTK1 binary tokenizer (format in tools/export_gemma_tokenizer.py of the Uns repo) |
centroids.json |
per-axis term codes, their unit centroids (base64 float32), and the abstention margin |
*.sig |
Ed25519 signatures (Uns release key 354c14a4β¦); the app installs nothing that fails them |
manifest.json |
sizes, sha256, sequence length, prompt |
Prompt: every input is prefixed with task: classification | query: and tokenised together with it.
Evaluation (held-out, never trained on)
| feelings top-1 (dev / v2 / v3) | situations top-1 | Islamic concepts, 8 langs | verse β topic hit@3 | |
|---|---|---|---|---|
| previous model (MiniLM, fine-tuned) | 77 / 51 / 64 | 66 / 68 / 79 | 55.5% | 34.6% |
google/embeddinggemma-300m |
71 / 54 / 60 | 60 / 59 / 72 | 88.1% | 42.5% |
| this model | 79 / 73 / 94 | 79 / 81 / 88 | 85.7% | 58.5% |
Zero unsafe serves across all three sets through the app's own retrieval and do-not-serve rules.
- Downloads last month
- 15
Model tree for graphemetech/understanding-v2
Base model
google/embeddinggemma-300m