android-developers.googleblog.com Open in urlscan Pro
2a00:1450:4001:80b::2001  Public Scan

Submitted URL: https://notifications.google.com/g/p/ANiao5oXM48jMa3RXRUYuvSiNhE8qx5zGw_UdzYWP1QPUa5Kt9Cf4D6uUfx7JtBczfZEa7LPp3I_mpk-FT6gxdasw6w5...
Effective URL: https://android-developers.googleblog.com/2024/10/gemini-nano-experimental-access-available-on-android.html
Submission: On October 31 via api from RU — Scanned from DE

Form analysis 2 forms found in the DOM

/search

<form action="/search" class="searchbox">
  <input autocomplete="off" name="q" placeholder="Search blog" title="Search blog" type="text" value="">
</form>

/search

<form action="/search" class="searchbox">
  <input autocomplete="off" name="q" placeholder="Search blog" title="Search blog" type="text" value="">
</form>

Text Content

☰
Android Developers Blog
The latest Android and Google Play news for app and game developers.
🔍


Android Developers →
Jetpack Kotlin Docs News
Platform Android Studio Google Play Jetpack Kotlin Docs News




Platform Android Studio Google Play Jetpack Kotlin Docs News More
|


01 October 2024


GEMINI NANO IS NOW AVAILABLE ON ANDROID VIA EXPERIMENTAL ACCESS

--------------------------------------------------------------------------------

Share this post LinkedIn Twitter Facebook Email Copy link
Link copied to clipboard
Posted by Taj Darra – Product Manager



Gemini, introduced last year, is Google’s most capable family of models yet;
designed for flexibility, it can run on everything from data centers to mobile
devices. Since announcing Gemini Nano, our most efficient model built for
on-device tasks, we've been working with a limited set of partners to support a
range of use cases for their apps.

Today, we’re opening up access to experiment with Gemini Nano to all Android
developers with the AI Edge SDK via AICore. Developers will initially have
access to experiment with text-to-text prompts on Pixel 9 series devices.
Support for more devices and modalities will be added in the future. Check out
our documentation and video to get started. Note that experimental access is for
development purposes, and is not for production usage at this time.



FAST, PRIVATE AND COST-EFFECTIVE ON-DEVICE AI

On-device generative AI processes prompts directly on your device without server
calls. It offers many benefits: sensitive user data is processed locally on the
device, full functionality without internet connectivity, and no additional
monetary cost for each inference.

Since on-device generative AI models run on devices with less computational
power than cloud servers, they are significantly smaller and less generalized
than their cloud-based equivalents. As a result, the model works best for tasks
where the requests can be clearly specified rather than open-ended use cases
such as chatbots. Here are some use cases you can try:

 * Rephrasing - Rephrasing and rewriting text to change the tone to be more
   casual or formal.

 * Smart reply - Given several chat messages in a thread, suggest the next
   likely response.

 * Proofreading - Removing spelling or grammatical errors from text.

 * Summarization - Generating a summary of a long document, either as a
   paragraph or as bullet points.

Check out our prompting strategies to achieve best results when experimenting
with the above use-cases. If you want to test your own use case, you can
download our sample app for an easy way to start experimenting with Gemini Nano.



GEMINI NANO PERFORMANCE AND USAGE

Compared to its predecessor, the model being made available to developers today
(referred to in the academic paper as “Nano 2”) delivers a substantial
improvement in quality. At nearly twice the size of the predecessor (“Nano 1”),
it excels in both academic benchmarks and real-world applications, offering
capabilities that rival much larger models.




MMLU (5-shot)*

MATH (4-shot)*

Paraphrasing**

Smart Reply**

Nano 1

46%

14%

44%

44%

Nano 2



56%

23%

90%

82%

* As reported in Gemini: A Family of Highly Capable Multimodal Models. Note that
both these models are a part of our Gemini 1.0 series.
** Percentage of good answers measured on public datasets via an autorater
powered by Gemini 1.5 Pro.


