dhenneberger1 commited on
Commit
6358254
·
verified ·
1 Parent(s): 82744ac

Publish RT-J FP8 checkpoints

Browse files
README.md ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-sa-4.0
3
+ base_model: RelativeDB/rt-j-fp16
4
+ library_name: relational-transformers
5
+ tags:
6
+ - relational-deep-learning
7
+ - relational-databases
8
+ - tabular
9
+ - tabular-classification
10
+ - tabular-regression
11
+ - foundation-model
12
+ - in-context-learning
13
+ - quantized
14
+ - fp8
15
+ - relational-transformer
16
+ datasets:
17
+ - stanford-star/the-join
18
+ - stanford-star/relbench
19
+ ---
20
+
21
+ # RT-J — FP8 E4M3 checkpoints
22
+
23
+ Native FP8 quantizations of [RelativeDB/rt-j-fp16](https://huggingface.co/RelativeDB/rt-j-fp16),
24
+ the RT-J Relational Transformer foundation model for prediction over related
25
+ data. These checkpoints are produced and consumed by
26
+ [`relational-transformers`](https://github.com/RelativeDB/relational-transformers).
27
+
28
+ Sibling repos: [rt-j-fp16](https://huggingface.co/RelativeDB/rt-j-fp16) ·
29
+ [rt-j-int8](https://huggingface.co/RelativeDB/rt-j-int8) ·
30
+ [rt-j-int4](https://huggingface.co/RelativeDB/rt-j-int4)
31
+
32
+ | File | Task head | Size |
33
+ |---|---|---|
34
+ | `classification/model.fp8.safetensors` | classification / ranking logits | 82 MiB |
35
+ | `regression/model.fp8.safetensors` | regression / forecasting normalized values | 82 MiB |
36
+
37
+ ## FP8 Format
38
+
39
+ Every two-dimensional matrix weight is stored directly as PyTorch
40
+ `float8_e4m3fn`. Biases, normalization scales, and mask embeddings retain the
41
+ source checkpoint dtype. The format is ordinary safetensors with
42
+ `quantization=fp8_e4m3fn` metadata and requires no packed custom container.
43
+
44
+ Portable PyTorch expands FP8 weights while loading. The Triton CUDA backend
45
+ keeps them FP8-resident and uses supported GPU tensor-core paths.
46
+
47
+ ## Accuracy
48
+
49
+ Measured on the RelativeDB golden relational batch (`B=5`, `S=16`) against
50
+ `RelativeDB/rt-j-fp16` using the portable PyTorch backend:
51
+
52
+ | Task | Maximum absolute logit error | Mean absolute logit error |
53
+ |---|---:|---:|
54
+ | classification / ranking | 0.0542 | 0.0435 |
55
+ | regression / forecasting | 0.0286 | 0.0213 |
56
+
57
+ Target-score signs and ranking are preserved on this batch. Validate task
58
+ metrics against FP16 on representative application contexts before deployment.
59
+
60
+ ## Usage
61
+
62
+ ```python
63
+ from relational_transformers import RelationalTransformer
64
+
65
+ classifier = RelationalTransformer("RelativeDB/rt-j-fp8")
66
+ probabilities = classifier.predict(relational_batch)
67
+
68
+ regressor = RelationalTransformer("RelativeDB/rt-j-fp8", task="regression")
69
+ predictions = regressor.predict(relational_batch)
70
+ ```
71
+
72
+ For native FP8 CUDA inference:
73
+
74
+ ```python
75
+ model = RelationalTransformer("RelativeDB/rt-j-fp8", backend="triton")
76
+ ```
77
+
78
+ ## Reproduce
79
+
80
+ ```bash
81
+ pip install relational-transformers
82
+ relational-transformers-quantize RelativeDB/rt-j-fp16 ./rt-j-fp8
83
+ ```
84
+
85
+ ## License and Attribution
86
+
87
+ Derivative of [stanford-star/rt-j](https://huggingface.co/stanford-star/rt-j)
88
+ (Stanford STAR lab), redistributed under the same **CC-BY-NC-SA-4.0** license.
89
+ Architecture and training details are described in the upstream model card;
90
+ only the weight storage format differs here.
classification/config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "codename": "rt-j-clf",
3
+ "name": "RT-J Classifier",
4
+ "task_type": "clf",
5
+ "checkpoint_file": "model.fp8.safetensors",
6
+ "embedding_model": "all-MiniLM-L12-v2",
7
+ "d_text": 384,
8
+ "model": {
9
+ "num_blocks": 12,
10
+ "d_model": 512,
11
+ "d_text": 384,
12
+ "num_heads": 8,
13
+ "d_ff": 2048,
14
+ "materialize_attn_masks": true
15
+ },
16
+ "provenance": {
17
+ "run_id": "pjbmgvu2",
18
+ "swa_step": 58000,
19
+ "project": "2026-04-17",
20
+ "recipe": "real_mixed_v6_5_486t"
21
+ },
22
+ "quantization": {
23
+ "format": "fp8_e4m3fn",
24
+ "matrix_weights_only": true
25
+ }
26
+ }
classification/model.fp8.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8323b7d3db8ac544d05ae70453361d405502fbb0c73ea5fff59daf313b91e17
3
+ size 85716620
regression/config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "codename": "rt-j-reg",
3
+ "name": "RT-J Regressor",
4
+ "task_type": "reg",
5
+ "checkpoint_file": "model.fp8.safetensors",
6
+ "embedding_model": "all-MiniLM-L12-v2",
7
+ "d_text": 384,
8
+ "model": {
9
+ "num_blocks": 12,
10
+ "d_model": 512,
11
+ "d_text": 384,
12
+ "num_heads": 8,
13
+ "d_ff": 2048,
14
+ "materialize_attn_masks": true
15
+ },
16
+ "provenance": {
17
+ "run_id": "fsuj4wdl",
18
+ "swa_step": 18000,
19
+ "project": "2026-04-17",
20
+ "recipe": "real_mixed_v6_5_486t"
21
+ },
22
+ "quantization": {
23
+ "format": "fp8_e4m3fn",
24
+ "matrix_weights_only": true
25
+ }
26
+ }
regression/model.fp8.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2e700a66e173d38c8071e8469dac33784d0b12a92b039c5444644d7d2ad3748
3
+ size 85716620