Skip to content

Commit 3cd4a39

Browse files
ewgeniusJeadiephillipleblanclukekim
authored
Update Databricks models and embeddings docs with m2m auth (#989)
* Update Databricks models and embeddings docs with m2m auth * Fix spicepod sample in openai embeddings docs * Update website/docs/components/embeddings/databricks.md Co-authored-by: Jack Eadie <jack@spice.ai> * Update website/docs/components/embeddings/databricks.md Co-authored-by: Jack Eadie <jack@spice.ai> * fix letter casing * Update website/docs/components/embeddings/databricks.md Co-authored-by: Phillip LeBlanc <phillip@spiceai.io> * Update website/docs/components/models/databricks.md Co-authored-by: Phillip LeBlanc <phillip@spiceai.io> --------- Co-authored-by: Jack Eadie <jack@spice.ai> Co-authored-by: Phillip LeBlanc <phillip@spiceai.io> Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>
1 parent 8cf930a commit 3cd4a39

6 files changed

Lines changed: 92 additions & 16 deletions

File tree

website/docs/components/catalogs/databricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ The `params` field is used to configure the connection to the Databricks Unity C
6161

6262
### Personal access token
6363

64-
To Learn more about how to set up personal access tokens, see [Databricks PAT docs](https://docs.databricks.com/aws/en/dev-tools/auth/pat).
64+
To learn more about how to set up personal access tokens, see [Databricks PAT docs](https://docs.databricks.com/aws/en/dev-tools/auth/pat).
6565

6666
```yaml
6767
catalogs:

website/docs/components/data-connectors/databricks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Use the [secret replacement syntax](../secret-stores/index.md) to reference a se
7373

7474
### Personal access token
7575

76-
To Learn more about how to set up personal access tokens, see [Databricks PAT docs](https://docs.databricks.com/aws/en/dev-tools/auth/pat).
76+
To learn more about how to set up personal access tokens, see [Databricks PAT docs](https://docs.databricks.com/aws/en/dev-tools/auth/pat).
7777

7878
```yaml
7979
datasets:
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: 'Databricks Model Provider'
3+
description: 'Instructions for using Databricks Mosaic AI Models'
4+
sidebar_label: 'Databricks'
5+
sidebar_position: 8
6+
---
7+
8+
To use an embedding model deployed to [Databricks Mosaic AI Model Serving](https://docs.databricks.com/aws/en/machine-learning/model-serving/), specify the model endpoint name prefixed with `databricks:` in the `from` field and include the required parameters in the `params` section.
9+
10+
### Parameters
11+
12+
| Parameter | Description |
13+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
14+
| `databricks_endpoint` | The Databricks workspace endpoint, e.g., `dbc-a12cd3e4-56f7.cloud.databricks.com`. |
15+
| `databricks_token` | The Databricks API token to authenticate with the Databricks Models API. Use the [secret replacement syntax](../secret-stores/index.md) to reference a secret, e.g., `${secrets:my_databricks_token}`. |
16+
| `databricks_client_id` | The Databricks Service Principal Client ID. Can't be used with `databricks_token`. |
17+
| `databricks_client_secret` | The Databricks Service Principal Client Secret. Can't be used with `databricks_token`. |
18+
19+
### Example `spicepod.yaml` configuration, using personal access token
20+
21+
To learn more about how to set up personal access tokens, see [Databricks PAT docs](https://docs.databricks.com/aws/en/dev-tools/auth/pat).
22+
23+
```yaml
24+
embeddings:
25+
- from: databricks:databricks-gte-large-en
26+
name: gte-large-en
27+
params:
28+
databricks_endpoint: dbc-46470731-42e5.cloud.databricks.com
29+
databricks_token: ${ secrets:SPICE_DATABRICKS_TOKEN }
30+
```
31+
32+
### Example `spicepod.yaml` configuration, using Databricks service principal
33+
34+
Spice supports the M2M OAuth flow with service principal credentials by utilizing the `databricks_client_id` and `databricks_client_secret` parameters. The runtime will automatically refresh the token.
35+
36+
The service principal must be granted the "Can Query" permission for model serving.
37+
38+
To learn more about how to set up the service principal, see [Databricks M2M OAuth docs](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m).
39+
40+
```yaml
41+
embeddings:
42+
- from: databricks:databricks-gte-large-en
43+
name: gte-large-en
44+
params:
45+
databricks_endpoint: dbc-42424242-4242.cloud.databricks.com
46+
databricks_client_id: ${secrets:DATABRICKS_CLIENT_ID}
47+
databricks_client_secret: ${secrets:DATABRICKS_CLIENT_SECRET}
48+
```
49+
50+
### Additional Information
51+
52+
Refer to the [Mosaic AI Model Serving documentation](https://docs.databricks.com/aws/en/machine-learning/model-serving/) for more details on available models and configurations.

website/docs/components/embeddings/index.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,19 @@ Embeddings are used for vector-based and similarity search, like document retrie
1919

2020
Spice supports various model sources and formats to provide embedding components:
2121

22-
| Name | Description | Status | ML Format(s) | LLM Format(s)\* |
23-
| ------------------- | -------------------------------------------- | ----------------- | ------------ | ------------------------------- |
24-
| [`file`][file] | Local filesystem | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
25-
| [`huggingface`][hf] | Models hosted on HuggingFace | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
26-
| [`openai`][openai] | OpenAI (or compatible) LLM endpoint | Release Candidate | - | OpenAI-compatible HTTP endpoint |
27-
| [`azure`][azure] | Azure OpenAI | Alpha | - | OpenAI-compatible HTTP endpoint |
22+
| Name | Description | Status | ML Format(s) | LLM Format(s)\* |
23+
| -------------------------- | -------------------------------------------- | ----------------- | ------------ | ------------------------------- |
24+
| [`file`][file] | Local filesystem | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
25+
| [`huggingface`][hf] | Models hosted on HuggingFace | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
26+
| [`openai`][openai] | OpenAI (or compatible) LLM endpoint | Release Candidate | - | OpenAI-compatible HTTP endpoint |
27+
| [`azure`][azure] | Azure OpenAI | Alpha | - | OpenAI-compatible HTTP endpoint |
28+
| [`databricks`][databricks] | Models deployed to Databricks Mosaic AI | Alpha | - | OpenAI-compatible HTTP endpoint |
2829

2930
[file]: /components/embeddings/local.md
3031
[hf]: /components/embeddings/huggingface.md
3132
[openai]: /components/embeddings/openai.md
3233
[azure]: /components/embeddings/azure.md
34+
[databricks]: /components/embeddings/databricks.md
3335

3436
## Overview
3537

website/docs/components/embeddings/openai.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following parameters are specific to OpenAI models:
2020
Below is an example configuration in `spicepod.yaml`:
2121

2222
```yaml
23-
models:
23+
embeddings:
2424
- from: openai:text-embedding-3-large
2525
name: xl_embed
2626
params:

website/docs/components/models/databricks.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,44 @@ To use a language model deployed to [Databricks Mosaic AI Model Serving](https:/
99

1010
### Parameters
1111

12-
| Parameter | Description |
13-
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14-
| `databricks_endpoint` | The Databricks workspace endpoint, e.g., `dbc-a12cd3e4-56f7.cloud.databricks.com`. |
15-
| `databricks_token` | The Databricks API token to authenticate with the Unity Catalog API. Use the [secret replacement syntax](../secret-stores/index.md) to reference a secret, e.g., `${secrets:my_databricks_token}`. |
12+
| Parameter | Description |
13+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
14+
| `databricks_endpoint` | The Databricks workspace endpoint, e.g., `dbc-a12cd3e4-56f7.cloud.databricks.com`. |
15+
| `databricks_token` | The Databricks API token to authenticate with the Databricks Models API. Use the [secret replacement syntax](../secret-stores/index.md) to reference a secret, e.g., `${secrets:my_databricks_token}`. |
16+
| `databricks_client_id` | The Databricks Service Principal Client ID. Can't be used with `databricks_token`. |
17+
| `databricks_client_secret` | The Databricks Service Principal Client Secret. Can't be used with `databricks_token`. |
1618

17-
### Example `spicepod.yaml` Configuration
19+
### Example `spicepod.yaml` configuration, using personal access token
20+
21+
To learn more about how to set up personal access tokens, see [Databricks PAT docs](https://docs.databricks.com/aws/en/dev-tools/auth/pat).
1822

1923
```yaml
2024
models:
21-
- from: databricks:jeadie
22-
name: food
25+
- from: databricks:databricks-llama-4-maverick
26+
name: llama-4-maverick
2327
params:
2428
databricks_endpoint: dbc-46470731-42e5.cloud.databricks.com
2529
databricks_token: ${ secrets:SPICE_DATABRICKS_TOKEN }
2630
```
2731
32+
### Example `spicepod.yaml` configuration, using Databricks service principal
33+
34+
Spice supports the M2M OAuth flow with service principal credentials by utilizing the `databricks_client_id` and `databricks_client_secret` parameters. The runtime will automatically refresh the token.
35+
36+
The service principal must be granted the "Can Query" permission for model serving.
37+
38+
To learn more about how to set up the service principal, see [Databricks M2M OAuth docs](https://docs.databricks.com/aws/en/dev-tools/auth/oauth-m2m).
39+
40+
```yaml
41+
models:
42+
- from: databricks:databricks-llama-4-maverick
43+
name: llama-4-maverick
44+
params:
45+
databricks_endpoint: dbc-46470731-42e5.cloud.databricks.com
46+
databricks_client_id: ${secrets:DATABRICKS_CLIENT_ID}
47+
databricks_client_secret: ${secrets:DATABRICKS_CLIENT_SECRET}
48+
```
49+
2850
### Additional Information
2951

3052
Refer to the [Mosaic AI Model Serving documentation](https://docs.databricks.com/aws/en/machine-learning/model-serving/) for more details on available models and configurations.

0 commit comments

Comments
 (0)