Examples
These examples begin with application-owned values and embeddings, then pass
model-ready cell vectors or a typed RelationalBatch to the transformer. They
do not hide parsing or encoding inside the model API.
Install the example dependencies first:
python -m pip install -e ".[dev,onnx]" sentence-transformers
Prediction and analysis
predict_issue.py— encode issue fields and make one classification predictionbatch_predictions.py— score variable-length issue contexts in one calltyped_customer_churn.py— build typed customer, order, and support tensorsablate_support_history.py— define and compare an explicit ablationevaluate_churn.py— run classification and ablation evaluators
Training
tune_issue_head.py— fit and save a multiclass head over a frozen backbonefinetune_churn.py— fine-tune all RT-J weights with mini-batches
Deployment
export_onnx.py— export dynamic batch/sequence axes and verify ONNX Runtimeinspect_meta_model.py— inspect model dimensions without allocating weightstriton_fp8_inference.py— run native FP8 weights with Triton on CUDA
Run any file from this directory or from the repository root, for example:
python examples/batch_predictions.py
The prediction examples download RelativeDB/rt-j-fp16 and
sentence-transformers/all-MiniLM-L12-v2 on first use. The Triton example
requires a CUDA device and the triton extra.