Deep learning

This article describes what Databricks offers for training and fine-tuning deep learning models. Databricks Runtime for Machine Learning provides pre-built deep learning infrastructure and includes common deep learning libraries like Hugging Face transformers, PyTorch, TensorFlow, and Keras. It also has libraries like Petastorm, Hyperopt, and Horovod to easily scale common machine learning and deep learning steps. And includes pre-configured GPU support including drivers and libraries to accelerate model training and inference.

See Best practices for deep learning on Databricks.

Large language models (LLMs)

Databricks makes it simple to access and build off of publicly available large language models.

Databricks Runtime for Machine Learning includes libraries like Hugging Face Transformers and LangChain that allow you to integrate existing pre-trained models or other open-source libraries into your workflow. From here, you can leverage Databricks platform capabilities to fine-tune LLMs using your own data for better domain performance.

See the Hello Dolly blog for an example of an open-source LLM model recreated on Databricks.

In addition, Databricks offers built-in functionality for SQL users to access and experiment with LLMs like Azure OpenAI and OpenAI using AI functions.

Hugging Face Transformers

With Hugging Face Transformers on Databricks you can scale out your natural language processing (NLP) batch applications and fine-tune models for large-language model applications.

The Hugging Face transformers library comes preinstalled on Databricks Runtime 10.4 LTS ML and above. Many of the popular NLP models work best on GPU hardware, so you might get the best performance using recent GPU hardware unless you use a model specifically optimized for use on CPUs.

LangChain

LangChain is available as an experimental MLflow flavor which allows LangChain customers to leverage the robust tools and experiment tracking capabilities of MLflow directly from the Databricks environment.

LangChain is a software framework designed to help create applications that utilize large language models (LLMs) and combine them with external data to bring more training context for your LLMs.

Databricks Runtime for Machine Learning includes langchain in Databricks Runtime 13.1 ML and above.

Learn about Databricks specific LangChain integrations.

AI functions

Preview

This feature is in Public Preview.

AI functions are built-in SQL functions that allow SQL users to:

  • Access public large language models like those in Azure OpenAI and Open AI and experiment with them on your company’s data.

  • Query models hosted by Databricks model serving endpoints from SQL queries.

These functions are only available in public preview on Databricks SQL Pro or Serverless.

PyTorch

PyTorch is included in Databricks Runtime for Machine Learning and provides GPU accelerated tensor computation and high-level functionalities for building deep learning networks. You can perform single node training or distributed training with PyTorch on Databricks. See PyTorch.

Tensorflow

Databricks Runtime for Machine Learning includes TensorFlow and TensorBoard, so you can use these libraries without installing any packages. TensorFlow supports deep-learning and general numerical computations on CPUs, GPUs, and clusters of GPUs. TensorBoard provides visualization tools to help you debug and optimize machine learning and deep learning workflows. See TensorFlow for single node and distributed training examples.

Distributed training

Because deep learning models are data and computation-intensive, distributed training can be important. For examples of distributed deep learning using integrations with Horovod, spark-tensorflow-distributor, TorchDistributor, and DeepSpeed see Distributed training.