Instructions to use drax234/smartmemory-privacy-gemma with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use drax234/smartmemory-privacy-gemma with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=drax234/smartmemory-privacy-gemma \ --prompt="Write me a poem"
- LiteRT
How to use drax234/smartmemory-privacy-gemma 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
SmartMemory privacy classifier (Gemma 4 E2B, fine-tuned)
A small on-device classifier used by the SmartMemory Android app to decide, on the phone and without any network, whether a short note contains a secret (password, card number, API key, ...), sensitive personal information (health, legal, financial, intimate, children, location), or neither. It answers with one JSON object {"label": "SECRET|SENSITIVE|ORDINARY", "category": ..., "score": ...}. The app uses it so that secrets and sensitive notes are not sent to a cloud AI unasked.
This is a modified version of Google's Gemma 4 E2B instruction-tuned model: a LoRA adapter was merged into the weights and the result converted to the .litertlm format of LiteRT-LM. This file is a Model Derivative of Gemma and was modified from the original.
Files
| file | what |
|---|---|
gemma-privacy-v2.litertlm |
the merged model for LiteRT-LM (about 3.7 GB, int8 decoder) |
NOTICE |
the Gemma notice and the modification notice |
The app downloads one pinned revision of this file over Wi-Fi after the person agrees, verifies its SHA-256, and runs it locally. Nothing about a person's notes is ever sent to this repository or to Hugging Face.
Training data
Synthetic only. About 6,600 short notes in English, Hebrew and mixed text: templated notes with random fake values, and natural-looking notes written by a language model with instructions to use invented people, reserved example domains and never-issued numbers, each labelled by a second model. No real personal data, no user data and no real credentials were used. Card numbers pass the checksum but were never issued; keys are random strings with well-known prefixes.
Evaluation (held-out synthetic notes, the model's plain output)
Share of secrets flagged (answered SECRET or SENSITIVE) / ordinary notes wrongly flagged: 100 % / 0.7 % on 1,284 notes of the first test set, 100 % / 2.5 % on 389 notes written in a different style, 100 % / 5.2 % on 473 notes of an older templated set. Small counts, synthetic text, one training run per recipe: these are evidence, not guarantees. See the SmartMemory project documents for the method.
Limitations and intended use
- It is a screening aid that errs towards flagging: it wrongly flags a few ordinary notes (a few percent) so that very few secrets slip through, but it can miss a secret, especially one that is unlike its training notes. It is not a security guarantee.
- Trained on short notes (up to a few hundred characters); longer text is checked in windows.
- Languages: English and Hebrew (and mixed). Other languages are untested.
- Intended for on-device use inside SmartMemory. Using it to build surveillance or to extract private data from others is not an intended use and is prohibited by the Gemma Prohibited Use Policy.
License
Gemma is provided under and subject to the Gemma Terms of Use found at https://ai.google.dev/gemma/terms. Use of this model is also subject to the Gemma Prohibited Use Policy at https://ai.google.dev/gemma/prohibited_use_policy. Recipients of this model must be given a copy of those terms.
- Downloads last month
- -