<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt" -->

---
title: Introducing hybrid on-device inference using Firebase AI...
description: Firebase AI Logic client SDK for Web now supports an experimental hybrid on-device inference feature. It uses Chrome's built-in Gemini Nano model via the...
canonical: https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Introducing hybrid on-device inference using Firebase AI Logic | daily.dev
og:description: Firebase AI Logic client SDK for Web now supports an experimental hybrid on-device inference feature. It uses Chrome's built-in Gemini Nano model via the...
og:url: https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt
og:image: https://api.daily.dev/og/posts/1dhmVxhxt.png
og:image:alt: Introducing hybrid on-device inference using Firebase AI Logic
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introducing hybrid on-device inference using Firebase AI Logic

**[Firebase](https://daily.dev/sources/firebase-blog)** · 3 min read · 0 upvotes · 0 comments

## Summary

Firebase AI Logic client SDK for Web now supports an experimental hybrid on-device inference feature. It uses Chrome's built-in Gemini Nano model via the proposed W3C Prompt API when available, and automatically falls back to cloud-hosted Gemini models otherwise. Developers can set a mode parameter (prefer_on_device, only_on_device, only_in_cloud) to control behavior, gaining benefits like offline availability, privacy, cost savings, and hardware-accelerated performance without changing much of their existing code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://firebase.blog/posts/2025/06/hybrid-inference-firebase-ai-logic>

## Questions this post answers

### How do I use hybrid on-device and cloud inference in the Firebase AI Logic SDK for Web?

Set the mode parameter when calling getGenerativeModel, for example mode: "prefer_on_device" to use Chrome's on-device Gemini Nano model when available and automatically fall back to cloud-hosted Gemini models otherwise. Other options are "only_on_device" to run exclusively on-device with no fallback, and "only_in_cloud" to always use cloud models. The SDK handles availability checks and fallback logic automatically.

_Developers wiring up hybrid AI inference can compare SDK approaches and updates on daily.dev._

### What on-device AI model does Chrome support for the Firebase AI Logic SDK?

Chrome on Desktop supports Gemini Nano, an on-device model that can be downloaded and hosted directly in the browser on-demand. It integrates through the proposed W3C Prompt API, letting web apps run inference locally for enhanced privacy, offline availability, no-cost usage, and hardware-accelerated performance, with automatic fallback to server-hosted Gemini models when unavailable.

_Track browser AI capability changes like this on daily.dev before they affect your app's fallback logic._

## Similar posts on daily.dev

- [Experimental hybrid inference and new Gemini models for Android](https://daily.dev/posts/experimental-hybrid-inference-and-new-gemini-models-for-android-cc5bn1znk) · Android Developers Blog · 1 upvotes · 0 comments
- [Getting Started with Chrome's window.ai Prompt API](https://daily.dev/posts/getting-started-with-chrome-s-window-ai-prompt-api-v9xmcyyfi) · SitePoint · 0 upvotes · 0 comments
- [Expanding built-in AI to more devices with Chrome](https://daily.dev/posts/expanding-built-in-ai-to-more-devices-with-chrome-cv4h8swsr) · Chrome Developers · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#genai](https://daily.dev/tags/genai), [#firebase](https://daily.dev/tags/firebase), [#local-ai](https://daily.dev/tags/local-ai)

[View this post on daily.dev](https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Introducing hybrid on-device inference using Firebase AI Logic","url":"https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt"},"datePublished":"2026-08-23T12:17:49.230Z","dateModified":"2026-08-23T12:25:09.716Z","description":"Firebase AI Logic client SDK for Web now supports an experimental hybrid on-device inference feature. It uses Chrome's built-in Gemini Nano model via the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a6b43a37ee9b5adc2f5f4a633bac66af?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/a6b43a37ee9b5adc2f5f4a633bac66af?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Firebase","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Firebase","logo":"https://media.daily.dev/image/upload/s--i395oqZH--/f_auto,q_auto/v1787487448/logos/firebase-blog?_a=BAMAMicg0","url":"https://daily.dev/sources/firebase-blog"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,genai,firebase,local-ai","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Firebase","item":"https://daily.dev/sources/firebase-blog"},{"@type":"ListItem","position":3,"name":"Introducing hybrid on-device inference using Firebase AI Logic"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/introducing-hybrid-on-device-inference-using-firebase-ai-logic-1dhmvxhxt#faq","mainEntity":[{"@type":"Question","name":"How do I use hybrid on-device and cloud inference in the Firebase AI Logic SDK for Web?","acceptedAnswer":{"@type":"Answer","text":"Set the mode parameter when calling getGenerativeModel, for example mode: \"prefer_on_device\" to use Chrome's on-device Gemini Nano model when available and automatically fall back to cloud-hosted Gemini models otherwise. Other options are \"only_on_device\" to run exclusively on-device with no fallback, and \"only_in_cloud\" to always use cloud models. The SDK handles availability checks and fallback logic automatically. Developers wiring up hybrid AI inference can compare SDK approaches and updates on daily.dev."}},{"@type":"Question","name":"What on-device AI model does Chrome support for the Firebase AI Logic SDK?","acceptedAnswer":{"@type":"Answer","text":"Chrome on Desktop supports Gemini Nano, an on-device model that can be downloaded and hosted directly in the browser on-demand. It integrates through the proposed W3C Prompt API, letting web apps run inference locally for enhanced privacy, offline availability, no-cost usage, and hardware-accelerated performance, with automatic fallback to server-hosted Gemini models when unavailable. Track browser AI capability changes like this on daily.dev before they affect your app's fallback logic."}}]}
```

