Coder Social home page Coder Social logo

gemini-nano-test's Introduction

This is a test for the Built-in AI feature in Chrome Canary v127. It ships with a Gemini Nano model taking up ~2GB of space.

The page is entirely built by ChatGPT 4o in 10 minutes, which in itself is nuts.

To get this running you need to enable the experimental feature in Chrome Canary:

  1. Download Chrome Canary v127
  2. Set Prompt API For Gemini Nano to "Enabled": chrome://flags/#prompt-api-for-gemini-nano
  3. Set Enables optimization guide on device to Enabled BypassPerfRequirement: chrome://flags/#optimization-guide-on-device-model
  4. Restart the browser
  5. Open a Console and write this: await window.ai.createTextSession() once to trigger Chrome to download the model
  6. Go to chrome://components/, find "Optimization Guide On Device Model" and ensure it's fully downloaded. The model should not be "0.0.0.0". If it is, click "Check for updates". If this doesn't show up, try disabling the flags, restart the browser, and try again

Test it works

Open a Console and write this:

const model = await window.ai.createTextSession();
await model.prompt("Where is Copenhagen?");

Usage

Clone this repo and run it:

git clone [email protected]:markhougaard/gemini-nano-test.git
cd gemini-nano-test
npm i
npm run dev

Open http://localhost:3000 and start writing.

Credits

gemini-nano-test's People

Contributors

markhougaard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.