Build hybrid and on-device experiences with Firebase AI Logic

You can build AI-powered Apple, Android, and Web apps and features with hybrid inference using Firebase AI Logic. Hybrid inference enables running inference using on-device models when available and seamlessly falling back to cloud-hosted models otherwise (and vice versa).

  • Benefits of using an on-device model for inference:

    • Enhanced privacy
    • Local context
    • Inference at no-cost
    • Offline functionality
  • Benefits of using a hybrid approach:

    • Provide a similar app experience, regardless of the end-user's device
    • Improve availability of generative AI features, regardless of internet connectivity, quota limitations, or device capabilities

Follow our get started guides

These guides provide step-by-step instructions to set up hybrid experiences in your apps.

Explore configuration options and capabilities

After setting up your app with the get started guides, learn how to configure and customize your hybrid experiences:

  • Configure inference modes and models: Control whether your app prefers on-device inference, in-cloud inference, or restricts execution to one source (iOS+ | Android | Web).

  • Generate structured output (like JSON and enums): Ensure model responses adhere to an exact schema for downstream processing (Android | Web).