Lädt...


🔧 First look in Chrome Built-in AI [Early Preview] with Gemini Nano


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

In the past few weeks, I have been testing the Gemini Nano built into Google Chrome. The goal of this post is to provide some initial feedback on this new feature, which may be officially released in Chrome soon.

A little context

The main goal of integrating Gemini Nano into Google Chrome via a Web API is to promote and facilitate small AI features within web pages, without affecting performance or requiring server requests for simple responses, so, with this goal in mind, the Chrome team is working to make Gemini Nano available through an API in Chrome. This initial implementation has some limitations: it currently only works on desktops, requires a device with a GPU, and needs some available storage. To learn more about this project, you can view the official documentation here => https://developer.chrome.com/docs/ai/built-in

Note: It’s important to emphasize that this implementation is still in its early stages, and changes or improvements may be coming soon.

My test

To build my test I used a web page that I have in my lab repository build in NextJS, I used this page for a variety of tests so this project can looks like a little messy but is only for test, if you want to take a look check it out in => https://github.com/MichelAraujo/lab-playground/tree/master/my-app-next

For this test I used:

  • Macbook Pro M3, 18Gbs
  • macOS 15.0
  • Google Chrome Canary 131.0

My goal here was build a simple feature for understand how this built-in AI in Chrome works, for that I build a English sentence feedback, in summary works like this, I put a sentence in English and the AI give some feedback about my sentence and how I can improve it (all using AI built-in in Chrome without make any request in the server).

A little bit about my prompt config (for this test I used the Prompt API, you can learn more about in the official doc):
Note: In this built-in AI experimentation, we had access to other available APIs, such as the Summarization API, Language Detection, and a few others.

The Prompt initialization example:

const createPromptSession = async () => {
  const { available } = await ai.assistant.capabilities();

  if (available !== "no") {
    if (!session) {
      console.log('## Create session ##');

      session = await ai.assistant.create({
        systemPrompt: "you're an English teacher",
        monitor(m) {
          m.addEventListener("downloadprogress", (e) => {
            console.log(`Downloaded ${e.loaded} of ${e.total} bytes.`);
          });
        }
      });

      return session;
    }

    return session;
  }

  console.error('# Error - assistant is not available');
  return undefined;
}

The key point here is the context I provide in the prompt, like 'you're an English teacher,' to ensure that my feature delivers accurate feedback on English usage in the results.

Next, I create the prompt and send a string with context about what I want in the response, along with the user input from the page.

const streaming = await clonedSession.promptStreaming(`Give me feedback about the grammar on the following sentence in English. Sentence: ${sentence}`);
    return streaming;

Check out some feedback that AI give me with this setup, this is a simple Prompt setup but you can check the accuracy of the response, check out:

First, a simple sentence "I want to be a good guitar player!"

Print of the page with the result AI text

Second, I use the same sentence to check for a different result.

Print of the page with the result AI text

Third, a more complex sentence with little mistake:

Print of the page with the result AI text

I like this feedback!

Forth, the suggestion sentence of the previous answer:

Print of the page with the result AI text

The average quality of the answers (in my opinion) is OK, some with little mistakes or lack of context but in general is very good! Like I said, my Prompt setup can be improved too.
In the code example in the repository, I've included some prompt configuration commands that adjust the quality and context of the responses, if you'd like to check them out.

About performance

Here is the point that surprised my a lot, the performance is very good, for all of my tests I can't detect any lake of the performance or degradation in some aspects of my page. I make the tests in a page running animation and when I run the test I don't see lake of the performance in render.

Note: I tried running the same test on an old notebook I have with Windows to check the performance, but it doesn't have enough storage to run the experimental Chrome Canary with the built-in features installed. =(

For performance tests I like to show running in live, so I made a quick video that shows some tests.
For this tests I simulate 6x slowdown CPU and Slow 4g connection and the performance runs very good like you can see in the video below:
https://youtu.be/DI2pAZ-N8tw

I made some record in Devtools performance panel to see show the main thread, GPU thread, behaves when I run the AI prompts, the result was:

show performance test result

We can see a lot of GPU used as expected because de IA execution uses GPU.

Next, test:

show performance test result

The main thread seems to be running very smoothly with little JS / Render tasks that don't compromise other JS tasks execution.

Conclusion

