Share via


Serverless GPU compute

Important

This feature is in Beta.

This article describes serverless GPU compute on Databricks and provides recommended use cases, guidance for how to set up GPU compute resources, and feature limitations.

What is serverless GPU compute?

Serverless GPU compute is part of the Serverless compute offering. Serverless GPU compute is specialized for custom single and multi-node deep learning workloads. You can use serverless GPU compute to train and fine-tune custom models using your favorite frameworks and get state-of-the-art efficiency, performance, and quality.

Serverless GPU compute includes:

  • An integrated experience across Notebooks, Unity Catalog, and MLflow: You can develop your code interactively using Notebooks.
  • Serverless GPU compute supports A10s.

The pre-installed packages on serverless GPU compute are not a replacement for Databricks Runtime ML. While there are common packages, not all Databricks Runtime ML dependencies and libraries are reflected in the serverless GPU compute environment.

Databricks recommends serverless GPU compute for any model training use case that requires training customizations and GPUs.

For example:

  • Deep-learning-based forecasting workloads
  • Fine-tuning
  • Computer vision
  • Computer audio
  • Recommender systems

Requirements

  • A workspace in one of the following Azure-supported regions:
    • eastus
    • eastus2
    • centralus
    • northcentralus
    • westcentralus
    • westus

What's installed

Serverless GPU compute for notebooks uses environment versions, which provide a stable client API to ensure application compatibility. This allows Databricks to upgrade the server independently, delivering performance improvements, security enhancements, and bug fixes without requiring any code changes to workloads.

Serverless GPU compute uses environment version 3 in addition to the following packages:

  • CUDA 12.4
  • torch 2.6.0
  • torchvision 0.21.0

See Serverless environment version 3 for the packages included in system environment version 3.

Note

Base environments are not supported for serverless GPU compute. In order to set up serverless GPU compute on your environment, specify the dependencies directly in the Environments side panel or pip install them.

Add libraries to the environment

You can install additional libraries to the serverless GPU compute environment. See Add dependencies to the notebook.

Set up serverless GPU compute

You can select to use a serverless GPU compute from the notebook environment in your workspace.

After you open your notebook:

  1. Select the Environment icon. to open the Environment side panel.
  2. Select A10 from the Accelerator field.
  3. Select 3 as the Environment version.
  4. Select Apply and then Confirm that you want to apply the serverless GPU compute to your notebook environment. After connecting to a resource, notebooks immediately begin using the available compute.

Note

Connection to your compute auto-terminates after 60 minutes of inactivity.

Limitations

  • Serverless GPU compute only supports A10 compute.
  • Private Link is not supported. Storage or pip repos behind Private Link are not supported.
  • Serverless GPU compute is not supported for compliance security profile workspaces (like HIPAA or PCI). Processing regulated data is not supported at this time.

Notebook examples

Deep learning with PyTorch

The following notebook provides a simple example of how to run deep learning training using PyTorch and serverless GPU compute.

Deep learning training using PyTorch notebook

Get notebook

Fine-tune Qwen2-0.5B model

The following notebook provides an example of how to efficiently fine-tune the Qwen2-0.5B model using:

  • Transformer reinforcement learning (TRL) for supervised finetuning
  • Liger Kernels for memory-efficient training with optimized Triton kernels.
  • LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning.and train it using PyTorch and serverless GPU compute.

Fine-tune the Qwen2-0.5B model notebook

Get notebook

Fine-tune an embedding model

The following notebook provides an example of how to fine-tune an embedding model. This example uses contrastive learning to fine-tune an embedding model, gte-large-en-v1.5 on a single A10G.

Fine-tune an embedding model notebook

Get notebook

Fine-tune Llama-3.2-3B with Unsloth

This notebook demonstrates how to fine-tune Llama-3.2-3B using the Unsloth library.

Fine-tune Llama model with Unsloth notebook

Get notebook

Object detection custom fine-tuning

This notebook demonstrates how to train an object detection model using a Hugging Face example on one A10 GPU.

Object detection custom fine-tuning notebook

Get notebook

XGBoost model training

This notebook demonstrates how to train an XGBoost regression model on a single GPU.

XGBoost model training notebook

Get notebook

Two-tower recommendation model

These notebooks demonstrate how to convert your recommendation data into MDS format and then use that data to create a two-tower recommendation model.

  • Convert recommendation model dataset to MDS format notebook

    Get notebook

  • Two-tower recommendation model notebook

    Get notebook

Distributed supervised fine-tuning using TRL

This notebook demonstrates how to use Databricks Serverless GPU to run supervised fine-tuning (SFT) using the TRL library with DeepSpeed ZeRO Stage 3 optimization on a single node A10 GPU.

Distributed TRL SFT Training notebook

Get notebook

Time series forecasting with GluonTS

This notebook demonstrates an end-to-end workflow for probabilistic time-series forecasting of electricity-consumption data with GluonTS’s DeepAR model on a serverless GPU cluster, covering data ingestion, resampling, model training, prediction, visualization, and evaluation.

Time series forecasting with GluonTS notebook

Get notebook