File size: 5,280 Bytes
b043bdf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | ---
license: openmdw-1.1
library_name: onnx
base_model: nvidia/Kumo-Tabular
base_model_relation: quantized
pipeline_tag: tabular-classification
tags:
- onnx
- onnxruntime-web
- webgpu
- structured-data-models
- tabular-classification
- tabular-regression
- tabular-foundation-model
- in-context-learning
---
# KumoTabular for onnxruntime-web
An unofficial ONNX conversion of NVIDIA's [Kumo Tabular](https://huggingface.co/nvidia/Kumo-Tabular)
(tag `v1.0.1`) in its three sizes, made for Tabular Data Workbench, which runs
it in the browser with onnxruntime-web on WebGPU or WebAssembly. The weights
are NVIDIA's, with the larger ones stored as float16 (see below). NVIDIA has
not reviewed or endorsed this conversion.
## Files
One graph per size and head, each a single file:
| file | parameters | size |
| --- | --- | --- |
| `small-classifier.f16w.onnx` | 27.5M | 55 MB |
| `small-regressor.f16w.onnx` | 28.5M | 57 MB |
| `medium-classifier.f16w.onnx` | 61.5M | 124 MB |
| `medium-regressor.f16w.onnx` | 62.5M | 126 MB |
| `large-classifier.f16w.onnx` | 213.7M | 428 MB |
| `large-regressor.f16w.onnx` | 215.7M | 432 MB |
Every graph has the same interface, that of onnx-community's export of the
small size:
| input / output | shape | type |
| --- | --- | --- |
| `x` | (R, C), context rows first, missing values as NaN | float32 |
| `y_context` | (Rc) | int32 class codes (classifier), float32 (regressor) |
| `categorical_mask` | (C) | bool |
| `logits` | (R - Rc, 10) logits or (R - Rc, 999) quantiles | float32 |
The graph is the network only (structured-data-models'
`_KumoTabular.forward`): it imputes missing cells itself, so NaN must reach
it unchanged. The preprocessing recipe, the ensemble and the output
aggregation stay outside it; the app implements them in TypeScript.
In `f16w`, every float32 weight of 1,024 or more elements is stored as
float16 and cast back to float32 on load, which halves the download and keeps
compute in float32. The other weights are as NVIDIA released them.
`manifest.json` lists every file with its size, sha256, largest weight and
total weight bytes (as float32), the int64 shape nodes to keep on the CPU
under WebGPU (`cpuNodes`), each size's architecture, a memory estimate per
row, onnxruntime CPU timings, and the parity figures below.
## How they were made
Source: `nvidia/Kumo-Tabular` at `3c3e10bbdb590ace29e7026847f92db3c603096d`
(tag `v1.0.1`), loaded through NVIDIA's
[structured-data-models](https://github.com/NVIDIA/structured-data-models)
0.2.1.
```sh
cd models/kumo
uv run export.py # writes public/models/kumo/
```
`export.py` (in `models/kumo/` of Tabular Data Workbench) exports with
`torch.onnx` (dynamo, opset 20, PyTorch 2.14 on CPU) and removes the
exporter's node metadata and doc strings. The cell embedding is
rewritten so that grouping each column with its neighbours, imputing missing
cells and building the Fourier features need no int64 Mod, int64 sums or
scatters; the result matches structured-data-models' forward pass. The
graphs keep a few int64 shape computations, listed in the manifest.
## Parity
onnxruntime 1.30 (CPU) against structured-data-models' forward pass in
PyTorch, maximum absolute difference over network inputs captured from its
recipe (4 ensemble members, 540 context and 100 query rows of a synthetic
table with missing values and two categorical columns) and over random
inputs of five shapes:
| graph | float32 graph, recipe inputs | f16w, recipe inputs | f16w, random inputs | largest output |
| --- | --- | --- | --- | --- |
| small classifier (logits) | 5.2e-5 | 1.9e-2 | 1.8e-2 | 14.5 |
| small regressor (quantiles) | 2.2e-5 | 6.1e-3 | 1.8e-2 | 4.6 |
| medium classifier | 4.2e-5 | 1.5e-2 | 1.8e-2 | 30.1 |
| medium regressor | 9.1e-6 | 1.4e-3 | 6.5e-3 | 3.7 |
| large classifier | 2.4e-5 | 1.1e-2 | 2.4e-2 | 8.3 |
| large regressor | 6.9e-5 | 2.7e-3 | 4.2e-3 | 4.5 |
The float32 graphs (built for this check, not published) show the export's
own error; the rest is the rounding of the weights to float16. Regressor
outputs are in units of the standardised target.
Through the whole recipe (8 ensemble members; breast cancer with and without
missing values, wine, diabetes), the f16w graphs of every size move class
probabilities by at most 4.1e-4 and regression quantiles by at most 9e-4
standard deviations from structured-data-models' predictions, with the same
accuracy and R² within 2e-5.
## Licence
The weights are released by NVIDIA under the OpenMDW License Agreement 1.1
(`LICENSE`, Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES). It allows
use, modification and redistribution provided that the agreement and the
notices of origin travel with the weights, and it ends the rights of anyone
who sues claiming the model infringes a patent or copyright.
The graphs were exported from structured-data-models' model code, licensed
under Apache-2.0 (`LICENSE.structured-data-models`), whose cell embedding is
derived from TabFM (Google, Apache-2.0) and whose attention scaling contains
portions of TabICLv2 (Soda team, Inria, BSD-3-Clause). `NOTICE` states the
origin and the changes and carries the TabICLv2 licence.
Keep `LICENSE`, `NOTICE` and `LICENSE.structured-data-models` with the
graphs when redistributing them.
|