Int8 quantizations of
stanford-star/rt-j,
the Relational Transformer foundation model for in-context learning over
relational databases. Produced and consumed by the
RelativeDB native inference engine
(
cpp/rt_quantize --type q8). Weights stay
quantized-resident at
inference: the engine's CPU (Accelerate / portable SIMD) and Metal/MPS
kernels dequantize inside the GEMM, so DRAM weight traffic is the int8
payload.
(vs. 171 MB bf16 upstream, 342 MB fp32 in memory.)
Any safetensors reader can load these files; dequantization is one line per
row. The RelativeDB engine keeps the int8 payload resident and dequantizes
64-row tiles (CPU) or in-register while staging GEMM tiles (Metal); the CUDA
backend is fp32-only for now.
Measured on the RelativeDB golden batch (B=5, S=16 churn example) against the
PyTorch reference, identical on CPU and Metal/MPS:
Worst per-row mean relative weight error: ≈5%.
1# direct path
2./build/rt_test testdata classification/model.q8.safetensors --quantized --device mps
3
4# via the Java / Python / Rust bindings: place the .q8 file next to the fp32
5# checkpoint (or point at a directory containing it) and opt in with
6export RELATIVEDB_RT_QUANTIZED=q8 # (or 1/true; q4 and f16 select siblings)
1cmake -B build -S cpp && cmake --build build -j
2./build/rt_quantize <rt-j>/classification/model.safetensors classification/model.q8.safetensors
3./build/rt_quantize <rt-j>/regression/model.safetensors regression/model.q8.safetensors
Derivative of
stanford-star/rt-j
(Stanford STAR lab), redistributed under the same
CC-BY-NC-SA-4.0 license. Architecture and training details are described
in the upstream model card; only the weight storage format differs here.