Connect with us

Tech

google/recurrentgemma-9b Hugging faces

google/recurrentgemma-9b Hugging faces

 


Model page: RecurrentGemma

This model card corresponds to the 9B base version of the RecurrentGemma model. See also the model card for the 9B instructional model.

Resources and technical documentation:

Terms of Use: Terms of Use

Author: Google

how to use

Below are some code snippets on how you can quickly start running your models.

First, run pip install transformers, then copy the snippet from the section relevant to your use case.

Run models on single/multiple GPUs from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained(“google/recurrentgemma-9b”) model = AutoModelForCausalLM.from_pretrained(“google/recurrentgemma-9b”, device_map=”auto”) input_text = “Write a poem about machine learning.” input_ids = tokenizer(input_text, return_tensors=”pt”).to(“cuda”) output = model.generate(**input_ids) print(tokenizer.decode(outputs[0])) Model Information Model Overview Description

RecurrentGemma is a family of open language models built on a novel recurrent architecture developed at Google. Both pre-trained and instruction-tuned versions are available for English.

Like Gemma, the RecurrentGemma model is suitable for a variety of text generation tasks, including question answering, summarization, inference, etc. RecurrentGemma employs a novel architecture that requires less memory than Gemma and provides faster inference when generating long sequences.

Input and Output Input: Text strings (e.g., questions, prompts, documents to summarize). Output: English text generated in response to the input (e.g., answers to questions, document summaries). Citation @article{recurrentgemma_2024, title={RecurrentGemma}, url={}, DOI={}, published={Kaggle}, author={Griffin Team, Alexsandar Botev and Soham De and Samuel L Smith and Anushan Fernando and George-Christian Muraru and Ruba Haroun and Leonard Berrada et al.}, year={2024} } Model Data Training dataset and data processing

RecurrentGemma uses the same training data and data processing used by the Gemma family of models, which are explained in more detail on the Gemma model card.

Implementation information Hardware and frameworks used during training

Like Gemma, RecurrentGemma was trained on a TPUv5e using JAX and ML Pathways.

Evaluation information Benchmark results Evaluation approach

These models were evaluated against a large collection of different datasets and metrics to cover different aspects of text generation.

Evaluation results Inference speed results

RecurrentGemma achieves better sampling speed, especially for long sequences and large batch sizes. We compared the sampling speed of RecurrentGemma-9B and Gemma-7B. Note that Gemma-7B uses Multi-Head Attention, so the speedup is smaller compared to Transformers that use Multi-Query Attention.

throughput

Using 2K token pre-filling, we evaluated the maximum number of tokens generated per second (throughput of RecurrentGemma-9B) by increasing the batch size compared to Gemma-7B.

Latency

We also compare the end-to-end speedup achieved by RecurrentGemma-9B and Gemma-7B when sampling long sequences after prefilling with 4K tokens and a batch size of 1.

Number of sample tokens Gemma-7B (sec) Iterations Gemma-9B (sec) Improvement (%) 128 3.1 2.8 9.2% 256 5.9 5.4 9.7% 512 11.6 10.5 10.7% 1024 23.5 20.6 14.2% 2048 48.2 40.9 17.7% 4096 101.9 81.5 25.0% 8192 OOM 162.8 – 16384 OOM 325.2 – Ethics and Safety Evaluation of Ethics and Safety Evaluation Approach

Our evaluation methodology included structured assessments and internal red team testing of relevant content policies. Red teaming was conducted by several different teams, each with different goals and human evaluation criteria. These models were evaluated against a range of categories related to ethics and safety.

Text-to-text content safety: Human evaluation of prompts covering safety policies including child sexual abuse and exploitation, harassment, violence and cruelty, and hate speech. Text-to-text expression harm: Benchmarking against relevant academic datasets such as WinoBias and the BBQ Dataset. Memorization: Automated assessment of memory of training data, including risk of exposing personally identifiable information. Large-scale harm: Testing of dangerous capabilities such as chemical, biological, radiological, and nuclear (CBRN) risks, persuasion and deception, cyber security, and autonomous replication. Evaluation results

The results of our ethics and safety assessments are within acceptable limits that meet our internal policies for categories such as child safety, content safety, representational harm, memorization, and mass harm. In addition to our robust internal assessments, results from well-known safety benchmarks such as BBQ, Winogender, Winobias, RealToxicity, and TruthfulQA are displayed here.

Model Use and Limitations Known Limitations

These models have certain limitations of which users should be aware.

Training Data The quality and diversity of the training data significantly impacts the model's capabilities. Bias or gaps in the training data can limit the model's responses. The scope of the training dataset determines the subject area the model can effectively handle. Context and Task Complexity LLM works well for tasks that are framed with clear prompts and instructions. Open-ended or highly complex tasks may be challenging. Model performance may be affected by the amount of context provided (longer context typically improves output, up to a point). Language Ambiguity and Nuance Natural language is inherently complex. LLM may struggle to understand subtle nuances, sarcasm, and figurative language. Factual Accuracy LLM generates responses based on information learned from the training dataset, but is not knowledge-based. It may generate inaccurate or outdated factual statements. Common Sense LLM relies on statistical patterns in language. It may lack the ability to apply common sense reasoning in certain situations. Ethical Considerations and Risks

Developing large-scale language models (LLMs) raises several ethical concerns. In creating our open model, we carefully considered the following:

