Spice supports both traditional machine learning (ML) models and language models (LLMs). The configuration helps specify either type from various sources. The model type is automatically determined based on the model source and files.
| Field | Description |
|---|---|
name | Unique, readable name for the model within the Spicepod. |
from | Source-specific address to uniquely identify a model. |
description | Additional details about the model, useful for displaying to users. |
datasets | Datasets that the model depends on for inference. |
files | Specify additional files, or override default files needed by the model. |
params | Additional parameters to be passed to the model. |
modelsThe models section in your configuration specifies one or more models to be used with your datasets.
Example:
fromThe from field specifies both the source of the model (e.g Huggingface, or a local file), and the unique identifier of the model (relative to the source). The from value expects the following format
The <model_source> prefix of the from field indicates where the model is sourced from:
huggingface:huggingface.co - Models from Hugging Facefile: - Local file pathsopenai - OpenAI (or compatible) modelsspiceai - Spice AI modelsThe <model_id> suffix of the from field is a unique (per source) identifier for the model:
latest).
lukekim/smart/models/drive_stats:60cb80a2-d59b-45c4-9b68-0946303bdcafQwen/Qwen1.5-0.5B (no revision)meta-llama/Meta-Llama-3-8B:cd892e8f4da1043d4b01d5ea182a2e8412bf658f (with revision hash)v1/chat/completion payload.nameA unique identifier for this model component.
descriptionAdditional details about the model, useful for displaying to users
filesOptional. A list of files associated with this model. Each file has:
path: The path to the filename: Optional. A name for the filetype: Optional. The type of the file (automatically determined if not specified)File types include:
weights: Model weights
.onnx files.gguf, .ggml, .safetensors, or pytorch_model.bin filesconfig: Model configuration
config.json filetokenizer: Tokenizer file
tokenizer.json filetokenizer_config: Tokenizer configuration
tokenizer_config.json fileThe system attempts to automatically determine the file type based on the file name and extension. If the type cannot be determined automatically, you can explicitly specify it in the configuration.
paramsOptional. A map of key-value pairs for additional parameters specific to the model.
Example uses include:
ai() function.datasetsOptional. A list of dataset names that this model should be applied to. For ML models, this preselects the dataset to use for inference.
dependsOnOptional. A list of dependencies that must be loaded and available before this model.