Skip to main content
Pixeltable provides extensive built-in support for popular embedding models, but you can also easily integrate your own custom embedding models. This guide shows you how to create and use custom embedding functions for any model architecture.

Quick start

Here’s a simple example using a custom BERT model:

Production best practices

The quick start example works but isn’t production-ready. Below we’ll cover how to optimize your custom embedding UDFs.

Model caching

Always cache your model instances to avoid reloading on every call:

Batch processing

Use Pixeltable’s batching capabilities for better performance:

Error handling

Always implement proper error handling in production UDFs:

Additional resources

UDF Guide

Complete UDF documentation

Embedding Examples

More embedding examples

Model Hub

Find embedding models
Last modified on June 24, 2026