Text Generation
Transformers
Safetensors
gemma3_text
gemma3
gemma
google
functiongemma
heretic
uncensored
decensored
abliterated
conversational
text-generation-inference
Run this model with HF Jobs
Run Roman0/functiongemma-270m-it-heretic on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Roman0/functiongemma-270m-it-heretic. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Roman0/functiongemma-270m-it-heretic on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Roman0/functiongemma-270m-it-heretic. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Roman0/functiongemma-270m-it-heretic. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Roman0/functiongemma-270m-it-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Roman0/functiongemma-270m-it-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Roman0/functiongemma-270m-it-heretic") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Roman0/functiongemma-270m-it-heretic") model = AutoModelForCausalLM.from_pretrained("Roman0/functiongemma-270m-it-heretic", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Roman0/functiongemma-270m-it-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Roman0/functiongemma-270m-it-heretic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Roman0/functiongemma-270m-it-heretic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Roman0/functiongemma-270m-it-heretic
- SGLang
How to use Roman0/functiongemma-270m-it-heretic with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Roman0/functiongemma-270m-it-heretic" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Roman0/functiongemma-270m-it-heretic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Roman0/functiongemma-270m-it-heretic" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Roman0/functiongemma-270m-it-heretic", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Roman0/functiongemma-270m-it-heretic with Docker Model Runner:
docker model run hf.co/Roman0/functiongemma-270m-it-heretic
Upload README.md with huggingface_hub
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199---library_name: transformerstags: []---# Model Card for Model ID<!-- Provide a quick summary of what the model is/does. -->## Model Details### Model Description<!-- Provide a longer summary of what this model is. -->This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.- **Developed by:** [More Information Needed]- **Funded by [optional]:** [More Information Needed]- **Shared by [optional]:** [More Information Needed]- **Model type:** [More Information Needed]- **Language(s) (NLP):** [More Information Needed]- **License:** [More Information Needed]- **Finetuned from model [optional]:** [More Information Needed]### Model Sources [optional]<!-- Provide the basic links for the model. -->- **Repository:** [More Information Needed]- **Paper [optional]:** [More Information Needed]- **Demo [optional]:** [More Information Needed]## Uses<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->### Direct Use<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->[More Information Needed]### Downstream Use [optional]<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->[More Information Needed]### Out-of-Scope Use<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->[More Information Needed]## Bias, Risks, and Limitations<!-- This section is meant to convey both technical and sociotechnical limitations. -->[More Information Needed]### Recommendations<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.## How to Get Started with the ModelUse the code below to get started with the model.[More Information Needed]## Training Details### Training Data<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->[More Information Needed]### Training Procedure<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->#### Preprocessing [optional][More Information Needed]#### Training Hyperparameters- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->#### Speeds, Sizes, Times [optional]<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->[More Information Needed]## Evaluation<!-- This section describes the evaluation protocols and provides the results. -->### Testing Data, Factors & Metrics#### Testing Data<!-- This should link to a Dataset Card if possible. -->[More Information Needed]#### Factors<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->[More Information Needed]#### Metrics<!-- These are the evaluation metrics being used, ideally with a description of why. -->[More Information Needed]### Results[More Information Needed]#### Summary## Model Examination [optional]<!-- Relevant interpretability work for the model goes here -->[More Information Needed]## Environmental Impact<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).- **Hardware Type:** [More Information Needed]- **Hours used:** [More Information Needed]- **Cloud Provider:** [More Information Needed]- **Compute Region:** [More Information Needed]- **Carbon Emitted:** [More Information Needed]## Technical Specifications [optional]### Model Architecture and Objective[More Information Needed]### Compute Infrastructure[More Information Needed]#### Hardware[More Information Needed]#### Software[More Information Needed]## Citation [optional]<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->**BibTeX:**[More Information Needed]**APA:**[More Information Needed]## Glossary [optional]<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->[More Information Needed]## More Information [optional][More Information Needed]## Model Card Authors [optional][More Information Needed]## Model Card Contact[More Information Needed]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589---license: gemmatags:- gemma3- gemma- functiongemma- heretic- uncensored- decensored- abliteratedpipeline_tag: text-generationlibrary_name: transformersextra_gated_heading: Access Gemma on Hugging Faceextra_gated_prompt: To access FunctionGemma on Hugging Face, you’re required to reviewand agree to Google’s usage license. To do this, please ensure you’re logged into Hugging Face and click below. Requests are processed immediately.extra_gated_button_content: Acknowledge license---# This is a decensored version of [google/functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it), made using [Heretic](https://github.com/p-e-w/heretic) v1.1.0## Abliteration parameters| Parameter | Value || :-------- | :---: || **direction_index** | per layer || **attn.o_proj.max_weight** | 1.25 || **attn.o_proj.max_weight_position** | 14.09 || **attn.o_proj.min_weight** | 0.92 || **attn.o_proj.min_weight_distance** | 6.34 || **mlp.down_proj.max_weight** | 1.49 || **mlp.down_proj.max_weight_position** | 11.73 || **mlp.down_proj.min_weight** | 0.42 || **mlp.down_proj.min_weight_distance** | 5.54 |## Performance| Metric | This model | Original model ([google/functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it)) || :----- | :--------: | :---------------------------: || **KL divergence** | 0.2851 | 0 *(by definition)* || **Refusals** | 5/100 | 100/100 |-----# FunctionGemma model card**Model Page**: [FunctionGemma](https://ai.google.dev/gemma/docs/functiongemma)**Resources and Technical Documentation**:- [Responsible Generative AI Toolkit](https://ai.google.dev/responsible)- [FunctionGemma on Kaggle](https://www.kaggle.com/models/google/functiongemma/)- [FunctionGemma on Vertex Model Garden](https://console.cloud.google.com/vertex-ai/publishers/google/model-garden/functiongemma)**Terms of Use**: [Terms](https://ai.google.dev/gemma/terms)\**Authors**: Google DeepMind## Model InformationSummary description and brief definition of inputs and outputs.### Description> [!Note]> FunctionGemma is intended to be fine-tuned for your specific function-calling task, including multi-turn use cases.FunctionGemma is a lightweight, open model from Google, built as a foundationfor creating your own specialized function calling models. FunctionGemma is notintended for use as a direct dialogue model, and is designed to be highlyperformant after further fine-tuning, as is typical of models this size. Builton the Gemma 3 270M model and with the same research and technology used tocreate the Gemini models, FunctionGemma has been trained specifically forfunction calling. The model has the same architecture as Gemma 3, but uses adifferent chat format. The model is well suited for text-only function calling.The uniquely small size makes it possible to deploy in environments with limitedresources such as laptops, desktops or your own cloud infrastructure,democratizing access to state of the art AI models and helping foster innovationfor everyone. Furthermore, akin to the base Gemma 270M, the model has beenoptimized to be extremely versatile, performant on a variety of hardware insingle turn scenarios, but should be finetuned on single turn or multiturn taskspecific data to achieve best accuracy in specific domains.To demonstrate how specializing the 270M parameter model can achieve highperformance on specific agentic workflows, we have highlighted two use cases inthe[Google AI Edge Gallery app](https://play.google.com/store/apps/details?id=com.google.ai.edge.gallery&pcampaignid=web_share).- **Tiny Garden:** A model fine-tuned to power a voice-controlledinteractive game. It handles game logic to manage a virtual plot of land,decomposing commands like "Plant sunflowers in the top row" and "Water theflowers in plots 1 and 2" into app-specific functions (e.g., plant_seed,water_plots) and coordinate targets. This demonstrates the model's capacityto drive custom app mechanics without server connectivity.- **Mobile Actions:** To empower developers to build their own expertagents, we have published [adataset](https://huggingface.co/datasets/google/mobile-actions) and[fine-tuning recipe](https://github.com/google-gemini/gemma-cookbook/blob/main/FunctionGemma/%5BFunctionGemma%5DFinetune_FunctionGemma_270M_for_Mobile_Actions_with_Hugging_Face.ipynb)to demonstrate fine-tuning FunctionGemma. It translates user inputs (e.g.,"Create a calendar event for lunch," "Turn on the flashlight") intofunction calls that trigger Android OS system tools. This interactivenotebook demonstrates how to take the base FunctionGemma model and build a"Mobile Actions" fine tune from scratch for use in the[Google AI Edge gallery app](https://play.google.com/store/apps/details?id=com.google.ai.edge.gallery&pcampaignid=web_share).This use case demonstrates the model's ability to act as an offline,private agent for personal device tasks.### Inputs and outputs- **Input:**- Text string, such as a question, a prompt, or a document to besummarized- Total input context of 32K tokens- **Output:**- Generated text in response to the input, such as an answer to aquestion, or a summary of a document- Total output context up to 32K tokens per request, subtractingthe request input tokens### Basic UsageThe 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.First install the dependencies:```sh$ pip install torch$ pip install transformers```Then load the model and the processor using Transformers:```pythonfrom transformers import AutoProcessor, AutoModelForCausalLMprocessor = AutoProcessor.from_pretrained("google/functiongemma-270m-it", device_map="auto")model = AutoModelForCausalLM.from_pretrained("google/functiongemma-270m-it", dtype="auto", device_map="auto")```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.```pythonweather_function_schema = {"type": "function","function": {"name": "get_current_temperature","description": "Gets the current temperature for a given location.","parameters": {"type": "object","properties": {"location": {"type": "string","description": "The city name, e.g. San Francisco",},},"required": ["location"],},}}message = [# ESSENTIAL SYSTEM PROMPT:# This line activates the model's function calling logic.{"role": "developer","content": "You are a model that can do function calling with the following functions"},{"role": "user","content": "What's the temperature in London?"}]inputs = processor.apply_chat_template(message, tools=[weather_function_schema], add_generation_prompt=True, return_dict=True, return_tensors="pt")out = model.generate(**inputs.to(model.device), pad_token_id=processor.eos_token_id, max_new_tokens=128)output = processor.decode(out[0][len(inputs["input_ids"][0]):], skip_special_tokens=True)print(output)# <start_function_call>call:get_current_temperature{location:<escape>London<escape>}<end_function_call>```For more detailed examples see the [Gemma documentation](https://ai.google.dev/gemma/docs/functiongemma).## Model DataData used for model training and how the data was processed.### Training DatasetThese models were trained on a dataset of text data that includes a widevariety of sources. The model was trained with 6T tokens. The knowledge cutoffdate for the training data was August 2024. There are the key components:- Public Tool Definitions - Common APIs found on the web- Tool Use Interactions - These are a mix of prompts, function calls,function responses, and natural language responses from the model tosummarise the function call response, or request clarifications when theprompt is ambiguous or incomplete.### Data PreprocessingHere are the key data cleaning and filtering methods applied to the trainingdata:- CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filteringwas applied at multiple stages in the data preparation process to ensurethe exclusion of harmful and illegal content.- Sensitive Data Filtering: As part of making Gemma pre-trained modelssafe and reliable, automated techniques were used to filter out certainpersonal information and other sensitive data from training sets.- Additional methods: Filtering based on content quality and safety inline with[our policies](https://ai.google/static/documents/ai-responsibility-update-published-february-2025.pdf).## Implementation InformationDetails about the model internals.### HardwareGemma was trained using [Tensor Processing Unit(TPU)](https://cloud.google.com/tpu/docs/intro-to-tpu) hardware (TPUv4p, TPUv5pand TPUv5e). Training vision-language models (VLMs) requires significantcomputational power. TPUs, designed specifically for matrix operations common inmachine learning, offer several advantages in this domain:- Performance: TPUs are specifically designed to handle the massivecomputations involved in training VLMs. They can speed up trainingconsiderably compared to CPUs.- Memory: TPUs often come with large amounts of high-bandwidth memory,allowing for the handling of large models and batch sizes during training.This can lead to better model quality.- Scalability: TPU Pods (large clusters of TPUs) provide a scalablesolution for handling the growing complexity of large foundation models.You can distribute training across multiple TPU devices for faster and moreefficient processing.- Cost-effectiveness: In many scenarios, TPUs can provide a morecost-effective solution for training large models compared to CPU-basedinfrastructure, especially when considering the time and resources saveddue to faster training.- These advantages are aligned with[Google's commitments to operate sustainably](https://sustainability.google/operating-sustainably/).### SoftwareTraining was done using [JAX](https://github.com/jax-ml/jax) and[ML Pathways](https://blog.google/technology/ai/introducing-pathways-next-generation-ai-architecture/).JAX allows researchers to take advantage of the latest generation of hardware,including TPUs, for faster and more efficient training of large models. MLPathways is Google's latest effort to build artificially intelligent systemscapable of generalizing across multiple tasks. This is specially suitable forfoundation models, including large language models like these ones.\Together, JAX and ML Pathways are used as described in the [paper about theGemini family of models](https://goo.gle/gemma2report); *"the 'singlecontroller' programming model of Jax and Pathways allows a single Python processto orchestrate the entire training run, dramatically simplifying the developmentworkflow."*## EvaluationModel evaluation metrics and results.### Benchmark Results<table><thead><tr><th><strong>Benchmark</strong></th><th><strong>n-shot</strong></th><th><strong>Function Gemma 270m</strong></th></tr></thead><tbody><tr><td>BFCL Simple</td><td>0-shot</td><td>61.6</td></tr><tr><td>BFCL Parallel</td><td>0-shot</td><td>63.5</td></tr><tr><td>BFCL Multiple</td><td>0-shot</td><td>39</td></tr><tr><td>BFCL Parallel Multiple</td><td>0-shot</td><td>29.5</td></tr><tr><td>BFCL Live Simple </td><td>0-shot</td><td>36.2</td></tr><tr><td>BFCL Live Parallel</td><td>0-shot</td><td>25.7</td></tr><tr><td>BFCL Live Multiple</td><td>0-shot</td><td>22.9</td></tr><tr><td>BFCL Live Parallel Multiple</td><td>0-shot</td><td>20.8</td></tr><tr><td>BFCL Relevance</td><td>0-shot</td><td>61.1</td></tr><tr><td>BFCL Irrelevance</td><td>0-shot</td><td>70.6</td></tr></tbody></table>**Impact on Performance after Fine-tuning on Mobile Actions Dataset**\To demonstrate the value of specialization for small language models, wecompared the base FunctionGemma model against the fine-tuned model using the"Mobile Actions"[recipe](https://github.com/google-gemini/gemma-cookbook/blob/main/FunctionGemma/%5BFunctionGemma%5DFinetune_FunctionGemma_270M_for_Mobile_Actions_with_Hugging_Face.ipynb).Fine-tuning significantly improved the base FunctionGemma model's ability tocorrectly identify and format mobile system calls.<table><thead><tr><th><br>Model</th><th><br>Eval results for Mobile Actions</th></tr></thead><tbody><tr><td><br>Base FunctionGemma model</td><td><br>58%</td></tr><tr><td><br>Mobile Actions Fine-Tune</td><td><br>85%</td></tr></tbody></table>**On-Device Performance of the Gemma 270m Fine-tuned Use Cases**\We evaluated the fine-tuned use cases on a Samsung S25 Ultra to assess on-devicelatency and memory footprint.- **Context:** 512 prefill tokens and 32 decode tokens.- **Hardware:** S25 Ultra CPU using LiteRT XNNPACK delegate with 4 threads.Mobile Actions On Device Performance<table><thead><tr><th><br>Backend</th><th><br>Quantization scheme</th><th><br>Context length</th><th><br>Prefill (tokens per second)</th><th><br>Decode (tokens per second)</th><th><br>Time-to-first-token (seconds)</th><th><br>Model Size (MB)</th><th><br>Peak RSS Memory (MB)</th></tr></thead><tbody><tr><td><br>CPU</td><td><br>dynamic_int8</td><td><br>1024</td><td><br>1718</td><td><br>125.9</td><td><br>0.3</td><td><br>288</td><td><br>551</td></tr></tbody></table>Tiny Garden On Device Performance<table><thead><tr><th><br>Backend</th><th><br>Quantization scheme</th><th><br>Context length</th><th><br>Prefill (tokens per second)</th><th><br>Decode (tokens per second)</th><th><br>Time-to-first-token (seconds)</th><th><br>Model Size (MB)</th><th><br>Peak RSS Memory (MB)</th></tr></thead><tbody><tr><td><br>CPU</td><td><br>dynamic_int8</td><td><br>1024</td><td><br>1743</td><td><br>125.7</td><td><br>0.3</td><td><br>288</td><td><br>549</td></tr></tbody></table>## Ethics and SafetyEthics and safety evaluation approach and results.### Evaluation ApproachOur evaluation methods include structured evaluations and internal red-teamingtesting of relevant content policies. Red-teaming was conducted by a number ofdifferent teams, each with different goals and human evaluation metrics. Thesemodels were evaluated against a number of different categories relevant toethics and safety, including:- **Child Safety**: Evaluation of text-to-text and image to text promptscovering child safety policies, including child sexual abuse and exploitation.- **Content Safety:** Evaluation of text-to-text and image to text promptscovering safety policies including, harassment, violence and gore, and hatespeech.- **Representational Harms**: Evaluation of text-to-text and image to textprompts covering safety policies including bias, stereotyping, and harmfulassociations or inaccuracies.### Evaluation ResultsFor all areas of safety testing, we saw major improvements in the categories ofchild safety, content safety, and representational harms relative to previousGemma models. All testing was conducted without safety filters to evaluate themodel capabilities and behaviors. The model produced minimal policy violations,and showed significant improvements over previous Gemma models' performancewith respect to ungrounded inferences. A limitation of our evaluations was theyincluded only English language prompts.## Usage and LimitationsThese models have certain limitations that users should be aware of.### Intended UsageThis model is not intended for use as a direct dialogue model.\Open Large Language Models (LLMs) have a wide range of applications acrossvarious industries and domains. The following list of potential uses is notcomprehensive. The purpose of this list is to provide contextual informationabout the possible use-cases that the model creators considered as part of modeltraining and development.- Content Creation and Communication- Text Generation: These models can be used to generate creativetext formats such as poems, scripts, code, marketing copy, and email drafts.- Chatbots and Conversational AI: Power conversational interfacesfor customer service, virtual assistants, or interactive applications.- Text Summarization: Generate concise summaries of a text corpus,research papers, or reports.- Research and Education- Natural Language Processing (NLP) Research: These models canserve as a foundation for researchers to experiment with NLPtechniques, develop algorithms, and contribute to the advancement of the field.- Language Learning Tools: Support interactive language learningexperiences, aiding in grammar correction or providing writing practice.- Knowledge Exploration: Assist researchers in exploring largebodies of text by generating summaries or answering questions aboutspecific topics.### Limitations- Training Data- The quality and diversity of the training data significantlyinfluence the model's capabilities. Biases or gaps in the training datacan lead to limitations in the model's responses.- The scope of the training dataset determines the subject areasthe model can handle effectively.- Context and Task Complexity- Models are better at tasks that can be framed with clearprompts and instructions. Open-ended or highly complex tasks might bechallenging.- A model's performance can be influenced by the amount of contextprovided (longer context generally leads to better outputs, up to acertain point).- Language Ambiguity and Nuance- Natural language is inherently complex. Models might struggleto grasp subtle nuances, sarcasm, or figurative language.- Factual Accuracy- Models generate responses based on information they learnedfrom their training datasets, but they are not knowledge bases. Theymay generate incorrect or outdated factual statements.- Common Sense- Models rely on statistical patterns in language. They mightlack the ability to apply common sense reasoning in certain situations.### Ethical Considerations and RisksThe development of large language models (LLMs) raises several ethicalconcerns. In creating an open model, we have carefully considered thefollowing:- Bias and Fairness- LLMs trained on large-scale, real-world text data can reflectsocio-cultural biases embedded in the training material. These modelsunderwent careful scrutiny, input data pre-processing described andposterior evaluations reported in this card.- Misinformation and Misuse- LLMs can be misused to generate text that is false, misleading,or harmful.- Guidelines are provided for responsible use with the model, seethe [Responsible Generative AI Toolkit](https://ai.google.dev/responsible).- Transparency and Accountability:- This model card summarizes details on the models' architecture,capabilities, limitations, and evaluation processes.- A responsibly developed open model offers the opportunity toshare innovation by making LLM technology accessible to developers andresearchers across the AI ecosystem.Risks identified and mitigations:- Perpetuation of biases: It's encouraged to perform continuousmonitoring (using evaluation metrics, human review) and the exploration ofde-biasing techniques during model training, fine-tuning, and other use cases.- Generation of harmful content: Mechanisms and guidelines for contentsafety are essential. Developers are encouraged to exercise caution andimplement appropriate content safety safeguards based on their specificproduct policies and application use cases.- Misuse for malicious purposes: Technical limitations and developer andend-user education can help mitigate against malicious applications ofLLMs. Educational resources and reporting mechanisms for users to flagmisuse are provided. Prohibited uses of Gemma models are outlined in the[Gemma Prohibited Use Policy](https://ai.google.dev/gemma/prohibited_use_policy)..- Privacy violations: Models were trained on data filtered for removal ofPII (Personally Identifiable Information). Developers are encouraged toadhere to privacy regulations with privacy-preserving techniques.### BenefitsAt 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.
README.md+589-199