Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -11,16 +11,27 @@ tags:
|
|
| 11 |
- int4
|
| 12 |
---
|
| 13 |
|
|
|
|
|
|
|
| 14 |
# google/functiongemma-270m-it β MobileTransformers package
|
| 15 |
|
| 16 |
On-device (Android) package exported from **google/functiongemma-270m-it** with MobileTransformers.
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
## Provenance
|
| 19 |
- Base model: `google/functiongemma-270m-it`
|
| 20 |
- Selected task: `text-generation-with-past`
|
| 21 |
-
- PEFT methods: lora
|
| 22 |
- Quantization: int4
|
| 23 |
-
- Toolchain: optimum-onnx 0.1.0, transformers 4.57.6, ort-training 1.23.0+cpu
|
| 24 |
|
| 25 |
## Licenses
|
| 26 |
- Framework: not declared in this package β see the repository
|
|
@@ -28,13 +39,44 @@ On-device (Android) package exported from **google/functiongemma-270m-it** with
|
|
| 28 |
|
| 29 |
## Android runtime
|
| 30 |
- Minimum API: 28
|
| 31 |
-
- Recommended device memory (MB): None
|
| 32 |
- Required ABIs: any
|
| 33 |
|
| 34 |
## Variants
|
| 35 |
|
| 36 |
| id | EP | quant | engines | features | min API | rec. RAM (MB) |
|
| 37 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 38 |
-
| cpu-int4 | cpu | int4 | native | core, inference, train | 28 |
|
| 39 |
|
| 40 |
Default variant: `cpu-int4`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
- int4
|
| 12 |
---
|
| 13 |
|
| 14 |
+

|
| 15 |
+
|
| 16 |
# google/functiongemma-270m-it β MobileTransformers package
|
| 17 |
|
| 18 |
On-device (Android) package exported from **google/functiongemma-270m-it** with MobileTransformers.
|
| 19 |
|
| 20 |
+
## What this package can do
|
| 21 |
+
- `core` β shared files every other group needs
|
| 22 |
+
- `inference` β generate or score on device
|
| 23 |
+
- `train` β **fine-tune on device**, then merge the adapter back into the base weights
|
| 24 |
+
|
| 25 |
+
## Fine-tuning method
|
| 26 |
+
- **lora** β LoRA β low-rank adapters on the attention projections.
|
| 27 |
+
- Rank: `8`
|
| 28 |
+
- Adapted modules: `q_proj`, `v_proj`
|
| 29 |
+
|
| 30 |
## Provenance
|
| 31 |
- Base model: `google/functiongemma-270m-it`
|
| 32 |
- Selected task: `text-generation-with-past`
|
|
|
|
| 33 |
- Quantization: int4
|
| 34 |
+
- Toolchain: optimum-onnx 0.1.0, transformers 4.57.6, ort-training 1.23.0+cpu
|
| 35 |
|
| 36 |
## Licenses
|
| 37 |
- Framework: not declared in this package β see the repository
|
|
|
|
| 39 |
|
| 40 |
## Android runtime
|
| 41 |
- Minimum API: 28
|
|
|
|
| 42 |
- Required ABIs: any
|
| 43 |
|
| 44 |
## Variants
|
| 45 |
|
| 46 |
| id | EP | quant | engines | features | min API | rec. RAM (MB) |
|
| 47 |
| --- | --- | --- | --- | --- | --- | --- |
|
| 48 |
+
| cpu-int4 | cpu | int4 | native | core, inference, train | 28 | β |
|
| 49 |
|
| 50 |
Default variant: `cpu-int4`.
|
| 51 |
+
|
| 52 |
+
## Running this model
|
| 53 |
+
|
| 54 |
+
This is a **MobileTransformers package**, not a plain Hugging Face model: it is a manifest plus per-variant ONNX stages and a weight-handoff map. `transformers`, `optimum` and plain `onnxruntime` cannot load it. Use the framework:
|
| 55 |
+
|
| 56 |
+
**https://github.com/martinkorelic/mobiletransformers**
|
| 57 |
+
|
| 58 |
+
```kotlin
|
| 59 |
+
// Android β pulls, verifies and installs on first use.
|
| 60 |
+
val model = MobileTransformers.fromPretrained(
|
| 61 |
+
context = context,
|
| 62 |
+
repoId = "mobiletransformers/functiongemma-270m-it",
|
| 63 |
+
)
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
```bash
|
| 67 |
+
# Host β download and inspect the package without a device.
|
| 68 |
+
mobiletransformers pull --repo-id mobiletransformers/functiongemma-270m-it
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## Citation
|
| 72 |
+
|
| 73 |
+
If you are using this framework for your own work, please cite:
|
| 74 |
+
|
| 75 |
+
```bibtex
|
| 76 |
+
@misc{mobiletransformers2025,
|
| 77 |
+
author = {Koreli\v{c}, Martin and Pejovi{\'c}, Veljko},
|
| 78 |
+
title = {MobileTransformers: An On-Device LLM PEFT Framework for Fine-Tuning and Inference},
|
| 79 |
+
year = {2025},
|
| 80 |
+
howpublished = {\url{https://gitlab.fri.uni-lj.si/lrk/mobiletransformers}}
|
| 81 |
+
}
|
| 82 |
+
```
|