This is a very early-stage feature, so it will see significant improvements in the future. However, it already looks very promising, and I can't wait to see how web pages will leverage it to create new features for users.
I hope this arrives for mobile too, let's wait and see.
Maybe I will share more tests.

Thanks!

...

🔧 First look in Chrome Built-in AI [Early Preview] with Gemini Nano


📈 59.91 Punkte
🔧 Programmierung

📰 Pixel 8 & Gemini Nano: Pixel Feature Drop bringt Gemini Nano – lokales KI-Modell kann doch starten


📈 41.83 Punkte
📰 IT Nachrichten

🔧 Gemini Nano summarization API available for early preview


📈 34.43 Punkte
🔧 Programmierung

🔧 Gemini Nano language detection API available for early preview


📈 34.43 Punkte
🔧 Programmierung

🎥 Built-in AI: Gemini Nano in Chrome


📈 33.7 Punkte
🎥 Video | Youtube

🔧 Local first AI app with Gemini Nano and Chrome


📈 29.99 Punkte
🔧 Programmierung

📰 Pixel 9 Preview: Gemini Nano könnte Telefonbetrug den Kampf ansagen


📈 27.37 Punkte
🤖 Android Tipps

📰 Pixel 9 Preview: Gemini Nano könnte Telefonbetrug den Kampf ansagen


📈 27.37 Punkte
🤖 Android Tipps

📰 Google-Entwicklerkonferenz I/O: Gemini, Gemini, Gemini


📈 25.4 Punkte
📰 IT Nachrichten

🐧 New GNU nano release - GNU nano 8.0 "Grus grus"


📈 24.9 Punkte
🐧 Linux Tipps

🕵️ Medium CVE-2021-28032: Nano arena project Nano arena


📈 24.9 Punkte
🕵️ Sicherheitslücken

🕵️ Ledger Nano S/Nano X OLED Display Side-Channel information disclosure


📈 24.9 Punkte
🕵️ Sicherheitslücken

🔧 Chrome Gemini Nano Demo


📈 24.81 Punkte
🔧 Programmierung

🔧 Discover the Power of Gemini Nano: The On-Device AI Model running in Chrome 127+


📈 24.81 Punkte
🔧 Programmierung

🔧 Building a Local AI Chatbot with Gemini Nano, Chrome Canary, Angular, and Kendo AI Prompt


📈 24.81 Punkte
🔧 Programmierung

📰 Chrome integriert Gemini Nano: Lokale KI erstmals installierbar


📈 24.81 Punkte
🤖 Android Tipps

📰 Google Chrome 127: Gemini Nano lässt sich installieren


📈 24.81 Punkte
📰 IT Nachrichten

📰 Google Chrome: Desktop-Version bald immer mit Gemini Nano KI-Modell


📈 24.81 Punkte
📰 IT Security Nachrichten

🎥 Chromebooks with Gemini look pretty good right now #shorts #google #gemini #chromebook #tech


📈 24.45 Punkte
🎥 Video | Youtube

📰 An Early Look at Vivaldi Browser’s Built-in Ad Blocker


📈 23.47 Punkte
📰 IT Security Nachrichten

🐧 First Look: ‘Spot’ is a Native Spotify App for Linux, Built in GTK & Rust


📈 21.59 Punkte
🐧 Linux Tipps

🐧 NVIDIA Jetson Nano is a $99 Computer Built for AI, Powered by Ubuntu


📈 21.33 Punkte
🐧 Linux Tipps

📰 What is Gemini Live? A first look at Google's new real-time voice AI bot


📈 21.17 Punkte
📰 IT Nachrichten

🎥 First look at #Pixel9 Pro Fold #Google #Gemini #MadebyGoogle


📈 21.17 Punkte
🎥 Video | Youtube

🎥 Google #Pixel9, 9 Pro and 9 Pro XL first look #Google #Gemini #MadebyGoogle


📈 21.17 Punkte
🎥 Video | Youtube

📰 Gemini Nano: Google-KI wird langsam für App-Entwickler geöffnet


📈 20.91 Punkte
🤖 Android Tipps

📰 Gemini Nano is coming to the Pixel 8 after all, along with two new AI features


📈 20.91 Punkte
📰 IT Nachrichten

📰 An Introduction to Privacy and Safety for Gemini Nano


📈 20.91 Punkte
🤖 Android Tipps

🪟 Google reverses course, Gemini Nano LLM is coming to Pixel 8


📈 20.91 Punkte
🪟 Windows Tipps

matomo