---
title: Deploy models for batch inference and prediction
description: Learn about what Databricks offers for performing batch model inference.
canonical_url: https://docs.databricks.com/aws/en/machine-learning/model-inference/
---

# Deploy models for batch inference and prediction

This article describes what Databricks recommends for batch inference.

For real-time model serving on Databricks, see [Deploy models using Model Serving](https://docs.databricks.com/aws/en/machine-learning/model-serving/index.md).

## <a id="batch-ai-query" /> AI Functions for batch inference

> [!NOTE]
> **Preview**
>
> This feature is in [Public Preview](https://docs.databricks.com/aws/en/release-notes/release-types.md).

AI Functions are built-in functions that you can use to apply AI on your data that is stored on Databricks. You can run batch inference using [task-specific AI functions](https://docs.databricks.com/aws/en/large-language-models/ai-functions.md#fmapi-functions) or the general purpose function, `ai_query`.

The following is an example of batch inference using the task-specific AI function, `ai_translate`. If you want perform batch inference on an entire table, you can remove the `limit 500` from your query.

```sql

SELECT
writer_summary,
  ai_translate(writer_summary, "cn") as cn_translation
from user.batch.news_summaries
limit 500
;

```

Alternatively, you can use the general purpose function, `ai_query` to perform batch inference.

* See which [model types and the associated models](https://docs.databricks.com/aws/en/large-language-models/ai-query.md#supported-models) that `ai_query` supports.
* See [Deploy batch inference pipelines](https://docs.databricks.com/aws/en/large-language-models/batch-inference-pipelines.md).
