Add ONNX model metadata
Browse files- README.md +35 -0
- config.json +12 -0
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: relational-transformers
|
| 4 |
+
pipeline_tag: tabular-classification
|
| 5 |
+
tags:
|
| 6 |
+
- relational-transformers
|
| 7 |
+
- onnx
|
| 8 |
+
- relational-data
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# RT-J ONNX
|
| 12 |
+
|
| 13 |
+
This repository contains the classification checkpoint from
|
| 14 |
+
[`RelativeDB/rt-j-fp16`](https://huggingface.co/RelativeDB/rt-j-fp16), exported
|
| 15 |
+
to ONNX for framework-neutral target prediction over caller-provided relational
|
| 16 |
+
cell embeddings.
|
| 17 |
+
|
| 18 |
+
Load and cache it automatically with:
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from relational_transformers import RelationalTransformer
|
| 22 |
+
|
| 23 |
+
model = RelationalTransformer(backend="onnx")
|
| 24 |
+
predictions = model.predict(batch)
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
The graph accepts the canonical `RelationalBatch` tensor fields. Batch size and
|
| 28 |
+
cell count are dynamic; the text and column-embedding width is fixed at 384.
|
| 29 |
+
Callers remain responsible for producing the model-ready cell embeddings and
|
| 30 |
+
relations described in the
|
| 31 |
+
[`relational-transformers` input contract](https://relationaltransformers.com/docs/relational_transformer/usage/batches.html).
|
| 32 |
+
|
| 33 |
+
`model.onnx` is exported from the full published checkpoint. The release
|
| 34 |
+
process verifies PyTorch and ONNX Runtime output parity at multiple dynamic
|
| 35 |
+
context lengths before publishing the file.
|
config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": ["RTJModel"],
|
| 3 |
+
"library_name": "relational-transformers",
|
| 4 |
+
"source_model": "RelativeDB/rt-j-fp16",
|
| 5 |
+
"task_type": "classification",
|
| 6 |
+
"model_file": "model.onnx",
|
| 7 |
+
"d_text": 384,
|
| 8 |
+
"d_model": 512,
|
| 9 |
+
"num_blocks": 12,
|
| 10 |
+
"num_heads": 8,
|
| 11 |
+
"dynamic_axes": ["batch", "cells"]
|
| 12 |
+
}
|