File size: 1,883 Bytes
b431427
 
 
 
 
 
2b5ab32
b431427
2b5ab32
b431427
 
2b5ab32
b431427
 
 
 
2b5ab32
b431427
2b5ab32
 
b431427
2b5ab32
 
 
 
 
 
b431427
 
 
2b5ab32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e3e94bd
2b5ab32
 
 
 
 
4e3c0c6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
license: apache-2.0
base_model: dousery/functiongemma-mobile-actions
tags:
- litertlm
- on-device
- edge
- function-calling
- tool-use
- mobile-actions
- gemma
- unsloth
library_name: ai-edge-litert
pipeline_tag: text-generation
---

# FunctionGemma Mobile Actions — LiteRT-LM Export

LiteRT-LM (TensorFlow Lite) format of the merged FunctionGemma mobile-actions model.  
Use this for on-device / edge inference with the `ai-edge-litert` runtime.

## What's inside

- `mobile-actions_q8_ekv1024.litertlm` — quantized LiteRT-LM model (Q8, kv_cache=1024)
- `base_llm_metadata.textproto` — metadata with BOS/EOS token IDs

Base model: [`dousery/functiongemma-mobile-actions`](https://huggingface.co/dousery/functiongemma-mobile-actions) (merged LoRA + base).  

## Intended use

- Function-calling for mobile actions (create calendar events, emails, contacts, maps, Wi‑Fi, flashlight, etc.)
- On-device / edge scenarios where a LiteRT-LM (`.litertlm`) is needed.

## How to use (Python, ai-edge-litert)

pip install ai-edge-litert-nightly ai-edge-torch-nightly
import litert
from pathlib import Path

model_path = Path("mobile-actions_q8_ekv1024.litertlm")

# Load LiteRT-LM
interp = litert.Interpreter.from_file(model_path)

## Conversion details

- Source: `dousery/functiongemma-mobile-actions` (merged)
- Export: `converter.convert_to_litert` via `ai_edge_torch.generative.utilities`
- Quantization: `quantize="dynamic_int8"`
- KV cache: `kv_cache_max_len=1024`
- Prefill seq len: 256
- Export layout: `kv_cache.KV_LAYOUT_TRANSPOSED`
- Tokenizer model sourced from `unsloth/functiongemma-270m-it` (SentencePiece)

## Citation
```bibtex
@misc{functiongemma-mobile-actions-litertlm,
  title={FunctionGemma Mobile Actions — LiteRT-LM Export},
  author={dousery},
  year={2025},
  howpublished={\url{https://huggingface.co/dousery/functiongemma-mobile-actions-litertlm}}
}