Artificial Intelligence 3 min read

How to Enable Gemini Nano AI in Chrome Canary – Step‑by‑Step Guide

This guide explains how to download Chrome Canary, enable the Gemini Nano AI model via chrome://flags, verify the model download, and test it using a JavaScript console snippet, providing all necessary steps and resources for developers.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
How to Enable Gemini Nano AI in Chrome Canary – Step‑by‑Step Guide

At Google I/O 2024, Google announced that its smallest AI model, Gemini Nano, will be built directly into the Chrome desktop client starting with Chrome 126, and it can already be tested in Chrome Canary.

Download Chrome Canary

Install Chrome 127 from the Chrome Release Channels and select the Canary version.

Enable the Gemini model

Open

chrome://flags

Set Prompt API for Gemini Nano to Enable

Set Enables optimization guide on device to Enable BypassPerfR

Restart Chrome Canary

Open

chrome://components/

and verify that the Optimization Guide On Device Model has successfully downloaded the model.

Please note that the model is about 2.4 GB; the option appears after the download completes.

Test the model

Open the console and run the following code:

<code>const session = await window.ai.createTextSession();
console.log(await session.prompt('阅读下面的材料,根据要求写作。随着互联网的普及、人工智能的应用,越来越多的问题能很快得到答案。那么,我们的问题是否会越来越少?以上材料引发了你怎样的联想和思考?请写一篇文章。要求:选准角度,确定立意,明确文体,自拟标题;不要套作,不得抄袭;不得泄露个人信息;不少于800字'));</code>

Reference

Download Canary version: https://chromium.org/getting-involved/dev-channel/

Artificial IntelligenceWeb DevelopmentAI modelChrome CanaryGemini NanoPrompt API
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.