Skip to navigation

User Guide

View as Markdown

Use SDM to load pretrained structured data models and run inference in Python. The steps below cover environment setup, model weights, and input preparation.

1. Set Up Your Environment

SDM requires Python 3.11 or later and PyTorch 2.7 or later. For GPU inference, install a CUDA-enabled PyTorch build that matches your environment. Refer to the SDM installation guide and the PyTorch installation instructions.

Check your selected model’s device requirements and any additional dependencies needed by its examples. Installation and the first model download require internet access.

2. Install SDM

pip install structured-data-models

3. Select and Load Pretrained Weights

Browse the NVIDIA Kumo model collection. Use the model card to check supported tasks, input requirements, and weight license. Follow the model’s SDM reference for its constructor and checkpoint loading options.

If the model requires authentication or acceptance of terms, complete those steps on its Hugging Face page first. SDM uses the Hugging Face login configured in your environment or the HF_TOKEN environment variable when accessing private repositories. Refer to Hugging Face authentication and cache configuration.

4. Prepare Inputs and Run Inference

Input structures, preprocessing, and output formats depend on the model and prediction task. Use the model reference and repository examples for the model you selected.

The upstream guides cover table semantics, data processing, and in-context learning. Match your column types, context data, and prediction inputs to the model’s supported schema before running inference.

Kumo Tabular Example Notebook

Classify vehicle silhouettes from 18 numerical features using the OpenML Vehicle dataset. The notebook runs the small model on CPU, fits labeled context, and scores 85 held-out rows. It compares accuracy and macro one-vs-one ROC AUC with a majority-class baseline.

The notebook installs its dependencies, downloads the dataset and pretrained weights, and runs without a GPU.

For import, download, device, and input errors, refer to Troubleshooting.