Dev48
Language
  • About
  • Services
  • Industries
  • Technologies
  • Articles
  • Contacts
Book a call
    Home/Articles/Alloydb omni integration with local models
Dev48
info@dev48.org+375 29 320-40-96WhatsApp@isky_by

© 2026 · All rights reserved.

AlloyDB Omni integration with local models

Source: Google Cloud Blog•November 24, 2026 at 12:04 AM

AlloyDB Omni integration with local models

You can now connect AlloyDB Omni to local models like Gemma 4 and Qwen3.8, to build gen AI experiences, anywhere.

Open models like Gemma 4 from Google DeepMind are a great option to keep your data local. But how can a local AI model integrate with on-premises data?

AlloyDB Omni, Google’s 100% PostgreSQL-compatible database that runs anywhere, now integrates with locally hosted large language models (LLMs). With AlloyDB Omni, you can build agentic experiences on your own infrastructure and on your own terms. Whether it’s in the cloud, in your datacenter, or even on your laptop, you can have data plus AI anywhere.

Built-in AI for your local environment

AlloyDB Omni is a downloadable, run-anywhere edition of AlloyDB that easily deploys to your own infrastructure, including on-premises. AlloyDB Omni packs powerful, built-in AI, including the same ScaNN indexing technology powering Google Search. When you pair AlloyDB Omni with a model, you can store vector embeddings at scale; search them semantically; and even query the database using natural language. You can use virtually any model you like, whether that’s a frontier Cloud-hosted model like Gemini or a local model. And with locally hosted models you maintain complete control over your data environment.

Connecting to Gemma 4, Qwen3.8, and other local models

You can now connect AlloyDB Omni to local models like Gemma 4 and Qwen3.8. No matter which model you choose, the architecture remains the same.

AlloyDB Omni calls a local model server directly from SQL — keeping prompts, data, and responses inside your environment.

This setup enables entirely new use cases for environments that were previously blocked from adopting agentic capabilities. If you operate an air-gapped network or have data locality requirements, you can still build intelligent applications. You can analyze local logs, generate summaries of proprietary internal documents, and power localized chatbots—all while maintaining strict data governance.

  • Keep data on-premises: Because the database and the model sit in the same local environment, your data never crosses the public internet.

Keep data on-premises: Because the database and the model sit in the same local environment, your data never crosses the public internet.

  • Reduce latency: Processing inference requests locally minimizes network transit time.

Reduce latency: Processing inference requests locally minimizes network transit time.

  • Query directly via SQL: Your standard database queries can invoke machine learning functions that process data locally. Like this:

Query directly via SQL: Your standard database queries can invoke machine learning functions that process data locally. Like this:

Next, you’ll see how to run queries like this yourself, step by step.

Get started

You can test this integration on your own machines today. Using a Kubernetes environment we will show you how to deploy and integrate AlloyDB Omni and a local open model.

Step 0: Before you begin

In this example, we will use Google Kubernetes Engine (GKE) to host the AlloyDB Omni database and local model. GKE gives us a standardized, reproducible environment but you can use the same setup on-prem or almost anywhere.

We will assume you have already setup:

  • A GKE cluster, and

A GKE cluster, and

  • Kubernetes tools kubectl and Helm

Kubernetes tools and

Step 1: Deploy the AlloyDB Omni Kubernetes Operator

We will use the AlloyDB Omni Kubernetes operator to set up our AlloyDB Omni database. The Operator makes deploying and maintaining AlloyDB Omni a breeze.

Step 2: Create your AlloyDB Omni database

Don’t forget to enable the googleMLExtension.

Step 3: Deploy your AI model

We will use Ollama to help us deploy our model.

In this example we deploy Gemma 4 from Google DeepMind. Or, you can modify this command to deploy Qwen3.8 – just change a few lines as noted in the comments.

Step 4: Register the model with AlloyDB Omni

Connect to your database.

Note: If you receive a connection error, you might need to wait a moment for your database to provision.

Now you should be connected to your AlloyDB Omni database with the psql client. Next, run the following SQL script to register your local model.

Note: If you receive a Resource not found error, wait a moment for the model to load.

In addition to registering your model, the above script tells AlloyDB Omni how to interpret the model’s raw output. In this example chain-of-thought (CoT) reasoning is part of the response inside <think></think> tags. We don’t want the CoT, so our output transform function removes it.

Step 5: Try it out!

You can use functions like ai.generate built-in to AlloyDB Omni to connect to your local model – without ever leaving the SQL client!

Make it your own

Try out all the AI features that AlloyDB Omni has to offer! AlloyDB Omni supports fast vector search, built-in AI functions, and more. Give them a try and build something great.

  • Databases
  • AI & Machine Learning
← All articles

What this article says

More in Data & Analytics

All →
Which AI agent memory should you use?
Redis

Which AI agent memory should you use?

Embracing low-code data engineering tools: A data engineer's perspective
Matillion

Embracing low-code data engineering tools: A data engineer's perspective

What is ERP Integration?
Matillion

What is ERP Integration?

Google is named a Leader in the 2026 Gartner Magic Quadrant for SIEM
Looker

Google is named a Leader in the 2026 Gartner Magic Quadrant for SIEM

Elastic 9.6: AlertZero, ES|QL S3 Data Federation, Universal Alerting, and more!
Elastic

Elastic 9.6: AlertZero, ES|QL S3 Data Federation, Universal Alerting, and more!

Elastic Stack 9.4.10 released
Elastic

Elastic Stack 9.4.10 released

More from Looker

Google is named a Leader in the 2026 Gartner Magic Quadrant for SIEM
Looker

Google is named a Leader in the 2026 Gartner Magic Quadrant for SIEM

Scaling Airflow pipelines with AI agents on Managed Airflow
Looker

Scaling Airflow pipelines with AI agents on Managed Airflow

A data simulator to test agents
Looker

A data simulator to test agents

How to fix your team’s API keys
Looker

How to fix your team’s API keys

Ambient networking for GKE: sidecarless service mesh
Looker

Ambient networking for GKE: sidecarless service mesh

How to simplify cloud access with Unified Access Policies (in preview)
Looker

How to simplify cloud access with Unified Access Policies (in preview)