---
title: Train AI and ML models
description: Explore examples of training machine learning and deep learning models in Databricks with popular open-source libraries.
canonical_url: https://docs.databricks.com/aws/en/machine-learning/train-model/
---

# Train AI and ML models

Databricks offers compute options for different machine learning needs, ranging from managed clusters to serverless GPU compute with AI Runtime.

| Compute                                                                                                                 | Description                                                                                                    |
| ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| [AI Runtime](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/index.md)                                   | Serverless GPU compute environment optimized for custom single-node and multi-node deep learning workloads.    |
| [Databricks Runtime for Machine Learning](https://docs.databricks.com/aws/en/machine-learning/databricks-runtime-ml.md) | Classic compute environment with pre-built libraries for classic machine learning and deep learning workloads. |

## <a id="ai-runtime-preview" />AI Runtime

[AI Runtime](https://docs.databricks.com/aws/en/machine-learning/ai-runtime/index.md) is a specialized offering within the Databricks serverless ecosystem. It is optimized for custom single-node and multi-node deep learning workloads, such as fine-tuning LLMs or training computer vision models. For an overview of how [serverless compute](https://docs.databricks.com/aws/en/getting-started/high-level-architecture.md#serverless-compute-plane) fits into the Databricks architecture, see [Serverless workspace architecture](https://docs.databricks.com/aws/en/getting-started/high-level-architecture.md#serverless-workspace-architecture).

Key features include:

* **Instant availability**: Removes the need to manage underlying cluster infrastructure, allowing you to connect a notebook directly to AI Runtime.
* **High-performance hardware**: Provides access to A10 GPUs for cost-effective tasks and H100 GPUs for large-scale AI workloads.
* **Managed environments**: Offers a default base environment for full customization or an AI environment pre-loaded with common ML packages like Transformers and Ray.
* **Flexible scaling**: Supports distributed training across multiple GPUs and nodes.

## Databricks Runtime for Machine Learning

[Databricks Runtime for Machine Learning](https://docs.databricks.com/aws/en/machine-learning/databricks-runtime-ml.md) is a specialized runtime that automates the creation of compute resources with pre-built infrastructure. It is designed for users who want a comprehensive, ready-to-use environment for both classic machine learning and deep learning.

Key features include:

* **Pre-installed libraries**: Includes popular libraries like PyTorch, TensorFlow, and XGBoost, which receive frequent updates and optimized support.
* **Compute versatility**: Supports both CPU and GPU-based instance types, including AWS Graviton for improved price-to-performance.
* **Optimization**: Offers integration with Photon to accelerate Spark SQL, DataFrames, and feature engineering tasks.
* **Access control**: Requires dedicated access mode for secure data access through Unity Catalog.