Gemini Nano is already in use by Google apps. Pixel Screenshots, Talkback,
Recorder and many more have leveraged Gemini Nano’s text and image understanding
to deliver new experiences:

 * Talkback - Android’s accessibility app leverages Gemini Nano’s multimodal
   capabilities to improve image descriptions for blind and low vision users.





 * Pixel Recorder - Gemini Nano with Multimodality model enables support for
   longer recordings and higher quality summaries.





SEAMLESS MODEL INTEGRATION WITH AI EDGE SDK USING AICORE

Integrating generative AI models directly into mobile apps is challenging due to
the significant computational resources and storage space they require. To
address this challenge, we developed AICore, a new system service in Android.
AICore allows you to benefit from AI running directly on the device without
needing to distribute runtimes, models and other components yourself.

To run inference with Gemini Nano in AICore, you use the AI Edge SDK. The AI
Edge SDK enables developers to customize prompts and inference parameters to
their specific needs, enabling greater control over each inference.

To experiment with the AI Edge SDK, add the following to your apps’ dependency:

implementation("com.google.ai.edge.aicore:aicore:0.0.1-exp01")

The AI Edge SDK allows you to customize inference parameters. Some of the more
commonly-used parameters include:

 * Temperature, which controls randomness. Higher values increase diversity and
   creativity of output.

 * Top K, which specifies how many tokens from the highest-ranking ones are to
   be considered.

 * Candidate count, which describes the maximum number of responses to return.

 * Max output tokens, which is the length of the desired response.

When you are ready to run the inference with your model, the AI Edge SDK offers
an easy way to pass in multiple strings as input to accommodate long inference
data.

Here’s an example:

scope.launch {
    // Single string input prompt
    val input = "I want you to act as an English proofreader. I will 
    provide you texts, and I would like you to review them for any 
    spelling, grammar, or punctuation errors. Once you have finished 
    reviewing the text, provide me with any necessary corrections or 
    suggestions for improving the text: 
    These arent the droids your looking for."
    val response = generativeModel.generateContent(input)
    print(response.text)

    // Or multiple strings as input
    val response = generativeModel.generateContent(
        content {
            text("I want you to act as an English proofreader.I will 
            provide you texts and I would like you to review them for 
            any spelling, grammar, or punctuation errors.")
            text("Once you have finished reviewing the text, 
            provide me with any necessary corrections or suggestions 
            for improving the text:")
            text("These arent the droids your looking for.")
        }
    )
    print(response.text)
}

Our integration guide has more information on the AI Edge SDK as well as
detailed instructions to start your experimentation with Gemini Nano. To learn
more about prompting, check out the Gemini prompting strategies.



GET STARTED

Learn more about Gemini Nano for app development by watching our video
walkthrough, and try out Gemini Nano experimental access in your own app today.

We are excited to see what you build and welcome your input as you evaluate this
new technology for your use cases! Post your creations on social media and
include the hashtag #AndroidAI to share what you build. To share your ideas and
feedback for on-device GenAI and help shape our APIs, you can file a ticket.

There’s a lot more that we’re covering this week for you to build great AI
experiences on Android so be sure to check out the rest of the AI on Android
Spotlight Week content!

--------------------------------------------------------------------------------

#GenerativeAI Gemini Gemini Nano on-device
Newer post Older post


GOOGLE DEVELOPERS BLOG

Google Developers Blog


CONNECT

Android Developers

Google Play



SUBSCRIBE


FEED


NEWSLETTER

Privacy
|
License
|
Brand guidelines

Get news and tips by email
Diese Website verwendet Cookies von Google, um Dienste anzubieten und Zugriffe
zu analysieren. Deine IP-Adresse und dein User-Agent werden zusammen mit
Messwerten zur Leistung und Sicherheit für Google freigegeben. So können
Nutzungsstatistiken generiert, Missbrauchsfälle erkannt und behoben und die
Qualität des Dienstes gewährleistet werden.Weitere InformationenOk