Text Generation
LiteRT-LM
English
functiongemma
gemma3
litertlm
on-device
function-calling
home-automation
voice-assistant
android
Instructions to use Feleir/privateassistant-functiongemma-home with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use Feleir/privateassistant-functiongemma-home 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=Feleir/privateassistant-functiongemma-home \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
FunctionGemma home commands v6 (int8 LiteRT-LM, KV 1,024, prefill 32/64/128/256)
Browse files- .gitattributes +1 -0
- GEMMA_TERMS.txt +238 -0
- NOTICE +6 -0
- README.md +173 -0
- SHA256SUMS +1 -0
- functiongemma-home_q8_ekv1024.litertlm +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
functiongemma-home_q8_ekv1024.litertlm filter=lfs diff=lfs merge=lfs -text
|
GEMMA_TERMS.txt
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copy of the Gemma Terms of Use, as published at https://gemma.ai/resources/terms/
|
| 2 |
+
(https://ai.google.dev/gemma/terms redirects there). Retrieved 29 November 2026; the page says
|
| 3 |
+
"Last modified: April 1, 2026". Converted from the page's HTML to plain text; the wording is unchanged.
|
| 4 |
+
Section 3.1 of these terms requires a copy to accompany every distribution of a Model Derivative.
|
| 5 |
+
Check the page for a newer version before each upload (finetune/publish_hf.py prints this reminder).
|
| 6 |
+
|
| 7 |
+
--------------------------------------------------------------------------------
|
| 8 |
+
|
| 9 |
+
Gemma Terms of Use
|
| 10 |
+
|
| 11 |
+
The terms below apply to Gemma models listed in the Appendix at bottom of this page. For Gemma 4 terms, see the Gemma 4 license.
|
| 12 |
+
|
| 13 |
+
Last modified: April 1, 2026
|
| 14 |
+
|
| 15 |
+
By using, reproducing, modifying, distributing, performing or displaying any
|
| 16 |
+
portion or element of Gemma, Model Derivatives including via any Hosted Service,
|
| 17 |
+
(each as defined below) (collectively, the "Gemma Services") or otherwise
|
| 18 |
+
accepting the terms of this Agreement, you agree to be bound by this Agreement.
|
| 19 |
+
|
| 20 |
+
Section 1: DEFINITIONS
|
| 21 |
+
|
| 22 |
+
1.1 Definitions
|
| 23 |
+
|
| 24 |
+
(a) "Agreement " or "Gemma Terms of Use" means these terms and conditions
|
| 25 |
+
that govern the use, reproduction, Distribution or modification of the Gemma
|
| 26 |
+
Services and any terms and conditions incorporated by reference.
|
| 27 |
+
|
| 28 |
+
(b) "Distribution " or "Distribute " means any transmission, publication,
|
| 29 |
+
or other sharing of Gemma or Model Derivatives to a third party, including by
|
| 30 |
+
providing or making Gemma or its functionality available as a hosted service via
|
| 31 |
+
API, web access, or any other electronic or remote means ("Hosted Service").
|
| 32 |
+
|
| 33 |
+
(c) "Gemma " means the set of machine learning language models, trained model
|
| 34 |
+
weights and parameters identified in the Appendix,
|
| 35 |
+
regardless of the source that you obtained it from.
|
| 36 |
+
|
| 37 |
+
(d) "Google" means Google LLC.
|
| 38 |
+
|
| 39 |
+
(e) "Model Derivatives" means all (i) modifications to Gemma, (ii) works based
|
| 40 |
+
on Gemma, or (iii) any other machine learning model which is created by transfer
|
| 41 |
+
of patterns of the weights, parameters, operations, or Output of Gemma, to that
|
| 42 |
+
model in order to cause that model to perform similarly to Gemma, including
|
| 43 |
+
distillation methods that use intermediate data representations or methods based
|
| 44 |
+
on the generation of synthetic data Outputs by Gemma for training that model.
|
| 45 |
+
For clarity, Outputs are not deemed Model Derivatives.
|
| 46 |
+
|
| 47 |
+
(f) "Output" means the information content output of Gemma or a Model
|
| 48 |
+
Derivative that results from operating or otherwise using Gemma or the Model
|
| 49 |
+
Derivative, including via a Hosted Service.
|
| 50 |
+
|
| 51 |
+
1.2
|
| 52 |
+
|
| 53 |
+
As used in this Agreement, "including " means
|
| 54 |
+
"including without limitation".
|
| 55 |
+
|
| 56 |
+
Section 2: ELIGIBILITY AND USAGE
|
| 57 |
+
|
| 58 |
+
2.1 Eligibility
|
| 59 |
+
|
| 60 |
+
You represent and warrant that you have the legal capacity to enter into this
|
| 61 |
+
Agreement (including being of sufficient age of consent). If you are accessing
|
| 62 |
+
or using any of the Gemma Services for or on behalf of a legal entity, (a) you
|
| 63 |
+
are entering into this Agreement on behalf of yourself and that legal entity,
|
| 64 |
+
(b) you represent and warrant that you have the authority to act on behalf of
|
| 65 |
+
and bind that entity to this Agreement and (c) references to "you " or
|
| 66 |
+
"your" in the remainder of this Agreement refers to both you (as an
|
| 67 |
+
individual) and that entity.
|
| 68 |
+
|
| 69 |
+
2.2 Use
|
| 70 |
+
|
| 71 |
+
You may use, reproduce, modify, Distribute, perform or display any of the Gemma
|
| 72 |
+
Services only in accordance with the terms of this Agreement, and must not
|
| 73 |
+
violate (or encourage or permit anyone else to violate) any term of this
|
| 74 |
+
Agreement.
|
| 75 |
+
|
| 76 |
+
Section 3: DISTRIBUTION AND RESTRICTIONS
|
| 77 |
+
|
| 78 |
+
3.1 Distribution and Redistribution
|
| 79 |
+
|
| 80 |
+
You may reproduce or Distribute copies of Gemma or Model Derivatives if you meet
|
| 81 |
+
all of the following conditions:
|
| 82 |
+
|
| 83 |
+
- You must include the use restrictions referenced in Section 3.2 as an enforceable provision in any agreement (e.g., license agreement, terms of use, etc.) governing the use and/or distribution of Gemma or Model Derivatives and you must provide notice to subsequent users you Distribute to that Gemma or Model Derivatives are subject to the use restrictions in Section 3.2.
|
| 84 |
+
|
| 85 |
+
- You must provide all third party recipients of Gemma or Model Derivatives a copy of this Agreement.
|
| 86 |
+
|
| 87 |
+
- You must cause any modified files to carry prominent notices stating that you modified the files.
|
| 88 |
+
|
| 89 |
+
- All Distributions (other than through a Hosted Service) must be accompanied by a "Notice " text file that contains the following notice: "Gemma is provided under and subject to the Gemma Terms of Use found at gemma.ai/resources/terms".
|
| 90 |
+
|
| 91 |
+
You may add your own intellectual property statement to your modifications and,
|
| 92 |
+
except as set forth in this Section, may provide additional or different terms
|
| 93 |
+
and conditions for use, reproduction, or Distribution of your modifications, or
|
| 94 |
+
for any such Model Derivatives as a whole, provided your use, reproduction,
|
| 95 |
+
modification, Distribution, performance, and display of Gemma otherwise complies
|
| 96 |
+
with the terms and conditions of this Agreement. Any additional or different
|
| 97 |
+
terms and conditions you impose must not conflict with the terms of this
|
| 98 |
+
Agreement.
|
| 99 |
+
|
| 100 |
+
3.2 Use Restrictions
|
| 101 |
+
|
| 102 |
+
You must not use any of the Gemma Services:
|
| 103 |
+
|
| 104 |
+
- for the restricted uses set forth in the Gemma Prohibited Use Policy at gemma.ai/resources/prohibited_use_policy ("Prohibited Use Policy"), which is hereby incorporated by reference into this Agreement; or
|
| 105 |
+
|
| 106 |
+
- in violation of applicable laws and regulations.
|
| 107 |
+
|
| 108 |
+
To the maximum extent permitted by law, Google reserves the right to restrict
|
| 109 |
+
(remotely or otherwise) usage of any of the Gemma Services that Google
|
| 110 |
+
reasonably believes are in violation of this Agreement.
|
| 111 |
+
|
| 112 |
+
3.3 Generated Output
|
| 113 |
+
|
| 114 |
+
Google claims no rights in Outputs you generate using Gemma. You and your users
|
| 115 |
+
are solely responsible for Outputs and their subsequent uses.
|
| 116 |
+
|
| 117 |
+
Section 4: ADDITIONAL PROVISIONS
|
| 118 |
+
|
| 119 |
+
4.1 Updates
|
| 120 |
+
|
| 121 |
+
Google may update Gemma from time to time.
|
| 122 |
+
|
| 123 |
+
4.2 Trademarks
|
| 124 |
+
|
| 125 |
+
Nothing in this Agreement grants you any rights to use Google's trademarks,
|
| 126 |
+
trade names, logos or to otherwise suggest endorsement or misrepresent the
|
| 127 |
+
relationship between you and Google. Google reserves any rights not expressly
|
| 128 |
+
granted herein.
|
| 129 |
+
|
| 130 |
+
4.3 DISCLAIMER OF WARRANTY
|
| 131 |
+
|
| 132 |
+
UNLESS REQUIRED BY APPLICABLE LAW, THE GEMMA SERVICES, AND OUTPUTS, ARE PROVIDED
|
| 133 |
+
ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
|
| 134 |
+
EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OR CONDITIONS OF TITLE,
|
| 135 |
+
NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE
|
| 136 |
+
SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING,
|
| 137 |
+
MODIFYING, PERFORMING, DISPLAYING OR DISTRIBUTING ANY OF THE GEMMA SERVICES
|
| 138 |
+
OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED WITH YOUR USE OR DISTRIBUTION
|
| 139 |
+
OF ANY OF THE GEMMA SERVICES OR OUTPUTS AND YOUR EXERCISE OF RIGHTS AND
|
| 140 |
+
PERMISSIONS UNDER THIS AGREEMENT.
|
| 141 |
+
|
| 142 |
+
4.4 LIMITATION OF LIABILITY
|
| 143 |
+
|
| 144 |
+
TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO
|
| 145 |
+
LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY,
|
| 146 |
+
CONTRACT, OR OTHERWISE, UNLESS REQUIRED BY APPLICABLE LAW, SHALL GOOGLE OR ITS
|
| 147 |
+
AFFILIATES BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT,
|
| 148 |
+
SPECIAL, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR LOST
|
| 149 |
+
PROFITS OF ANY KIND ARISING FROM THIS AGREEMENT OR RELATED TO, ANY OF THE GEMMA
|
| 150 |
+
SERVICES OR OUTPUTS EVEN IF GOOGLE OR ITS AFFILIATES HAVE BEEN ADVISED OF THE
|
| 151 |
+
POSSIBILITY OF SUCH DAMAGES.
|
| 152 |
+
|
| 153 |
+
4.5 Term, Termination, and Survival
|
| 154 |
+
|
| 155 |
+
The term of this Agreement will commence upon your acceptance of this Agreement
|
| 156 |
+
(including acceptance by your use, modification, or Distribution, reproduction,
|
| 157 |
+
performance or display of any portion or element of the Gemma Services) and will
|
| 158 |
+
continue in full force and effect until terminated in accordance with the terms
|
| 159 |
+
of this Agreement. Google may terminate this Agreement if you are in breach of
|
| 160 |
+
any term of this Agreement. Upon termination of this Agreement, you must delete
|
| 161 |
+
and cease use and Distribution of all copies of Gemma and Model Derivatives in
|
| 162 |
+
your possession or control. Sections 1, 2.1, 3.3, 4.2 to 4.9 shall survive the
|
| 163 |
+
termination of this Agreement.
|
| 164 |
+
|
| 165 |
+
4.6 Governing Law and Jurisdiction
|
| 166 |
+
|
| 167 |
+
This Agreement will be governed by the laws of the State of California without
|
| 168 |
+
regard to choice of law principles. The UN Convention on Contracts for the
|
| 169 |
+
International Sale of Goods does not apply to this Agreement. The state and
|
| 170 |
+
federal courts of Santa Clara County, California shall have exclusive
|
| 171 |
+
jurisdiction of any dispute arising out of this Agreement.
|
| 172 |
+
|
| 173 |
+
4.7 Severability
|
| 174 |
+
|
| 175 |
+
If any provision of this Agreement is held to be invalid, illegal or
|
| 176 |
+
unenforceable, the remaining provisions shall be unaffected thereby and remain
|
| 177 |
+
valid as if such provision had not been set forth herein.
|
| 178 |
+
|
| 179 |
+
4.8 Entire Agreement
|
| 180 |
+
|
| 181 |
+
This Agreement states all the terms agreed between the parties and supersedes
|
| 182 |
+
all other agreements between the parties as of the date of acceptance relating
|
| 183 |
+
to its subject matter.
|
| 184 |
+
|
| 185 |
+
4.9 No Waiver
|
| 186 |
+
|
| 187 |
+
Google will not be treated as having waived any rights by not exercising (or
|
| 188 |
+
delaying the exercise of) any rights under this Agreement.
|
| 189 |
+
|
| 190 |
+
Appendix
|
| 191 |
+
|
| 192 |
+
- Gemma 1
|
| 193 |
+
|
| 194 |
+
- Gemma 1.1
|
| 195 |
+
|
| 196 |
+
- Gemma 2
|
| 197 |
+
|
| 198 |
+
- Gemma 3
|
| 199 |
+
|
| 200 |
+
- Gemma 3n
|
| 201 |
+
|
| 202 |
+
- FunctionGemma
|
| 203 |
+
|
| 204 |
+
- EmbeddingGemma
|
| 205 |
+
|
| 206 |
+
- PaliGemma
|
| 207 |
+
|
| 208 |
+
- PaliGemma 2
|
| 209 |
+
|
| 210 |
+
- ShieldGemma
|
| 211 |
+
|
| 212 |
+
- ShieldGemma 2
|
| 213 |
+
|
| 214 |
+
- CodeGemma
|
| 215 |
+
|
| 216 |
+
- CodeGemma 1.1
|
| 217 |
+
|
| 218 |
+
- Gemma 2 JPN
|
| 219 |
+
|
| 220 |
+
- DataGemma RIG
|
| 221 |
+
|
| 222 |
+
- DataGemma RAG
|
| 223 |
+
|
| 224 |
+
- RecurrentGemma
|
| 225 |
+
|
| 226 |
+
- Gemma Scope
|
| 227 |
+
|
| 228 |
+
- Gemma-APS
|
| 229 |
+
|
| 230 |
+
- T5Gemma
|
| 231 |
+
|
| 232 |
+
- VaultGemma
|
| 233 |
+
|
| 234 |
+
- FunctionGemma
|
| 235 |
+
|
| 236 |
+
- T5Gemma 2
|
| 237 |
+
|
| 238 |
+
- TranslateGemma
|
NOTICE
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Gemma is provided under and subject to the Gemma Terms of Use found at gemma.ai/resources/terms
|
| 2 |
+
|
| 3 |
+
functiongemma-home_q8_ekv1024.litertlm is a modified version of Google's FunctionGemma 270M
|
| 4 |
+
(google/functiongemma-270m-it): fine-tuned and converted to LiteRT-LM int8 by the PrivateAssistant project.
|
| 5 |
+
Its use is subject to the use restrictions in section 3.2 of the Gemma Terms of Use (GEMMA_TERMS.txt) and the
|
| 6 |
+
Gemma Prohibited Use Policy (gemma.ai/resources/prohibited_use_policy).
|
README.md
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
license_name: gemma-terms-of-use
|
| 4 |
+
license_link: https://gemma.ai/resources/terms/
|
| 5 |
+
base_model: google/functiongemma-270m-it
|
| 6 |
+
base_model_relation: finetune
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
tags:
|
| 11 |
+
- functiongemma
|
| 12 |
+
- gemma3
|
| 13 |
+
- litert-lm
|
| 14 |
+
- litertlm
|
| 15 |
+
- on-device
|
| 16 |
+
- function-calling
|
| 17 |
+
- home-automation
|
| 18 |
+
- voice-assistant
|
| 19 |
+
- android
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# PrivateAssistant FunctionGemma home commands (v6, int8 LiteRT-LM)
|
| 23 |
+
|
| 24 |
+
**This is a modified version of Google's FunctionGemma 270M.** It was fully fine-tuned (the tied embedding stayed
|
| 25 |
+
frozen) by the PrivateAssistant project to turn a spoken home request into short command lines for an Android
|
| 26 |
+
kitchen-tablet voice assistant that runs entirely on the device. It is the assistant's "command tier": it gets the
|
| 27 |
+
requests the small command model in front of it does not handle.
|
| 28 |
+
|
| 29 |
+
> **Gemma is provided under and subject to the Gemma Terms of Use found at gemma.ai/resources/terms.**
|
| 30 |
+
> This model is a Model Derivative of Gemma. Using it means agreeing to the
|
| 31 |
+
> [Gemma Terms of Use](https://gemma.ai/resources/terms/) (a copy is in this repository as `GEMMA_TERMS.txt`), and
|
| 32 |
+
> it **must not be used for the restricted uses in the
|
| 33 |
+
> [Gemma Prohibited Use Policy](https://gemma.ai/resources/prohibited_use_policy)** (section 3.2 of the terms), nor in
|
| 34 |
+
> violation of applicable laws and regulations. Anyone who passes this model on must pass these restrictions on too.
|
| 35 |
+
|
| 36 |
+
- **Source code, training scripts and evaluation:** https://github.com/feleir/privateassistant (Apache-2.0); `finetune/README.md` has every command.
|
| 37 |
+
- **Round:** v6 (training data v6), 29 November 2026.
|
| 38 |
+
|
| 39 |
+
## Files
|
| 40 |
+
|
| 41 |
+
| File | Bytes | SHA-256 | Notes |
|
| 42 |
+
|---|---|---|---|
|
| 43 |
+
| `functiongemma-home_q8_ekv1024.litertlm` | 300,822,656 | `ca91e6171e59b91891ca61cae94a1eb647ba3f3d85f95066a36e83cd7c1ac513` | int8, KV cache 1,024, prefill signatures 32/64/128/256. The file the app pins (`ModelCatalog.COMMAND`) |
|
| 44 |
+
| `GEMMA_TERMS.txt`, `NOTICE` | | | the copy of the terms and the notice the Gemma Terms of Use require |
|
| 45 |
+
| `SHA256SUMS` | | | the hashes above |
|
| 46 |
+
|
| 47 |
+
The file runs with [LiteRT-LM](https://github.com/google-ai-edge/LiteRT-LM) (the app uses 0.19.1, CPU). It carries
|
| 48 |
+
no Jinja template: LiteRT-LM's built-in FunctionGemma formatter renders the prompt below.
|
| 49 |
+
|
| 50 |
+
## Intended use
|
| 51 |
+
|
| 52 |
+
- Turning one request to a home voice assistant (lights, rooms, scenes, a TV and its apps, routines, timers, alarms,
|
| 53 |
+
reminders, shopping and to-do lists, weather, time, news, kitchen conversions, cooking times, food-safety facts)
|
| 54 |
+
into calls of that assistant's own tools, or deciding that nothing should be done, that the user should be asked,
|
| 55 |
+
or that the request is general chat.
|
| 56 |
+
- On-device use inside an application that **checks every line** against its tool schemas and can veto an action,
|
| 57 |
+
as the PrivateAssistant app does (`CompactCalls`, `ActionVeto`). The model's lines are suggestions to validate, not
|
| 58 |
+
commands to execute blindly.
|
| 59 |
+
|
| 60 |
+
**Out of scope:** general chat or answering questions from its own knowledge (it answers `chat` and the app looks the
|
| 61 |
+
question up or declines), languages other than English, homes or tools other than the ones in its prompt format,
|
| 62 |
+
safety-critical control (locks, heating, medical or security devices), and anything the Gemma Prohibited Use Policy
|
| 63 |
+
restricts.
|
| 64 |
+
|
| 65 |
+
## Prompt and output format
|
| 66 |
+
|
| 67 |
+
The prompt is the app's short prompt (`CompactFormat.shortPrompt`): a `developer` turn with one fixed first line and
|
| 68 |
+
the home's names, then the request with the current time. No tool declarations are sent.
|
| 69 |
+
|
| 70 |
+
```
|
| 71 |
+
<bos><start_of_turn>developer
|
| 72 |
+
Home commands: answer with command lines (tool key=value), or none, ask(question) or chat.
|
| 73 |
+
Lights: Sofa Globe, Leo's Room Cabinet Lights, Island Arc Lamp, Living Room Bulb
|
| 74 |
+
Light groups: Accent Lights
|
| 75 |
+
Rooms: Leo's Room, Living Room
|
| 76 |
+
Scenes: Away, Morning, Cosy Evening, Good Night
|
| 77 |
+
There is one TV.
|
| 78 |
+
TV apps: Netflix, Crunchyroll, BBC iPlayer, Tubi
|
| 79 |
+
Routines: Goodnight, Good morning, Lights at sunset, Wake-up light, Coming Home, Story Time<end_of_turn>
|
| 80 |
+
<start_of_turn>user
|
| 81 |
+
Now: Wednesday 14 October 2026, 08:24
|
| 82 |
+
Request: light up the lights in the living room<end_of_turn>
|
| 83 |
+
<start_of_turn>model
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Answer: `control_lights target="Living Room" action=on<end_of_turn>`
|
| 87 |
+
|
| 88 |
+
- One `tool key=value` line per call; or `none` (do nothing), `ask(question)` (ask the user back), `chat` (a general
|
| 89 |
+
question) or `reply` (an acknowledgement such as "thanks").
|
| 90 |
+
- Tools it was trained on: `control_lights`, `activate_scene`, `run_routine`, `control_tv`, `open_tv_app`, `timer`,
|
| 91 |
+
`alarm`, `reminder`, `lists`, `home_status`, `get_weather`, `get_time`, `get_news`, `convert_units`,
|
| 92 |
+
`cooking_time`, `food_safety`. Their schemas are in the source repository (`core/`); the parser and writer of the
|
| 93 |
+
lines are `CompactCalls` and `CompactFormat`.
|
| 94 |
+
- Earlier turns of a conversation come as an `Earlier in this conversation:` block before the request.
|
| 95 |
+
- The app samples at temperature 0.3, at most 128 tokens an answer.
|
| 96 |
+
|
| 97 |
+
## Training data
|
| 98 |
+
|
| 99 |
+
**Synthetic only.** 24,000 training and 1,500 dev requests generated by the project's own code
|
| 100 |
+
(`llmeval/.../TrainingData.kt`, run by `finetune/generate_data.sh --format compact`, seeds 1 and 2) on randomly
|
| 101 |
+
generated homes: random room, light, group, scene, app and routine names from word lists in the code, requests from
|
| 102 |
+
phrase templates (`PhrasesEn.kt`), and targets written by the app's own `CompactFormat.write` (the inverse of the
|
| 103 |
+
parser, round-trip tested over every tool). 68 kinds of request, among them lights on/off, levels, relative changes,
|
| 104 |
+
"everything except", follow-ups, corrections, negations and remarks that ask for nothing, routines and bedtime or
|
| 105 |
+
morning greetings, scenes, the TV and its apps, timers, alarms, reminders, lists, unit conversions, cooking times,
|
| 106 |
+
food safety, missing names (a question back) and general questions (`chat`).
|
| 107 |
+
|
| 108 |
+
- **Held out:** every built-in evaluation template (any generated request that matches one, with any names, is
|
| 109 |
+
dropped: 2,368 dropped), all five blind sets and a TV-names set, both as requests and as earlier turns (114 more
|
| 110 |
+
dropped). A check after generating found no request or earlier turn equal to a blind sentence.
|
| 111 |
+
- **No personal data:** no recordings, no transcripts of real use, no real home's names or device lists, no
|
| 112 |
+
household data of any kind. The data was generated on the developer's machine from code and word lists alone.
|
| 113 |
+
- No text in the data was written by Gemma or any other model.
|
| 114 |
+
|
| 115 |
+
## Training procedure
|
| 116 |
+
|
| 117 |
+
`finetune/train.py` (transformers 5.24, torch 2.10, MPS on an Apple M2): full fine-tune of the 100M non-embedding
|
| 118 |
+
weights with the 262k-token tied embedding frozen; float32; AdamW, lr 3e-5, cosine schedule; batch 2 × gradient
|
| 119 |
+
accumulation 16; one epoch, 750 steps (2 h 7 min); loss on the model turn only; eager attention; seed 1. Converted
|
| 120 |
+
with `finetune/convert_functiongemma.py` (litert-torch 0.10.0, Google's FunctionGemma conversion: int8, KV cache
|
| 121 |
+
1,024, four prefill signatures).
|
| 122 |
+
|
| 123 |
+
Differences from Google's "Finetune FunctionGemma 270M for Mobile Actions" recipe: frozen embedding, float32, lr 3e-5
|
| 124 |
+
instead of 1e-5, a new output format (compact lines instead of native tool calls), and four prefill signatures (a
|
| 125 |
+
35-token request no longer pays for a 256-token prefill).
|
| 126 |
+
|
| 127 |
+
## Evaluation
|
| 128 |
+
|
| 129 |
+
Scored with the project's `llmeval` harness on the Mac (LiteRT-LM, the same file, temperature 0.3). A **wrong action**
|
| 130 |
+
is a call whose effect on the simulated home is not acceptable. "Whole stack" puts the project's command model
|
| 131 |
+
(iteration 13) in front, as in the app; "model alone" sends every case to this model.
|
| 132 |
+
|
| 133 |
+
| Right / wrong actions / rest | Previous file (v4) | **This file (v6 int8)** |
|
| 134 |
+
|---|---|---|
|
| 135 |
+
| Built-in cases (604), model alone | 537 / 4 / 63 | **554 / 1 / 49** |
|
| 136 |
+
| Built-in cases (604), whole stack | 580 / 1 / 23 | **595 / 0 / 9** |
|
| 137 |
+
| Blind set 5 (215), whole stack, first use | 156 / 23 / 36 | **177 / 18 / 20** |
|
| 138 |
+
| Blind set 2 (154), whole stack | 134 / 6 / 14 | 138 / 6 / 10 |
|
| 139 |
+
| Blind set 3 (197), whole stack | 162 / 6 / 29 | 160 / 6 / 31 |
|
| 140 |
+
| Blind set 4 (208), whole stack | 161 / 11 / 36 | 179 / 9 / 20 |
|
| 141 |
+
| Dev split v6 (1,500), exact match | 89.8% | 96.7% |
|
| 142 |
+
|
| 143 |
+
- **Blind sets** are frozen case files with their own homes, written without seeing the prompts, the generator or
|
| 144 |
+
the other sets; only totals are read. 36% of blind set 5's cases expect nothing to happen or a question back.
|
| 145 |
+
- On blind set 5, 14 bedtime cases expect nothing although the scorer's home has a Goodnight routine; the project
|
| 146 |
+
decided afterwards that a goodnight should run that routine, so some of the 18 "wrong actions" there are the wanted
|
| 147 |
+
answer.
|
| 148 |
+
- **Speed:** the previous file (same size and layout) took 0.5 s median per request on an MT8189 tablet (2× A78 +
|
| 149 |
+
6× A55, CPU), load 0.5 s, process RSS about 1.9 GB with the rest of the app. This file's own tablet run is pending.
|
| 150 |
+
|
| 151 |
+
## Limitations
|
| 152 |
+
|
| 153 |
+
- English only, and only the prompt format above. Other wordings of the developer turn were not trained.
|
| 154 |
+
- Greetings in a home without a matching routine sometimes run another routine or invent one
|
| 155 |
+
(`run_routine name=sleep`).
|
| 156 |
+
- Refused wishes with a colour word ("she'd like the bedroom a warmer white but it's fine as it is") can be acted on.
|
| 157 |
+
- "undo" with nothing before it was once answered with the TV's rewind key; some reminder and list wordings slip
|
| 158 |
+
when the model is used alone.
|
| 159 |
+
- Very large homes: the longest conversation measured needed 437 tokens; the KV cache is 1,024.
|
| 160 |
+
- Sampling is on in the app, so one wrong action either way on a set is within a re-run's noise.
|
| 161 |
+
- It has the base model's limitations and biases; it was not evaluated for anything beyond home commands.
|
| 162 |
+
|
| 163 |
+
## Licence
|
| 164 |
+
|
| 165 |
+
The weights are a Model Derivative of FunctionGemma and are distributed under the
|
| 166 |
+
[Gemma Terms of Use](https://gemma.ai/resources/terms/) (`license: gemma`), including the use restrictions of its
|
| 167 |
+
section 3.2 and the [Prohibited Use Policy](https://gemma.ai/resources/prohibited_use_policy). The project's code
|
| 168 |
+
(training, conversion, evaluation, the app) is Apache-2.0 and is not part of this repository.
|
| 169 |
+
|
| 170 |
+
## Citation
|
| 171 |
+
|
| 172 |
+
If you use this model, please cite FunctionGemma / Gemma 3 as Google asks on the
|
| 173 |
+
[base model's card](https://huggingface.co/google/functiongemma-270m-it), and link the source repository above.
|
SHA256SUMS
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
ca91e6171e59b91891ca61cae94a1eb647ba3f3d85f95066a36e83cd7c1ac513 functiongemma-home_q8_ekv1024.litertlm
|
functiongemma-home_q8_ekv1024.litertlm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca91e6171e59b91891ca61cae94a1eb647ba3f3d85f95066a36e83cd7c1ac513
|
| 3 |
+
size 300822656
|