Bias and Fairness LLMs trained on large-scale real-world text data may reflect socio-cultural biases embedded in the training material. These models have undergone careful scrutiny, explanation of input data pre-processing, and post-mortem evaluation, as reported in this card. Misinformation and Misuse LLMs can be misused to generate false, misleading, or harmful text. Guidelines are provided for responsible use of the models; see the Responsible Generation AI Toolkit. Transparency and Accountability This model card outlines details of the model architecture, capabilities, limitations, and evaluation process. Responsibly developed and open models provide an opportunity to share innovation by making LLM technology available to developers and researchers across the AI ​​ecosystem.

Identified risks and their mitigation measures:

Persistence of bias: Continuous monitoring (using evaluation metrics, human review) and research into debiasing techniques are encouraged to be performed during model training, fine-tuning and other use cases. Generation of harmful content: Content safety mechanisms and guidelines are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases. Misuse for malicious purposes: Technical restrictions and developer and end-user education can help mitigate malicious application of LLM. Educational resources and reporting mechanisms are provided for users to report misuse. Prohibited uses of the Gemma model are listed in the Terms of Use. Privacy violations: The model was trained on data that was filtered to remove PII (Personally Identifiable Information). Developers are encouraged to use privacy preservation techniques to comply with privacy regulations. Intended Use Application

Open large language models (LLMs) have a wide range of uses across different industries and domains. The following list of potential uses is not intended to be comprehensive. The list is intended to provide contextual information about use cases that model creators may have considered as part of training and developing their models.

Content Creation and Communications Text Generation: These models can be used to generate creative text formats such as poetry, scripts, code, marketing copy, and email drafts. Chatbots and Conversational AI: Power conversational interfaces for customer service, virtual assistants, or interactive applications. Text Summarization: Generate concise summaries of text corpora, research papers, or reports. Research and Education Natural Language Processing (NLP) Research: These models serve as a foundation for researchers to experiment with NLP techniques, develop algorithms, and contribute to the advancement of the field. Language Learning Tools: Support interactive language learning experiences, assist with grammar correction, or provide writing practice. Knowledge Exploration: Help researchers explore large amounts of text by generating summaries or answering questions on a specific topic. Benefits

At the time of release, this model family offers high-performance, open, large-scale language model implementations designed from the ground up for responsible AI development compared to similarly sized models.

Using the benchmark evaluation metrics described in this paper, these models have been shown to provide better performance than other open model alternatives of comparable size.

In particular, the RecurrentGemma model achieves comparable performance to the Gemma model, but is faster during inference and requires less memory, especially for long sequences.

Sources

1/ https://Google.com/

2/ https://huggingface.co/google/recurrentgemma-9b

The mention sources can contact us to remove/changing this article

What Are The Main Benefits Of Comparing Car Insurance Quotes Online

LOS ANGELES, CA / ACCESSWIRE / June 24, 2020, / Compare-autoinsurance.Org has launched a new blog post that presents the main benefits of comparing multiple car insurance quotes. For more info and free online quotes, please visit https://compare-autoinsurance.Org/the-advantages-of-comparing-prices-with-car-insurance-quotes-online/ The modern society has numerous technological advantages. One important advantage is the speed at which information is sent and received. With the help of the internet, the shopping habits of many persons have drastically changed. The car insurance industry hasn't remained untouched by these changes. On the internet, drivers can compare insurance prices and find out which sellers have the best offers. View photos The advantages of comparing online car insurance quotes are the following: Online quotes can be obtained from anywhere and at any time. Unlike physical insurance agencies, websites don't have a specific schedule and they are available at any time. Drivers that have busy working schedules, can compare quotes from anywhere and at any time, even at midnight. Multiple choices. Almost all insurance providers, no matter if they are well-known brands or just local insurers, have an online presence. Online quotes will allow policyholders the chance to discover multiple insurance companies and check their prices. Drivers are no longer required to get quotes from just a few known insurance companies. Also, local and regional insurers can provide lower insurance rates for the same services. Accurate insurance estimates. Online quotes can only be accurate if the customers provide accurate and real info about their car models and driving history. Lying about past driving incidents can make the price estimates to be lower, but when dealing with an insurance company lying to them is useless. Usually, insurance companies will do research about a potential customer before granting him coverage. Online quotes can be sorted easily. Although drivers are recommended to not choose a policy just based on its price, drivers can easily sort quotes by insurance price. Using brokerage websites will allow drivers to get quotes from multiple insurers, thus making the comparison faster and easier. For additional info, money-saving tips, and free car insurance quotes, visit https://compare-autoinsurance.Org/ Compare-autoinsurance.Org is an online provider of life, home, health, and auto insurance quotes. This website is unique because it does not simply stick to one kind of insurance provider, but brings the clients the best deals from many different online insurance carriers. In this way, clients have access to offers from multiple carriers all in one place: this website. On this site, customers have access to quotes for insurance plans from various agencies, such as local or nationwide agencies, brand names insurance companies, etc. "Online quotes can easily help drivers obtain better car insurance deals. All they have to do is to complete an online form with accurate and real info, then compare prices", said Russell Rabichev, Marketing Director of Internet Marketing Company. CONTACT: Company Name: Internet Marketing CompanyPerson for contact Name: Gurgu CPhone Number: (818) 359-3898Email: [email protected]: https://compare-autoinsurance.Org/ SOURCE: Compare-autoinsurance.Org View source version on accesswire.Com:https://www.Accesswire.Com/595055/What-Are-The-Main-Benefits-Of-Comparing-Car-Insurance-Quotes-Online View photos

ExBUlletin

to request, modification Contact us at Here or [email protected]