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:

  1. LoRA fine-tuning with PEFT (rank 8, 300 steps) on one narrow task, then merged into the weights.
  2. Export to the LiteRT-LM .litertlm format 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
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for e2ec-tech/XiFan-Hapife-genapp-select-gemma-4-e2b

Finetuned
(544)
this model