Instructions to use e2ec-tech/XiFan-Hapife-genapp-select-gemma-4-e2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use e2ec-tech/XiFan-Hapife-genapp-select-gemma-4-e2b 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=e2ec-tech/XiFan-Hapife-genapp-select-gemma-4-e2b \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
XiFan-Hapife · Gemma 4 E2B fine-tuned for template selection
Model file for an optional on-device feature of the XiFan Family Assistant Android app (XiFan-Hapife). The app downloads it at a pinned revision and verifies size and SHA-256 before use.
This is a derivative work of google/gemma-4-E2B-it, distributed under the Apache License 2.0 (see LICENSE). It is not an official Google release.
File
| File | Size (bytes) | SHA-256 |
|---|---|---|
genapp-select-gemma.litertlm |
3,115,614,208 | e02a2d61c909f38155a8e010d46b8ebea545d60cf1884ffba88bb42b177e01fe |
Changes made to the original model
As required by section 4(b) of the Apache License 2.0, the modifications are:
- LoRA fine-tuning with PEFT (rank 8, 300 steps) on one narrow task, then merged into the weights.
- Export to the LiteRT-LM
.litertlmformat with dynamic-range quantization (4-bit weights for the transformer blocks).
The file still contains the image and audio encoders of the original model; they are not used by the app.
Intended use
- Runtime: LiteRT-LM 0.19.x on Android (CPU), devices with about 8 GB of RAM.
- One task only: from one sentence, output a small JSON object with four enumerated fields (
template,period,category,cuisine) that selects a built-in read-only page template. The app validates and repairs that output and never executes or displays free text from it.
After fine-tuning the model only outputs this JSON and is not suitable for chat or any other use.
Training data
Trained only on synthetic sentences generated from phrase templates written for this project, in Chinese, Japanese and English. No user data, chat logs or personal information were used.
Evaluation
On 90 held-out synthetic requests that share no phrasing with the training set (desktop, LiteRT-LM 0.19.2): 84 / 90 correct as produced, 85 / 90 after the app's field repair.
On a Xiaomi 11T (8 GB), LiteRT-LM 0.19.1, CPU, on an earlier 92-item test set: 84 / 92 correct, median about 8.5 s per request; the first request after loading took about 73 s, and requests took 50–70 s when little memory was available.
The numbers describe these test sets only.
Limitations
- Large (3.1 GB) and slow to load; noticeably slower when the phone is short of memory.
- Not tested on devices with less than 8 GB of RAM.
- Tested on one phone model only.
License
Apache License 2.0 — full text in LICENSE. The original model is by Google; see the Gemma 4 license page. This summary is not legal advice.
- Downloads last month
- 6