danielhanchen commited on
Commit
32581f0
·
verified ·
1 Parent(s): d840801

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* 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
  tokenizer.json 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
  tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ tiny_garden.litertlm filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,3 +1,561 @@
1
- ---
2
- license: gemma
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: gemma
3
+ tags:
4
+ - gemma3
5
+ - gemma
6
+ - google
7
+ - functiongemma
8
+ pipeline_tag: text-generation
9
+ library_name: transformers
10
+ extra_gated_heading: Access Gemma on Hugging Face
11
+ extra_gated_prompt: >-
12
+ To access FunctionGemma on Hugging Face, you’re required to review and agree to
13
+ Google’s usage license. To do this, please ensure you’re logged in to Hugging
14
+ Face and click below. Requests are processed immediately.
15
+ extra_gated_button_content: Acknowledge license
16
+ ---
17
+
18
+ # FunctionGemma model card
19
+
20
+ **Model Page**: [FunctionGemma](https://ai.google.dev/gemma/docs/functiongemma)
21
+
22
+ **Resources and Technical Documentation**:
23
+
24
+ - [Responsible Generative AI Toolkit](https://ai.google.dev/responsible)
25
+ - [FunctionGemma on Kaggle](https://www.kaggle.com/models/google/functiongemma/)
26
+ - Function[Gemma on Vertex Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/functiongemma)
27
+
28
+ **Terms of Use**: [Terms](https://ai.google.dev/gemma/terms)\
29
+ **Authors**: Google DeepMind
30
+
31
+ ## Model Information
32
+
33
+ Summary description and brief definition of inputs and outputs.
34
+
35
+ ### Description
36
+
37
+ > [!Note]
38
+ > FunctionGemma is intended to be fine-tuned for your specific function-calling task, including multi-turn use cases.
39
+
40
+
41
+ FunctionGemma is a lightweight, open model from Google, built as a foundation
42
+ for creating your own specialized function calling models. FunctionGemma is not
43
+ intended for use as a direct dialogue model, and is designed to be highly
44
+ performant after further fine-tuning, as is typical of models this size. Built
45
+ on the Gemma 3 270M model and with the same research and technology used to
46
+ create the Gemini models, FunctionGemma has been trained specifically for
47
+ function calling. The model has the same architecture as Gemma 3, but uses a
48
+ different chat format. The model is well suited for text-only function calling.
49
+ The uniquely small size makes it possible to deploy in environments with limited
50
+ resources such as laptops, desktops or your own cloud infrastructure,
51
+ democratizing access to state of the art AI models and helping foster innovation
52
+ for everyone. Furthermore, akin to the base Gemma 270M, the model has been
53
+ optimized to be extremely versatile, performant on a variety of hardware in
54
+ single turn scenarios, but should be finetuned on single turn or multiturn task
55
+ specific data to achieve best accuracy in specific domains.
56
+ To demonstrate how specializing the 270M parameter model can achieve high
57
+ performance on specific agentic workflows, we have highlighted two use cases in
58
+ the
59
+ [Google AI Edge Gallery app](https://play.google.com/store/apps/details?id=com.google.ai.edge.gallery&pcampaignid=web_share).
60
+
61
+ - **Tiny Garden:** A model fine-tuned to power a voice-controlled
62
+ interactive game. It handles game logic to manage a virtual plot of land,
63
+ decomposing commands like "Plant sunflowers in the top row" and "Water the
64
+ flowers in plots 1 and 2" into app-specific functions (e.g., plant_seed,
65
+ water_plots) and coordinate targets. This demonstrates the model's capacity
66
+ to drive custom app mechanics without server connectivity.
67
+
68
+ - **Mobile Actions:** To empower developers to build their own expert
69
+ agents, we have published [a
70
+ dataset](https://huggingface.co/datasets/google/mobile-actions) and
71
+ [fine-tuning recipe](https://github.com/google-gemini/gemma-cookbook/blob/main/FunctionGemma/%5BFunctionGemma%5DFinetune_FunctionGemma_270M_for_Mobile_Actions_with_Hugging_Face.ipynb)
72
+ to demonstrate fine-tuning FunctionGemma. It translates user inputs (e.g.,
73
+ "Create a calendar event for lunch," "Turn on the flashlight") into
74
+ function calls that trigger Android OS system tools. This interactive
75
+ notebook demonstrates how to take the base FunctionGemma model and build a
76
+ "Mobile Actions" fine tune from scratch for use in the
77
+ [Google AI Edge gallery app](https://play.google.com/store/apps/details?id=com.google.ai.edge.gallery&pcampaignid=web_share).
78
+ This use case demonstrates the model's ability to act as an offline,
79
+ private agent for personal device tasks.
80
+
81
+ ### Inputs and outputs
82
+
83
+ - **Input:**
84
+ - Text string, such as a question, a prompt, or a document to be
85
+ summarized
86
+ - Total input context of 32K tokens
87
+ - **Output:**
88
+ - Generated text in response to the input, such as an answer to a
89
+ question, or a summary of a document
90
+ - Total output context up to 32K tokens per request, subtracting
91
+ the request input tokens
92
+
93
+ ### Basic Usage
94
+
95
+ The following is a code example of how to use FunctionGemma to generate a function call from a JSON definition using the Hugging Face Transformers library.
96
+
97
+ First install the dependencies:
98
+
99
+ ```sh
100
+ $ pip install torch
101
+ $ pip install transformers
102
+ ```
103
+
104
+ Then load the model and the processor using Transformers:
105
+
106
+ ```python
107
+ from transformers import AutoProcessor, AutoModelForCausalLM
108
+
109
+ processor = AutoProcessor.from_pretrained("google/functiongemma-270m-it", device_map="auto")
110
+ model = AutoModelForCausalLM.from_pretrained("google/functiongemma-270m-it", dtype="auto", device_map="auto")
111
+ ```
112
+
113
+ Define the function definition using JSON schema, then set a system instruction using the developer role. This is required to let the model know it should use the function(s) provided. Add a user query as input to the model and then generate the output. The model will then generate one or more function calls that it wants the developer to make on its behalf.
114
+
115
+ ```python
116
+ weather_function_schema = {
117
+ "type": "function",
118
+ "function": {
119
+ "name": "get_current_temperature",
120
+ "description": "Gets the current temperature for a given location.",
121
+ "parameters": {
122
+ "type": "object",
123
+ "properties": {
124
+ "location": {
125
+ "type": "string",
126
+ "description": "The city name, e.g. San Francisco",
127
+ },
128
+ },
129
+ "required": ["location"],
130
+ },
131
+ }
132
+ }
133
+
134
+ message = [
135
+ # ESSENTIAL SYSTEM PROMPT:
136
+ # This line activates the model's function calling logic.
137
+ {
138
+ "role": "developer",
139
+ "content": "You are a model that can do function calling with the following functions"
140
+ },
141
+ {
142
+ "role": "user",
143
+ "content": "What's the temperature in London?"
144
+ }
145
+ ]
146
+
147
+ inputs = processor.apply_chat_template(message, tools=[weather_function_schema], add_generation_prompt=True, return_dict=True, return_tensors="pt")
148
+
149
+ out = model.generate(**inputs.to(model.device), pad_token_id=processor.eos_token_id, max_new_tokens=128)
150
+ output = processor.decode(out[0][len(inputs["input_ids"][0]):], skip_special_tokens=True)
151
+
152
+ print(output)
153
+ # <start_function_call>call:get_current_temperature{location:<escape>London<escape>}<end_function_call>
154
+ ```
155
+
156
+ For more detailed examples see the [Gemma documentation](https://ai.google.dev/gemma/docs/functiongemma).
157
+
158
+ ## Model Data
159
+
160
+ Data used for model training and how the data was processed.
161
+
162
+ ### Training Dataset
163
+
164
+ These models were trained on a dataset of text data that includes a wide
165
+ variety of sources. The model was trained with 6T tokens. The knowledge cutoff
166
+ date for the training data was August 2024. There are the key components:
167
+
168
+ - Public Tool Definitions - Common APIs found on the web
169
+ - Tool Use Interactions - These are a mix of prompts, function calls,
170
+ function responses, and natural language responses from the model to
171
+ summarise the function call response, or request clarifications when the
172
+ prompt is ambiguous or incomplete.
173
+
174
+ ### Data Preprocessing
175
+
176
+ Here are the key data cleaning and filtering methods applied to the training
177
+ data:
178
+
179
+ - CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering
180
+ was applied at multiple stages in the data preparation process to ensure
181
+ the exclusion of harmful and illegal content.
182
+ - Sensitive Data Filtering: As part of making Gemma pre-trained models
183
+ safe and reliable, automated techniques were used to filter out certain
184
+ personal information and other sensitive data from training sets.
185
+ - Additional methods: Filtering based on content quality and safety in
186
+ line with
187
+ [our policies](https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf).
188
+
189
+ ## Implementation Information
190
+
191
+ Details about the model internals.
192
+
193
+ ### Hardware
194
+
195
+ Gemma was trained using [Tensor Processing Unit
196
+ (TPU)](https://cloud.google.com/tpu/docs/intro-to-tpu) hardware (TPUv4p, TPUv5p
197
+ and TPUv5e). Training vision-language models (VLMs) requires significant
198
+ computational power. TPUs, designed specifically for matrix operations common in
199
+ machine learning, offer several advantages in this domain:
200
+
201
+ - Performance: TPUs are specifically designed to handle the massive
202
+ computations involved in training VLMs. They can speed up training
203
+ considerably compared to CPUs.
204
+ - Memory: TPUs often come with large amounts of high-bandwidth memory,
205
+ allowing for the handling of large models and batch sizes during training.
206
+ This can lead to better model quality.
207
+ - Scalability: TPU Pods (large clusters of TPUs) provide a scalable
208
+ solution for handling the growing complexity of large foundation models.
209
+ You can distribute training across multiple TPU devices for faster and more
210
+ efficient processing.
211
+ - Cost-effectiveness: In many scenarios, TPUs can provide a more
212
+ cost-effective solution for training large models compared to CPU-based
213
+ infrastructure, especially when considering the time and resources saved
214
+ due to faster training.
215
+ - These advantages are aligned with
216
+ [Google's commitments to operate sustainably](https://sustainability.google/operating-sustainably/).
217
+
218
+ ### Software
219
+
220
+ Training was done using [JAX](https://github.com/jax-ml/jax) and
221
+ [ML Pathways](https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/).
222
+ JAX allows researchers to take advantage of the latest generation of hardware,
223
+ including TPUs, for faster and more efficient training of large models. ML
224
+ Pathways is Google's latest effort to build artificially intelligent systems
225
+ capable of generalizing across multiple tasks. This is specially suitable for
226
+ foundation models, including large language models like these ones.\
227
+ Together, JAX and ML Pathways are used as described in the [paper about the
228
+ Gemini family of models](https://goo.gle/gemma2report); *"the 'single
229
+ controller' programming model of Jax and Pathways allows a single Python process
230
+ to orchestrate the entire training run, dramatically simplifying the development
231
+ workflow."*
232
+
233
+ ## Evaluation
234
+
235
+ Model evaluation metrics and results.
236
+
237
+ ### Benchmark Results
238
+
239
+ <table>
240
+ <thead>
241
+ <tr>
242
+ <th><strong>Benchmark</strong></th>
243
+ <th><strong>n-shot</strong></th>
244
+ <th><strong>Function Gemma 270m</strong></th>
245
+ </tr>
246
+ </thead>
247
+ <tbody>
248
+ <tr>
249
+ <td>BFCL Simple</td>
250
+ <td>0-shot</td>
251
+ <td>61.6</td>
252
+ </tr>
253
+ <tr>
254
+ <td>BFCL Parallel</td>
255
+ <td>0-shot</td>
256
+ <td>63.5</td>
257
+ </tr>
258
+ <tr>
259
+ <td>BFCL Multiple</td>
260
+ <td>0-shot</td>
261
+ <td>39</td>
262
+ </tr>
263
+ <tr>
264
+ <td>BFCL Parallel Multiple</td>
265
+ <td>0-shot</td>
266
+ <td>29.5</td>
267
+ </tr>
268
+ <tr>
269
+ <td>BFCL Live Simple </td>
270
+ <td>0-shot</td>
271
+ <td>36.2</td>
272
+ </tr>
273
+ <tr>
274
+ <td>BFCL Live Parallel</td>
275
+ <td>0-shot</td>
276
+ <td>25.7</td>
277
+ </tr>
278
+ <tr>
279
+ <td>BFCL Live Multiple</td>
280
+ <td>0-shot</td>
281
+ <td>22.9</td>
282
+ </tr>
283
+ <tr>
284
+ <td>BFCL Live Parallel Multiple</td>
285
+ <td>0-shot</td>
286
+ <td>20.8</td>
287
+ </tr>
288
+ <tr>
289
+ <td>BFCL Relevance</td>
290
+ <td>0-shot</td>
291
+ <td>61.1</td>
292
+ </tr>
293
+ <tr>
294
+ <td>BFCL Irrelevance</td>
295
+ <td>0-shot</td>
296
+ <td>70.6</td>
297
+ </tr>
298
+ </tbody>
299
+ </table>
300
+
301
+ **Impact on Performance after Fine-tuning on Mobile Actions Dataset**\
302
+ To demonstrate the value of specialization for small language models, we
303
+ compared the base FunctionGemma model against the fine-tuned model using the
304
+ "Mobile Actions"
305
+ [recipe](https://github.com/google-gemini/gemma-cookbook/blob/main/FunctionGemma/%5BFunctionGemma%5DFinetune_FunctionGemma_270M_for_Mobile_Actions_with_Hugging_Face.ipynb).
306
+ Fine-tuning significantly improved the base FunctionGemma model's ability to
307
+ correctly identify and format mobile system calls.
308
+
309
+ <table>
310
+ <thead>
311
+ <tr>
312
+ <th><br>
313
+ Model</th>
314
+ <th><br>
315
+ Eval results for Mobile Actions</th>
316
+ </tr>
317
+ </thead>
318
+ <tbody>
319
+ <tr>
320
+ <td><br>
321
+ Base FunctionGemma model</td>
322
+ <td><br>
323
+ 58%</td>
324
+ </tr>
325
+ <tr>
326
+ <td><br>
327
+ Mobile Actions Fine-Tune</td>
328
+ <td><br>
329
+ 85%</td>
330
+ </tr>
331
+ </tbody>
332
+ </table>
333
+
334
+ **On-Device Performance of the Gemma 270m Fine-tuned Use Cases**\
335
+ We evaluated the fine-tuned use cases on a Samsung S25 Ultra to assess on-device
336
+ latency and memory footprint.
337
+
338
+ - **Context:** 512 prefill tokens and 32 decode tokens.
339
+ - **Hardware:** S25 Ultra CPU using LiteRT XNNPACK delegate with 4 threads.
340
+
341
+ Mobile Actions On Device Performance
342
+
343
+ <table>
344
+ <thead>
345
+ <tr>
346
+ <th><br>
347
+ Backend</th>
348
+ <th><br>
349
+ Quantization scheme</th>
350
+ <th><br>
351
+ Context length</th>
352
+ <th><br>
353
+ Prefill (tokens per second)</th>
354
+ <th><br>
355
+ Decode (tokens per second)</th>
356
+ <th><br>
357
+ Time-to-first-token (seconds)</th>
358
+ <th><br>
359
+ Model Size (MB)</th>
360
+ <th><br>
361
+ Peak RSS Memory (MB)</th>
362
+ </tr>
363
+ </thead>
364
+ <tbody>
365
+ <tr>
366
+ <td><br>
367
+ CPU</td>
368
+ <td><br>
369
+ dynamic_int8</td>
370
+ <td><br>
371
+ 1024</td>
372
+ <td><br>
373
+ 1718</td>
374
+ <td><br>
375
+ 125.9</td>
376
+ <td><br>
377
+ 0.3</td>
378
+ <td><br>
379
+ 288</td>
380
+ <td><br>
381
+ 551</td>
382
+ </tr>
383
+ </tbody>
384
+ </table>
385
+
386
+ Tiny Garden On Device Performance
387
+
388
+ <table>
389
+ <thead>
390
+ <tr>
391
+ <th><br>
392
+ Backend</th>
393
+ <th><br>
394
+ Quantization scheme</th>
395
+ <th><br>
396
+ Context length</th>
397
+ <th><br>
398
+ Prefill (tokens per second)</th>
399
+ <th><br>
400
+ Decode (tokens per second)</th>
401
+ <th><br>
402
+ Time-to-first-token (seconds)</th>
403
+ <th><br>
404
+ Model Size (MB)</th>
405
+ <th><br>
406
+ Peak RSS Memory (MB)</th>
407
+ </tr>
408
+ </thead>
409
+ <tbody>
410
+ <tr>
411
+ <td><br>
412
+ CPU</td>
413
+ <td><br>
414
+ dynamic_int8</td>
415
+ <td><br>
416
+ 1024</td>
417
+ <td><br>
418
+ 1743</td>
419
+ <td><br>
420
+ 125.7</td>
421
+ <td><br>
422
+ 0.3</td>
423
+ <td><br>
424
+ 288</td>
425
+ <td><br>
426
+ 549</td>
427
+ </tr>
428
+ </tbody>
429
+ </table>
430
+
431
+ ## Ethics and Safety
432
+
433
+ Ethics and safety evaluation approach and results.
434
+
435
+ ### Evaluation Approach
436
+
437
+ Our evaluation methods include structured evaluations and internal red-teaming
438
+ testing of relevant content policies. Red-teaming was conducted by a number of
439
+ different teams, each with different goals and human evaluation metrics. These
440
+ models were evaluated against a number of different categories relevant to
441
+ ethics and safety, including:
442
+
443
+ - **Child Safety**: Evaluation of text-to-text and image to text prompts
444
+ covering child safety policies, including child sexual abuse and exploitation.
445
+ - **Content Safety:** Evaluation of text-to-text and image to text prompts
446
+ covering safety policies including, harassment, violence and gore, and hate
447
+ speech.
448
+ - **Representational Harms**: Evaluation of text-to-text and image to text
449
+ prompts covering safety policies including bias, stereotyping, and harmful
450
+ associations or inaccuracies.
451
+
452
+ ### Evaluation Results
453
+
454
+ For all areas of safety testing, we saw major improvements in the categories of
455
+ child safety, content safety, and representational harms relative to previous
456
+ Gemma models. All testing was conducted without safety filters to evaluate the
457
+ model capabilities and behaviors. The model produced minimal policy violations,
458
+ and showed significant improvements over previous Gemma models' performance
459
+ with respect to ungrounded inferences. A limitation of our evaluations was they
460
+ included only English language prompts.
461
+
462
+ ## Usage and Limitations
463
+
464
+ These models have certain limitations that users should be aware of.
465
+
466
+ ### Intended Usage
467
+
468
+ This model is not intended for use as a direct dialogue model.\
469
+ Open Large Language Models (LLMs) have a wide range of applications across
470
+ various industries and domains. The following list of potential uses is not
471
+ comprehensive. The purpose of this list is to provide contextual information
472
+ about the possible use-cases that the model creators considered as part of model
473
+ training and development.
474
+
475
+ - Content Creation and Communication
476
+ - Text Generation: These models can be used to generate creative
477
+ text formats such as poems, scripts, code, marketing copy, and email drafts.
478
+ - Chatbots and Conversational AI: Power conversational interfaces
479
+ for customer service, virtual assistants, or interactive applications.
480
+ - Text Summarization: Generate concise summaries of a text corpus,
481
+ research papers, or reports.
482
+ - Research and Education
483
+ - Natural Language Processing (NLP) Research: These models can
484
+ serve as a foundation for researchers to experiment with NLP
485
+ techniques, develop algorithms, and contribute to the advancement of the field.
486
+ - Language Learning Tools: Support interactive language learning
487
+ experiences, aiding in grammar correction or providing writing practice.
488
+ - Knowledge Exploration: Assist researchers in exploring large
489
+ bodies of text by generating summaries or answering questions about
490
+ specific topics.
491
+
492
+ ### Limitations
493
+
494
+ - Training Data
495
+ - The quality and diversity of the training data significantly
496
+ influence the model's capabilities. Biases or gaps in the training data
497
+ can lead to limitations in the model's responses.
498
+ - The scope of the training dataset determines the subject areas
499
+ the model can handle effectively.
500
+ - Context and Task Complexity
501
+ - Models are better at tasks that can be framed with clear
502
+ prompts and instructions. Open-ended or highly complex tasks might be
503
+ challenging.
504
+ - A model's performance can be influenced by the amount of context
505
+ provided (longer context generally leads to better outputs, up to a
506
+ certain point).
507
+ - Language Ambiguity and Nuance
508
+ - Natural language is inherently complex. Models might struggle
509
+ to grasp subtle nuances, sarcasm, or figurative language.
510
+ - Factual Accuracy
511
+ - Models generate responses based on information they learned
512
+ from their training datasets, but they are not knowledge bases. They
513
+ may generate incorrect or outdated factual statements.
514
+ - Common Sense
515
+ - Models rely on statistical patterns in language. They might
516
+ lack the ability to apply common sense reasoning in certain situations.
517
+
518
+ ### Ethical Considerations and Risks
519
+
520
+ The development of large language models (LLMs) raises several ethical
521
+ concerns. In creating an open model, we have carefully considered the
522
+ following:
523
+
524
+ - Bias and Fairness
525
+ - LLMs trained on large-scale, real-world text data can reflect
526
+ socio-cultural biases embedded in the training material. These models
527
+ underwent careful scrutiny, input data pre-processing described and
528
+ posterior evaluations reported in this card.
529
+ - Misinformation and Misuse
530
+ - LLMs can be misused to generate text that is false, misleading,
531
+ or harmful.
532
+ - Guidelines are provided for responsible use with the model, see
533
+ the [Responsible Generative AI Toolkit](https://ai.google.dev/responsible).
534
+ - Transparency and Accountability:
535
+ - This model card summarizes details on the models' architecture,
536
+ capabilities, limitations, and evaluation processes.
537
+ - A responsibly developed open model offers the opportunity to
538
+ share innovation by making LLM technology accessible to developers and
539
+ researchers across the AI ecosystem.
540
+
541
+ Risks identified and mitigations:
542
+
543
+ - Perpetuation of biases: It's encouraged to perform continuous
544
+ monitoring (using evaluation metrics, human review) and the exploration of
545
+ de-biasing techniques during model training, fine-tuning, and other use cases.
546
+ - Generation of harmful content: Mechanisms and guidelines for content
547
+ safety are essential. Developers are encouraged to exercise caution and
548
+ implement appropriate content safety safeguards based on their specific
549
+ product policies and application use cases.
550
+ - Misuse for malicious purposes: Technical limitations and developer and
551
+ end-user education can help mitigate against malicious applications of
552
+ LLMs. Educational resources and reporting mechanisms for users to flag
553
+ misuse are provided. Prohibited uses of Gemma models are outlined in the
554
+ [Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy)..
555
+ - Privacy violations: Models were trained on data filtered for removal of
556
+ PII (Personally Identifiable Information). Developers are encouraged to
557
+ adhere to privacy regulations with privacy-preserving techniques.
558
+
559
+ ### Benefits
560
+
561
+ At the time of release, this family of models provides high-performance open large language model implementations designed from the ground up for Responsible AI development compared to similarly sized models.
chat_template.jinja CHANGED
@@ -140,11 +140,13 @@ declaration:{{- tool_data['function']['name'] -}}
140
  {%- endif -%}
141
  {%- set loop_messages = messages[1:] -%}
142
  {%- endif -%}
143
- {%- for tool in tools %}
144
- {{- '<start_function_declaration>' -}}
145
- {{- format_function_declaration(tool) | trim }}
146
- {{- '<end_function_declaration>' -}}
147
- {%- endfor %}
 
 
148
  {{- '<end_of_turn>\n' }}
149
  {%- endif %}
150
  {#- Loop through messages. -#}
@@ -193,8 +195,8 @@ declaration:{{- tool_data['function']['name'] -}}
193
  {# This handles string-JSON, just in case #}
194
  {{ function['arguments'] }}
195
  {%- endif %}
196
- {{- '}<end_function_call>' -}}
197
  {%- endif -%}
 
198
  {%- endfor -%}
199
  {%- if loop.last -%}
200
  {{ '<start_function_response>' }}
 
140
  {%- endif -%}
141
  {%- set loop_messages = messages[1:] -%}
142
  {%- endif -%}
143
+ {%- if tools -%}
144
+ {%- for tool in tools %}
145
+ {{- '<start_function_declaration>' -}}
146
+ {{- format_function_declaration(tool) | trim }}
147
+ {{- '<end_function_declaration>' -}}
148
+ {%- endfor %}
149
+ {%- endif -%}
150
  {{- '<end_of_turn>\n' }}
151
  {%- endif %}
152
  {#- Loop through messages. -#}
 
195
  {# This handles string-JSON, just in case #}
196
  {{ function['arguments'] }}
197
  {%- endif %}
 
198
  {%- endif -%}
199
+ {{- '}<end_function_call>' -}}
200
  {%- endfor -%}
201
  {%- if loop.last -%}
202
  {{ '<start_function_response>' }}
config.json CHANGED
@@ -43,18 +43,12 @@
43
  "pad_token_id": 0,
44
  "query_pre_attn_scalar": 256,
45
  "rms_norm_eps": 1e-06,
46
- "rope_parameters": {
47
- "full_attention": {
48
- "rope_theta": 1000000.0,
49
- "rope_type": "default"
50
- },
51
- "sliding_attention": {
52
- "rope_theta": 10000.0,
53
- "rope_type": "default"
54
- }
55
- },
56
  "sliding_window": 512,
57
- "transformers_version": "5.0.0.dev0",
58
  "use_bidirectional_attention": false,
59
  "use_cache": true,
60
  "vocab_size": 262144
 
43
  "pad_token_id": 0,
44
  "query_pre_attn_scalar": 256,
45
  "rms_norm_eps": 1e-06,
46
+ "rope_local_base_freq": 10000.0,
47
+ "rope_parameters": null,
48
+ "rope_scaling": null,
49
+ "rope_theta": 1000000.0,
 
 
 
 
 
 
50
  "sliding_window": 512,
51
+ "transformers_version": "4.57.3",
52
  "use_bidirectional_attention": false,
53
  "use_cache": true,
54
  "vocab_size": 262144
generation_config.json CHANGED
@@ -8,5 +8,5 @@
8
  ],
9
  "top_k": 64,
10
  "top_p": 0.95,
11
- "transformers_version": "5.0.0.dev0"
12
  }
 
8
  ],
9
  "top_k": 64,
10
  "top_p": 0.95,
11
+ "transformers_version": "4.57.3"
12
  }
tiny_garden.litertlm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0b243c22553d4cb8451eade37710199b33b9002c58752efc0094e0fed5ad1c2
3
+ size 288440320
tokenizer_config.json CHANGED
@@ -51346,52 +51346,6 @@
51346
  "model_max_length": 1000000000000000019884624838656,
51347
  "pad_token": "<pad>",
51348
  "padding_side": "left",
51349
- "response_schema": {
51350
- "properties": {
51351
- "content": {
51352
- "type": "string",
51353
- "x-regex": "^\\s*(?:<start_function_call>.*?<end_function_call>|<start_function_response>|<end_of_turn>|\\s+)*((?:(?!<start_function_call>|<start_function_response>|<end_of_turn>).)+)(?:<start_function_call>.*?<end_function_call>|<start_function_response>|<end_of_turn>|\\s+)*$"
51354
- },
51355
- "role": {
51356
- "const": "assistant"
51357
- },
51358
- "tool_calls": {
51359
- "items": {
51360
- "properties": {
51361
- "function": {
51362
- "properties": {
51363
- "arguments": {
51364
- "additionalProperties": {
51365
- "x-parser": "json",
51366
- "x-parser-args": {
51367
- "allow_non_json": true
51368
- }
51369
- },
51370
- "type": "object",
51371
- "x-regex-key-value": "\\{(?P<key>\\w+):(?P<value>.*)\\}"
51372
- },
51373
- "name": {
51374
- "type": "string",
51375
- "x-regex": "call:([^\\{]*)"
51376
- }
51377
- },
51378
- "type": "object",
51379
- "x-mapping-regex": {
51380
- "\\<escape\\>": "\""
51381
- }
51382
- },
51383
- "type": {
51384
- "const": "function"
51385
- }
51386
- },
51387
- "type": "object"
51388
- },
51389
- "type": "array",
51390
- "x-regex-iterator": "\\<start_function_call\\>(.*?)(?:\\<end_function_call\\>)"
51391
- }
51392
- },
51393
- "type": "object"
51394
- },
51395
  "sfr_token": "<start_function_response>",
51396
  "sp_model_kwargs": null,
51397
  "spaces_between_special_tokens": false,
 
51346
  "model_max_length": 1000000000000000019884624838656,
51347
  "pad_token": "<pad>",
51348
  "padding_side": "left",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51349
  "sfr_token": "<start_function_response>",
51350
  "sp_model_kwargs": null,
51351
  "spaces_between_special_tokens": false,