Spice supports various model providers for traditional machine learning (ML) models and large language models (LLMs).
| Name | Description | Status | ML Format(s) | LLM Format(s)* |
|---|---|---|---|---|
openai (opens in a new tab) | OpenAI (or compatible) LLM endpoint | Release Candidate | - | OpenAI-compatible HTTP endpoint |
file (opens in a new tab) | Local filesystem | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
huggingface (opens in a new tab) | Models hosted on HuggingFace | Release Candidate | ONNX | GGUF, GGML, SafeTensor |
spice.ai (opens in a new tab) | Models hosted on the Spice.ai Cloud Platform | Alpha | ONNX | OpenAI-compatible HTTP endpoint |
azure (opens in a new tab) | Azure OpenAI | Alpha | - | OpenAI-compatible HTTP endpoint |
anthropic (opens in a new tab) | Models hosted on Anthropic | Alpha | - | OpenAI-compatible HTTP endpoint |
xai (opens in a new tab) | Models hosted on xAI | Alpha | - | OpenAI-compatible HTTP endpoint |
databricks (opens in a new tab) | Models deployed to Databricks Mosaic AI | Alpha | - | OpenAI-compatible HTTP endpoint |
Spice also tests and evaluates common models and grades their ability to integrate with Spice. See the Models Grade Report (opens in a new tab).
*LLM Format(s) may require additional files (e.g., tokenizer_config.json).
The model type is inferred based on the model source and files. For more detail, refer to the model reference specification (opens in a new tab).
Spice supports a variety of features for large language models (LLMs):
v1/chat/completion (opens in a new tab) parameters. See Parameter Overrides (opens in a new tab). Use Jinja templating to parameterize system prompts per request. See Parameterized prompts (opens in a new tab).For more details, refer to the Large Language Models documentation (opens in a new tab).
The model provider prefix identifies the source or provider of a model in Spice configuration files. This prefix is specified before the model identifier in the from field of a model definition, and is used in specifying model default parameter overrides (opens in a new tab). It helps the runtime determine how to load and interact with the model.
The following provider prefixes are supported:
| Prefix | Description |
|---|---|
openai | OpenAI or OpenAI-compatible endpoints |
azure | Azure OpenAI |
xai | xAI |
anthropic | Anthropic |
perplexity | Perplexity |
hf | Hugging Face |
file | Local filesystem |
spiceai | Spice.ai Cloud Platform |
databricks | Databricks Mosaic AI |
Example usage in spicepod.yaml:
The following examples demonstrate how to configure and use various models or model features with Spice. Each example provides a specific use case to help understand the configuration options available.
To use a language model hosted on OpenAI (or compatible), specify the openai path and model ID in from. For more details, see OpenAI Model Provider (opens in a new tab).
Example spicepod.yml:
To specify tools for an OpenAI model, include them in the params.tools field. For more details, see the Tools documentation (opens in a new tab).
To enable memory tools for a model, define a store memory dataset and specify memory in the model's tools parameter. For more details, see the Memory documentation (opens in a new tab).
To set default overrides for parameters, use the model provider prefix (opens in a new tab) followed by the parameter name. For more details, see the Parameter Overrides documentation (opens in a new tab).
To configure an additional system prompt, use the system_prompt parameter. For more details, see the Parameter Overrides documentation (opens in a new tab).
To serve a model from the local filesystem, specify the from path as file and provide the local path. For more details, see Filesystem Model Provider (opens in a new tab).
This example demonstrates how to pull GitHub issue data from the last 14 days, accelerate the data, create a chat model with memory and tools to access the accelerated data, and use Spice to ask the chat model about the general themes of new issues.
First, configure a dataset to pull GitHub issue data from the last 14 days.
Next, create a chat model that includes memory and tools to access the accelerated GitHub issue data.
At this step, the spicepod.yaml should look like:
Finally, use Spice to ask the chat model about the general themes of new issues in the last 14 days. The following curl command demonstrates how to make this request using the OpenAI-compatible API.
Refer to the Create Chat Completion API documentation (opens in a new tab) for more details on making chat completion requests.
import DocCardList from '@theme/DocCardList';